Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8762)

Unified Diff: chrome/test/data/extensions/api_test/automation/tests/unit/test.js

Issue 514363002: Remove attributes and methods which should not be part of the public API (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Rewrite unit test in terms of HTML IDs rather than automation IDs Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/automation/tests/unit/test.js
diff --git a/chrome/test/data/extensions/api_test/automation/tests/unit/test.js b/chrome/test/data/extensions/api_test/automation/tests/unit/test.js
index 59995edaf0517c566ac2e69abe50adc3b842a017..20cdeb684a363fda7401a1432c5ce6db247e1279 100644
--- a/chrome/test/data/extensions/api_test/automation/tests/unit/test.js
+++ b/chrome/test/data/extensions/api_test/automation/tests/unit/test.js
@@ -45,37 +45,38 @@ var tests = [
{
'id': 5, 'role': 'div',
'childIds': [],
- 'htmlAttributes': {'aria-activedescendant': 'target'},
+ 'htmlAttributes': {'aria-activedescendant': 'target',
+ 'id': 'activedescendant'},
'intAttributes': {'activedescendantId': 11},
},
{
'id': 6, 'role': 'div',
'childIds': [],
- 'htmlAttributes': {'aria-controls': 'target'},
+ 'htmlAttributes': {'aria-controls': 'target', 'id': 'controlledBy'},
'intlistAttributes': {'controlsIds': [11]},
},
{
'id': 7, 'role': 'div',
'childIds': [],
- 'htmlAttributes': {'aria-describedby': 'target'},
+ 'htmlAttributes': {'aria-describedby': 'target', 'id': 'describedBy'},
'intlistAttributes': {'describedbyIds': [11, 6]},
},
{
'id': 8, 'role': 'div',
'childIds': [],
- 'htmlAttributes': {'aria-flowto': 'target'},
+ 'htmlAttributes': {'aria-flowto': 'target', 'id': 'flowTo'},
'intlistAttributes': {'flowtoIds': [11]},
},
{
'id': 9, 'role': 'div',
'childIds': [],
- 'htmlAttributes': {'aria-labelledby': 'target'},
+ 'htmlAttributes': {'aria-labelledby': 'target', 'id': 'labelledBy'},
'intlistAttributes': {'labelledbyIds': [11]}
},
{
'id': 10, 'role': 'div',
'childIds': [],
- 'htmlAttributes': {'aria-owns': 'target'},
+ 'htmlAttributes': {'aria-owns': 'target', 'id': 'owns'},
'intlistAttributes': {'ownsIds': [11]},
}
]}
@@ -86,43 +87,50 @@ var tests = [
var activedescendant = tree.firstChild();
assertIsDef(activedescendant);
- assertEq(5, activedescendant.id);
- assertEq(11, activedescendant.attributes['aria-activedescendant'].id);
+ assertEq('activedescendant', activedescendant.attributes.id);
+ assertEq(
+ 'target',
+ activedescendant.attributes['aria-activedescendant'].attributes.id);
assertIsNotDef(activedescendant.attributes.activedescendantId);
var controlledBy = activedescendant.nextSibling();
assertIsDef(controlledBy);
- assertEq(6, controlledBy.id);
- assertEq(11, controlledBy.attributes['aria-controls'][0].id);
+ assertEq('controlledBy', controlledBy.attributes.id);
+ assertEq('target',
+ controlledBy.attributes['aria-controls'][0].attributes.id);
assertEq(1, controlledBy.attributes['aria-controls'].length);
assertIsNotDef(controlledBy.attributes.controlledbyIds);
var describedBy = controlledBy.nextSibling();
assertIsDef(describedBy);
- assertEq(7, describedBy.id);
- assertEq(11, describedBy.attributes['aria-describedby'][0].id);
- assertEq(6, describedBy.attributes['aria-describedby'][1].id);
+ assertEq('describedBy', describedBy.attributes.id);
+ assertEq('target',
+ describedBy.attributes['aria-describedby'][0].attributes.id);
+ assertEq('controlledBy',
+ describedBy.attributes['aria-describedby'][1].attributes.id);
assertEq(2, describedBy.attributes['aria-describedby'].length);
assertIsNotDef(describedBy.attributes.describedbyIds);
var flowTo = describedBy.nextSibling();
assertIsDef(flowTo);
- assertEq(8, flowTo.id);
- assertEq(11, flowTo.attributes['aria-flowto'][0].id);
+ assertEq('flowTo', flowTo.attributes.id);
+ assertEq('target',
+ flowTo.attributes['aria-flowto'][0].attributes.id);
assertEq(1, flowTo.attributes['aria-flowto'].length);
assertIsNotDef(flowTo.attributes.flowtoIds);
var labelledBy = flowTo.nextSibling();
assertIsDef(labelledBy);
- assertEq(9, labelledBy.id);
- assertEq(11, labelledBy.attributes['aria-labelledby'][0].id);
+ assertEq('labelledBy', labelledBy.attributes.id);
+ assertEq('target',
+ labelledBy.attributes['aria-labelledby'][0].attributes.id);
assertEq(1, labelledBy.attributes['aria-labelledby'].length);
assertIsNotDef(labelledBy.attributes.labelledbyIds);
var owns = labelledBy.nextSibling();
assertIsDef(owns);
- assertEq(10, owns.id);
- assertEq(11, owns.attributes['aria-owns'][0].id);
+ assertEq('owns', owns.attributes.id);
+ assertEq('target', owns.attributes['aria-owns'][0].attributes.id);
assertEq(1, owns.attributes['aria-owns'].length);
assertIsNotDef(owns.attributes.ownsIds);
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698