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

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

Issue 1308153012: Uses isEditable and isRichlyEditable to determine which attributes to expose on Mac and how to repr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test by adding EDITABLE role manually. Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/test_runner/web_ax_object_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Do not test orientation or hover attributes (similar to exclusions on native 5 // Do not test orientation or hover attributes (similar to exclusions on native
6 // accessibility), since they can be inconsistent depending on the environment. 6 // accessibility), since they can be inconsistent depending on the environment.
7 var RemoveUntestedStates = function(state) { 7 var RemoveUntestedStates = function(state) {
8 var result = JSON.parse(JSON.stringify(state)); 8 var result = JSON.parse(JSON.stringify(state));
9 delete result[StateType.horizontal]; 9 delete result[StateType.horizontal];
10 delete result[StateType.hovered]; 10 delete result[StateType.hovered];
(...skipping 22 matching lines...) Expand all
33 var contentChildren = body.children; 33 var contentChildren = body.children;
34 assertEq(3, contentChildren.length); 34 assertEq(3, contentChildren.length);
35 var okButton = contentChildren[0]; 35 var okButton = contentChildren[0];
36 assertEq('Ok', okButton.name); 36 assertEq('Ok', okButton.name);
37 state = RemoveUntestedStates(okButton.state); 37 state = RemoveUntestedStates(okButton.state);
38 assertEq({enabled: true, focusable: true, readOnly: true}, state); 38 assertEq({enabled: true, focusable: true, readOnly: true}, state);
39 var userNameInput = contentChildren[1]; 39 var userNameInput = contentChildren[1];
40 assertEq('Username', 40 assertEq('Username',
41 userNameInput.description); 41 userNameInput.description);
42 state = RemoveUntestedStates(userNameInput.state); 42 state = RemoveUntestedStates(userNameInput.state);
43 assertEq({enabled: true, focusable: true}, state); 43 assertEq({editable: true, enabled: true, focusable: true}, state);
44 var cancelButton = contentChildren[2]; 44 var cancelButton = contentChildren[2];
45 assertEq('Cancel', 45 assertEq('Cancel',
46 cancelButton.name); 46 cancelButton.name);
47 state = RemoveUntestedStates(cancelButton.state); 47 state = RemoveUntestedStates(cancelButton.state);
48 assertEq({enabled: true, focusable: true, readOnly: true}, state); 48 assertEq({enabled: true, focusable: true, readOnly: true}, state);
49 49
50 // Traversal. 50 // Traversal.
51 assertEq(undefined, rootNode.parent); 51 assertEq(undefined, rootNode.parent);
52 assertEq(rootNode, body.parent); 52 assertEq(rootNode, body.parent);
53 53
(...skipping 21 matching lines...) Expand all
75 chrome.test.succeed(); 75 chrome.test.succeed();
76 }, 76 },
77 function testIsRoot() { 77 function testIsRoot() {
78 assertTrue(rootNode.isRootNode); 78 assertTrue(rootNode.isRootNode);
79 assertFalse(rootNode.firstChild.isRootNode); 79 assertFalse(rootNode.firstChild.isRootNode);
80 chrome.test.succeed(); 80 chrome.test.succeed();
81 } 81 }
82 ]; 82 ];
83 83
84 setUpAndRunTests(allTests); 84 setUpAndRunTests(allTests);
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/web_ax_object_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698