| Index: chrome/test/data/extensions/api_test/executescript/basic/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/executescript/basic/test.js b/chrome/test/data/extensions/api_test/executescript/basic/test.js
|
| index 5937596807b92521cc1b4c83c3b6b2e82f53c4de..71859647474a5264233079b090dde84f8c6ff38e 100644
|
| --- a/chrome/test/data/extensions/api_test/executescript/basic/test.js
|
| +++ b/chrome/test/data/extensions/api_test/executescript/basic/test.js
|
| @@ -88,7 +88,13 @@ chrome.test.getConfig(function(config) {
|
| },
|
|
|
| function executeJavaScriptCodeShouldFail() {
|
| - chrome.tabs.update(tabId, { url: testFailureUrl }, function() {
|
| + var doneListening =
|
| + chrome.test.listenForever(chrome.tabs.onUpdated, onUpdated);
|
| + chrome.tabs.update(tabId, {url: testFailureUrl});
|
| +
|
| + function onUpdated(updatedTabId, changeInfo) {
|
| + if (updatedTabId !== tabId || changeInfo.url === testFailureUrl)
|
| + return;
|
| var script_file = {};
|
| script_file.code = "document.title = 'executeScript';";
|
| // The error message should contain the URL of the site for which it
|
| @@ -97,7 +103,8 @@ chrome.test.getConfig(function(config) {
|
| 'Cannot access contents of url "' + testFailureUrl +
|
| '". Extension manifest must request permission to access this ' +
|
| 'host.'));
|
| - });
|
| + doneListening();
|
| + }
|
| },
|
|
|
| function executeJavaScriptWithNoneValueShouldFail() {
|
|
|