Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with a different test file design, single file with all mappings #14

Open
wants to merge 2 commits into
base: acacia-test-testdriver
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions core-aam/json-test-example/aria-autocomplete.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>aria-braillelabel</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>
<script src="scripts/attr-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<input role='combobox' id='test1' aria-autocomplete='both'>
<input role='combobox' id='test2' aria-autocomplete='inline'>
<input role='combobox' id='test3' aria-autocomplete='list'>

<script>
AAMUtils.verifyAttrAPI(
'test1',
'both',
attrmap['aria-autocomplete'],
'aria-autocomplete=both'
);

AAMUtils.verifyAttrAPI(
'test2',
'inline',
attrmap['aria-autocomplete'],
'aria-autocomplete=inline'
);

AAMUtils.verifyAttrAPI(
'test3',
'list',
attrmap['aria-autocomplete'],
'aria-autocomplete=list'
);

</script>

</body>
</html>
28 changes: 28 additions & 0 deletions core-aam/json-test-example/aria-braillelabel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>aria-braillelabel</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>
<script src="scripts/attr-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<button id=test aria-braillelabel=foobar>

<script>
AAMUtils.verifyAttrAPI(
'test',
'foobar',
attrmap['aria-braillelabel'],
'aria-braillelabel'
);
</script>

</body>
</html>
30 changes: 30 additions & 0 deletions core-aam/json-test-example/aria-errormessage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>aria-flowto</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>
<script src="scripts/attr-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<div role='checkbox' id='test' aria-errormessage='error1 error2' aria-invalid='true'>content</div>
<div id='error1'>hello</div>
<div id='error2'>world</div>

<script>
AAMUtils.verifyRelationAPI(
'test',
['error1', 'error2'],
attrmap['aria-errormessage'],
'aria-flowto'
);
</script>

</body>
</html>
23 changes: 23 additions & 0 deletions core-aam/json-test-example/blockquote.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>role blockquote</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>
<script src="scripts/role-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<div id=test role=blockquote>quote</div>

<script>
AAMUtils.verifyAPI('test', rolemap['blockquote'], 'role=blockquote');
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>role button with default values for aria-pressed and aria-hapopup</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>
<script src="scripts/role-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<div id=test1 role=button>click me</div>
<div id=test2 role=button aria-pressed>click me</div>
<div id=test3 role=button aria-pressed aria-haspopup>click me</div>
<div id=test4 role=button aria-haspopup>click me</div>
<div id=test5 role=button aria-haspopup=false>click me</div>

<script>
AAMUtils.verifyAPI(
'test1',
rolemap['button_with_default_values_for_aria-pressed_and_aria-haspopup'],
'role=button'
);

AAMUtils.verifyAPI(
'test2',
rolemap['button_with_default_values_for_aria-pressed_and_aria-haspopup'],
'role=button aria-pressed'
);

AAMUtils.verifyAPI(
'test3',
rolemap['button_with_default_values_for_aria-pressed_and_aria-haspopup'],
'role=button aria-pressed aria-haspopup'
);

AAMUtils.verifyAPI(
'test4',
rolemap['button_with_default_values_for_aria-pressed_and_aria-haspopup'],
'role=button aria-haspopup'
);

AAMUtils.verifyAPI(
'test5',
rolemap['button_with_default_values_for_aria-pressed_and_aria-haspopup'],
'role=button aria-haspopup=false'
);
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>role button with defined value for aria-pressed</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>
<script src="scripts/role-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<div id=test1 role=button aria-pressed=true>press me</div>
<div id=test2 role=button aria-pressed=false>press me</div>

<script>
AAMUtils.verifyAPI(
'test1',
rolemap['button_with_defined_value_for_aria-pressed'],
'role=button aria-pressed=true'
);

AAMUtils.verifyAPI(
'test2',
rolemap['button_with_defined_value_for_aria-pressed'],
'role=button aria-pressed=false'
);
</script>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>role button with non false value for aria-pressed</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>
<script src="scripts/role-map.js"></script>
<script src="scripts/aam-utils.js"></script>
</head>
<body>

<div id=test1 role=button aria-haspopup=true>click me</div>
<div id=test2 role=button aria-haspopup=menu>click me</div>
<div id=test3 role=button aria-haspopup=listbox>click me</div>
<div id=test4 role=button aria-haspopup=tree>click me</div>
<div id=test5 role=button aria-haspopup=grid>click me</div>
<div id=test6 role=button aria-haspopup=dialog>click me</div>

<script>

AAMUtils.verifyAPI(
'test1',
rolemap['button_with_non_false_value_for_aria-haspopup'],
'role=button aria-haspopup=true'
);

AAMUtils.verifyAPI(
'test2',
rolemap['button_with_non_false_value_for_aria-haspopup'],
'role=button aria-haspopup=menu'
);

AAMUtils.verifyAPI(
'test3',
rolemap['button_with_non_false_value_for_aria-haspopup'],
'role=button aria-haspopup=listbox'
);

AAMUtils.verifyAPI(
'test4',
rolemap['button_with_non_false_value_for_aria-haspopup'],
'role=button aria-haspopup=tree'
);

AAMUtils.verifyAPI(
'test5',
rolemap['button_with_non_false_value_for_aria-haspopup'],
'role=button aria-haspopup=grid'
);

AAMUtils.verifyAPI(
'test6',
rolemap['button_with_non_false_value_for_aria-haspopup'],
'role=button aria-haspopup=dialog'
);

</script>
</body>
Loading