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

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

Issue 304293002: Add human readable programmatic enum name/values to chrome.automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last feedback. Created 6 years, 7 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/test/data/extensions/api_test/automation/tests/tabs/location.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/tabs/sanity_check.js
diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/sanity_check.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/sanity_check.js
index b391c97c4b4d66251cb7c184f1936b12241b8a0a..ff4ee3b584c85ff161913da34c2af70d912a01ae 100644
--- a/chrome/test/data/extensions/api_test/automation/tests/tabs/sanity_check.js
+++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/sanity_check.js
@@ -5,14 +5,14 @@
// Do not test orientation or hover attributes (similar to exclusions on native
// accessibility), since they can be inconsistent depending on the environment.
var RemoveUntestedStates = function(state) {
- delete state['horizontal'];
- delete state['hovered'];
- delete state['vertical'];
+ delete state[StateType.horizontal];
+ delete state[StateType.hovered];
+ delete state[StateType.vertical];
};
var allTests = [
function testSimplePage() {
- var title = tree.root.attributes['docTitle'];
+ var title = tree.root.attributes.docTitle;
assertEq('Automation Tests', title);
RemoveUntestedStates(tree.root.state);
assertEq(
@@ -22,7 +22,7 @@ var allTests = [
assertEq(1, children.length);
var body = children[0];
- assertEq('body', body.attributes['htmlTag']);
+ assertEq('body', body.attributes.htmlTag);
RemoveUntestedStates(body.state);
assertEq({enabled: true, readOnly: true},
@@ -31,19 +31,19 @@ var allTests = [
var contentChildren = body.children();
assertEq(3, contentChildren.length);
var okButton = contentChildren[0];
- assertEq('Ok', okButton.attributes['name']);
+ assertEq('Ok', okButton.attributes.name);
RemoveUntestedStates(okButton.state);
assertEq({enabled: true, focusable: true, readOnly: true},
okButton.state);
var userNameInput = contentChildren[1];
assertEq('Username',
- userNameInput.attributes['description']);
+ userNameInput.attributes.description);
RemoveUntestedStates(userNameInput.state);
assertEq({enabled: true, focusable: true},
userNameInput.state);
var cancelButton = contentChildren[2];
assertEq('Cancel',
- cancelButton.attributes['name']);
+ cancelButton.attributes.name);
RemoveUntestedStates(cancelButton.state);
assertEq({enabled: true, focusable: true, readOnly: true},
cancelButton.state);
« no previous file with comments | « chrome/test/data/extensions/api_test/automation/tests/tabs/location.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698