-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Igalia/cleanup-testdriver
Clean up example
- Loading branch information
Showing
5 changed files
with
54 additions
and
48 deletions.
There are no files selected for viewing
23 changes: 13 additions & 10 deletions
23
core-aam/acacia/test-testdriver.html → core-aam/acacia/all_apis_example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<title>core-aam: acacia test using testdriver</title> | ||
<title>core-aam: role button</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
|
||
<body> | ||
<div id=testtest role="button"></div> | ||
<div id=test role=button>click me</div> | ||
|
||
<script> | ||
promise_test(async t => { | ||
const node = await test_driver.get_accessibility_api_node('testtest'); | ||
assert_equals(node.role, 'push button'); | ||
}, 'An acacia test 1'); | ||
const node = await test_driver.get_accessibility_api_node('test'); | ||
|
||
// This second test is helping me find a race condition right now! | ||
promise_test(async t => { | ||
const node = await test_driver.get_accessibility_api_node('testtest'); | ||
assert_equals(node.role, 'push button'); | ||
}, 'An acacia test 2'); | ||
if (node.API == 'atspi') { | ||
assert_equals(node.role, 'push button', 'Atspi role'); | ||
} | ||
else if (node.API == 'axapi') { | ||
assert_equals(node.role, 'AXButton', 'AX API role'); | ||
} | ||
else { | ||
assert_unreached(`Unknown API: ${node.API}`) | ||
} | ||
}, 'role button'); | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters