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

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

Issue 2080573003: Track all changed nodes during an update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make suggested change. Created 4 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
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(['chromevox_e2e_test_base.js']); 6 GEN_INCLUDE(['chromevox_e2e_test_base.js']);
7 7
8 /** 8 /**
9 * Base test fixture for ChromeVox Next end to end tests. 9 * Base test fixture for ChromeVox Next end to end tests.
10 * 10 *
11 * These tests are identical to ChromeVoxE2ETests except for performing the 11 * These tests are identical to ChromeVoxE2ETests except for performing the
12 * necessary setup to run ChromeVox Next. 12 * necessary setup to run ChromeVox Next.
13 * @constructor 13 * @constructor
14 * @extends {ChromeVoxE2ETest} 14 * @extends {ChromeVoxE2ETest}
15 */ 15 */
16 function ChromeVoxNextE2ETest() { 16 function ChromeVoxNextE2ETest() {
17 ChromeVoxE2ETest.call(this); 17 ChromeVoxE2ETest.call(this);
18 18
19 if (this.runtimeDeps.length > 0) { 19 if (this.runtimeDeps.length > 0) {
20 chrome.extension.getViews().forEach(function(w) { 20 chrome.extension.getViews().forEach(function(w) {
21 this.runtimeDeps.forEach(function(dep) { 21 this.runtimeDeps.forEach(function(dep) {
22 if (w[dep]) 22 if (w[dep])
23 window[dep] = w[dep]; 23 window[dep] = w[dep];
24 }.bind(this)); 24 }.bind(this));
25 }.bind(this)); 25 }.bind(this));
26 } 26 }
27
28 // For tests, enable announcement of events we trigger via automation.
29 DesktopAutomationHandler.announceActions = true;
27 } 30 }
28 31
29 ChromeVoxNextE2ETest.prototype = { 32 ChromeVoxNextE2ETest.prototype = {
30 __proto__: ChromeVoxE2ETest.prototype, 33 __proto__: ChromeVoxE2ETest.prototype,
31 34
32 /** 35 /**
33 * Dependencies defined on a background window other than this one. 36 * Dependencies defined on a background window other than this one.
34 * @type {!Array<string>} 37 * @type {!Array<string>}
35 */ 38 */
36 runtimeDeps: [], 39 runtimeDeps: [],
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }, 75 },
73 76
74 listenOnce: function(node, eventType, callback, capture) { 77 listenOnce: function(node, eventType, callback, capture) {
75 var innerCallback = this.newCallback(function() { 78 var innerCallback = this.newCallback(function() {
76 node.removeEventListener(eventType, innerCallback, capture); 79 node.removeEventListener(eventType, innerCallback, capture);
77 callback.apply(this, arguments); 80 callback.apply(this, arguments);
78 }); 81 });
79 node.addEventListener(eventType, innerCallback, capture); 82 node.addEventListener(eventType, innerCallback, capture);
80 } 83 }
81 }; 84 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698