diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html b/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html index 4b43004..546460c 100644 --- a/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html +++ b/chrome/test/data/extensions/api_test/notifications/has_permission_manifest/background.html @@ -1,5 +1,6 @@ <script> var notification = null; +var chromeExtensionsUrl = "chrome://extensions/"; // Shows the notification window using the specified URL. // Control continues at onNotificationDone(). @@ -16,7 +17,21 @@ function onNotificationDone() { var views = chrome.extension.getViews(); chrome.test.assertEq(2, views.length); notification.cancel(); - chrome.test.succeed(); + + // This last step tests that crbug.com/40967 stays fixed. + var listener = function(tabId, changeInfo, tab) { + if (changeInfo.status != 'complete') + return; + // web_page1 loaded, open extension page to inject script + if (tab.url == chromeExtensionsUrl) { + console.log(chromeExtensionsUrl + ' finished loading.'); + chrome.tabs.onUpdated.removeListener(listener); + chrome.test.succeed(); + } + }; + + chrome.tabs.onUpdated.addListener(listener); + chrome.tabs.create({ url: chromeExtensionsUrl }); } chrome.test.runTests([ |