Chromium Code Reviews| 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)); |
| }, |