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

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

Issue 2008773002: Begin using ChromeVox Next to read tab and window titles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
diff --git a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
index 14d7727f70f0e368bea90df668fdaa6938e27048..bb88f2bc78a731bd330ad63e43ec0115a87448d2 100644
--- a/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
+++ b/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js
@@ -49,18 +49,17 @@ ChromeVoxNextE2ETest.prototype = {
runWithLoadedTree: function(doc, callback) {
callback = this.newCallback(callback);
chrome.automation.getDesktop(function(r) {
- this.runWithTab(doc, function(newTabUrl) {
- var listener = function(evt) {
- if (!evt.target.docUrl || evt.target.docUrl != newTabUrl)
dmazzoni 2016/05/25 15:18:00 I think making this change could break tests with
David Tseng 2016/05/25 16:08:23 I'm a little surprised this worked before because
dmazzoni 2016/05/25 16:10:35 That's true, it'd probably be better to register t
David Tseng 2016/05/25 17:27:28 Added the ability to wait for a specific url and a
David Tseng 2016/05/26 20:50:19 FYI; I filed crbug.com/615192>
- return;
+ var listener = function(evt) {
+ if (evt.target.url.indexOf('data') != 0)
+ return;
- r.removeEventListener('loadComplete', listener, true);
- global.backgroundObj.onGotCommand('nextObject');
- callback && callback(evt.target);
- callback = null;
- };
- r.addEventListener('loadComplete', listener, true);
- }.bind(this));
+ r.removeEventListener('loadComplete', listener, true);
+ global.backgroundObj.onGotCommand('nextObject');
+ callback && callback(evt.target);
+ callback = null;
+ };
+ r.addEventListener('loadComplete', listener, true);
+ this.runWithTab(doc);
}.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698