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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js

Issue 908853004: Revert of Reland #2: Ensure WebView notifies desktop automation on creation, destruction, and change Original (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 // Include test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['chrome/browser/resources/chromeos/chromevox/testing/' + 6 GEN_INCLUDE(['chrome/browser/resources/chromeos/chromevox/testing/' +
7 'chromevox_e2e_test_base.js']); 7 'chromevox_e2e_test_base.js']);
8 8
9 /** 9 /**
10 * Base test fixture for ChromeVox Next end to end tests. 10 * Base test fixture for ChromeVox Next end to end tests.
(...skipping 11 matching lines...) Expand all
22 /** 22 /**
23 * This method is called without |this| bound to an instance of 23 * This method is called without |this| bound to an instance of
24 * ChromeVoxNextE2ETest. 24 * ChromeVoxNextE2ETest.
25 * @override 25 * @override
26 */ 26 */
27 testGenCppIncludes: function() { 27 testGenCppIncludes: function() {
28 ChromeVoxE2ETest.prototype.testGenCppIncludes.call(this); 28 ChromeVoxE2ETest.prototype.testGenCppIncludes.call(this);
29 GEN('#include "base/command_line.h"'); 29 GEN('#include "base/command_line.h"');
30 }, 30 },
31 31
32 /** 32 runWithAutomation: function(doc, callback) {
33 * Launches a new tab with the given document, and runs callback when a load 33 this.runWithDocument(doc, function() {
34 * complete fires. 34 chrome.automation.getTree(function(root) {
35 * @param {function() : void} doc Snippet wrapped inside of a function. 35 callback(root);
36 * @param {function()} opt_callback Called once the document is ready. 36 }.bind(this));
37 */
38 runWithLoadedTree: function(doc, callback) {
39 chrome.automation.getDesktop(function(r) {
40 function callbackInternal(evt) {
41 r.removeEventListener(callbackInternal);
42 callback(evt.target);
43 }
44 r.addEventListener('loadComplete', callbackInternal, true);
45 this.runWithTab(doc);
46 }.bind(this)); 37 }.bind(this));
47 } 38 }
48 }; 39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698