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

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

Issue 2092743002: Revert of Make ChromeVox Next a setting in options page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd ('k') | no next file » | 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 // 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 *
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 runWithLoadedTree: function(doc, callback, opt_url) { 50 runWithLoadedTree: function(doc, callback, opt_url) {
51 callback = this.newCallback(callback); 51 callback = this.newCallback(callback);
52 chrome.automation.getDesktop(function(r) { 52 chrome.automation.getDesktop(function(r) {
53 var url = opt_url || TestUtils.createUrlForDoc(doc); 53 var url = opt_url || TestUtils.createUrlForDoc(doc);
54 var listener = function(evt) { 54 var listener = function(evt) {
55 if (evt.target.root.url != url) 55 if (evt.target.root.url != url)
56 return; 56 return;
57 57
58 r.removeEventListener('focus', listener, true); 58 r.removeEventListener('focus', listener, true);
59 r.removeEventListener('loadComplete', listener, true); 59 r.removeEventListener('loadComplete', listener, true);
60 ChromeVoxState.instance.onGotCommand('nextObject'); 60 global.backgroundObj.onGotCommand('nextObject');
61 callback && callback(evt.target); 61 callback && callback(evt.target);
62 callback = null; 62 callback = null;
63 }; 63 };
64 r.addEventListener('focus', listener, true); 64 r.addEventListener('focus', listener, true);
65 r.addEventListener('loadComplete', listener, true); 65 r.addEventListener('loadComplete', listener, true);
66 var createParams = { 66 var createParams = {
67 active: true, 67 active: true,
68 url: url 68 url: url
69 }; 69 };
70 chrome.tabs.create(createParams); 70 chrome.tabs.create(createParams);
71 }.bind(this)); 71 }.bind(this));
72 }, 72 },
73 73
74 listenOnce: function(node, eventType, callback, capture) { 74 listenOnce: function(node, eventType, callback, capture) {
75 var innerCallback = this.newCallback(function() { 75 var innerCallback = this.newCallback(function() {
76 node.removeEventListener(eventType, innerCallback, capture); 76 node.removeEventListener(eventType, innerCallback, capture);
77 callback.apply(this, arguments); 77 callback.apply(this, arguments);
78 }); 78 });
79 node.addEventListener(eventType, innerCallback, capture); 79 node.addEventListener(eventType, innerCallback, capture);
80 } 80 }
81 }; 81 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698