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

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

Issue 1457683009: Complete live region support in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed last feedback Created 5 years 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 bb9f1fb011a756ffce9b50c9b85603a1600a47eb..a346bf81ca4ea788b2416cee8fc475d70dbc2572 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
@@ -34,17 +34,17 @@ ChromeVoxNextE2ETest.prototype = {
runWithLoadedTree: function(doc, callback) {
callback = this.newCallback(callback);
chrome.automation.getDesktop(function(r) {
- var listener = function(evt) {
- if (!evt.target.docUrl ||
- evt.target.docUrl.indexOf('test') == -1)
- return;
+ this.runWithTab(doc, function(newTabUrl) {
+ var listener = function(evt) {
+ if (!evt.target.docUrl || evt.target.docUrl != newTabUrl)
+ return;
- r.removeEventListener('loadComplete', listener, true);
- callback && callback(evt.target);
- callback = null;
- };
- r.addEventListener('loadComplete', listener, true);
- this.runWithTab(doc);
+ r.removeEventListener('loadComplete', listener, true);
+ callback && callback(evt.target);
+ callback = null;
+ };
+ r.addEventListener('loadComplete', listener, true);
+ }.bind(this));
}.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698