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

Side by Side Diff: chrome/test/data/extensions/api_test/automation/tests/desktop/actions.js

Issue 2650733002: Revert of Update json_schema_compiler to handle the Automation extension API (Closed)
Patch Set: Created 3 years, 11 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
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 var allTests = [ 5 var allTests = [
6 function testDoDefault() { 6 function testDoDefault() {
7 var firstTextField = findAutomationNode(rootNode, 7 var firstTextField = findAutomationNode(rootNode,
8 function(node) { 8 function(node) {
9 return node.role == 'textField'; 9 return node.role == 'textField';
10 }); 10 });
11 assertTrue(!!firstTextField); 11 assertTrue(!!firstTextField);
12 listenOnce(firstTextField, EventType.FOCUS, function(e) { 12 listenOnce(firstTextField, EventType.focus, function(e) {
13 chrome.test.succeed(); 13 chrome.test.succeed();
14 }, true); 14 }, true);
15 firstTextField.doDefault(); 15 firstTextField.doDefault();
16 }, 16 },
17 17
18 function testDoDefaultViews() { 18 function testDoDefaultViews() {
19 listenOnce(rootNode, 'focus', function(node) { 19 listenOnce(rootNode, 'focus', function(node) {
20 chrome.test.succeed(); 20 chrome.test.succeed();
21 }, true); 21 }, true);
22 var button = rootNode.find( 22 var button = rootNode.find(
23 {role: 'button', attributes: {name: 'Bookmark this page'}}); 23 {role: 'button', attributes: {name: 'Bookmark this page'}});
24 button.doDefault(); 24 button.doDefault();
25 }, 25 },
26 26
27 function testContextMenu() { 27 function testContextMenu() {
28 var addressBar = rootNode.find({role: 'textField'}); 28 var addressBar = rootNode.find({role: 'textField'});
29 listenOnce(rootNode, EventType.MENU_START, function(e) { 29 listenOnce(rootNode, EventType.menuStart, function(e) {
30 addressBar.showContextMenu(); 30 addressBar.showContextMenu();
31 chrome.test.succeed(); 31 chrome.test.succeed();
32 }, true); 32 }, true);
33 addressBar.showContextMenu(); 33 addressBar.showContextMenu();
34 } 34 }
35 ]; 35 ];
36 36
37 setUpAndRunTests(allTests); 37 setUpAndRunTests(allTests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698