basic.html (1107B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testdriver.js"></script> 5 <script src="/resources/testdriver-vendor.js"></script> 6 <script src="/resources/testdriver-actions.js"></script> 7 8 <!-- 9 10 These tests should remain solid and passing in any implementation that supports get_computed_label. 11 12 It uses a standard promise_test (rather than aria-util.js) to reduce other dependencies. 13 14 If you're adding something you expect to fail in one or more implementations, you probably want a different file. 15 16 --> 17 18 <div id='d' style='height: 100px; width: 100px' role="group" aria-label="test label"></div> 19 <h1 id="h">test heading</h1> 20 <script> 21 22 promise_test(async t => { 23 const label = await test_driver.get_computed_label(document.getElementById('d')); 24 assert_equals(label, "test label"); 25 }, "tests labelFrom: author"); 26 27 promise_test(async t => { 28 const label = await test_driver.get_computed_label(document.getElementById('h')); 29 assert_equals(label, "test heading"); 30 }, "tests labelFrom: contents"); 31 32 </script>