Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/webnavigation/test_failures.js |
| diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_failures.js b/chrome/test/data/extensions/api_test/webnavigation/test_failures.js |
| index 357b1490d26a9edd883f75d26b4253128e0b2347..a9cd20f1dffbb7daf0e863db45d5bbd257987416 100644 |
| --- a/chrome/test/data/extensions/api_test/webnavigation/test_failures.js |
| +++ b/chrome/test/data/extensions/api_test/webnavigation/test_failures.js |
| @@ -2,34 +2,12 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -function runTests() { |
| +onload = function() { |
| var getURL = chrome.extension.getURL; |
| chrome.tabs.create({"url": "about:blank"}, function(tab) { |
| var tabId = tab.id; |
| chrome.test.runTests([ |
| - // Navigates to a non-existant page. |
| - function nonExistant() { |
| - expect([ |
| - { label: "onBeforeNavigate", |
| - event: "onBeforeNavigate", |
| - details: { frameId: 0, |
| - processId: 0, |
| - tabId: 0, |
| - timeStamp: 0, |
| - url: getURL('failures/nonexistant.html') }}, |
| - { label: "onErrorOccurred", |
| - event: "onErrorOccurred", |
| - details: { error: "net::ERR_FILE_NOT_FOUND", |
| - frameId: 0, |
| - processId: 0, |
| - tabId: 0, |
| - timeStamp: 0, |
| - url: getURL('failures/nonexistant.html') }}], |
| - [["onBeforeNavigate", "onErrorOccurred"]]); |
| - chrome.tabs.update(tabId, { url: getURL('failures/nonexistant.html') }); |
| - }, |
| - |
| // An page that tries to load an non-existant iframe. |
| function nonExistantIframe() { |
| expect([ |
| @@ -208,6 +186,32 @@ function runTests() { |
| "onErrorOccurred"]]); |
| chrome.tabs.update(tabId, { url: getURL('failures/e.html') }); |
| }, |
| + |
| + // Navigates to a non-existant page (this test case must be last, |
|
miket_OOO
2012/08/06 22:33:28
non-existent
Mihai Parparita -not on Chrome
2012/08/09 23:04:08
Fixed all.
|
| + // otherwise the non-existed URL breaks tests that follow, since loading |
|
miket_OOO
2012/08/06 22:33:28
non-existent (or maybe non-existing?)
|
| + // those test pages is seen as a non-extension -> extension URL |
| + // transition, which is forbidden by web_accessible_resources enforcement |
| + // in manifest version 2. |
| + function nonExistant() { |
|
miket_OOO
2012/08/06 22:33:28
nonExistent
|
| + expect([ |
| + { label: "onBeforeNavigate", |
| + event: "onBeforeNavigate", |
| + details: { frameId: 0, |
| + processId: 0, |
| + tabId: 0, |
| + timeStamp: 0, |
| + url: getURL('failures/nonexistant.html') }}, |
|
miket_OOO
2012/08/06 22:33:28
nonexistent.html
|
| + { label: "onErrorOccurred", |
| + event: "onErrorOccurred", |
| + details: { error: "net::ERR_FILE_NOT_FOUND", |
| + frameId: 0, |
| + processId: 0, |
| + tabId: 0, |
| + timeStamp: 0, |
| + url: getURL('failures/nonexistant.html') }}], |
|
miket_OOO
2012/08/06 22:33:28
etc.
|
| + [["onBeforeNavigate", "onErrorOccurred"]]); |
| + chrome.tabs.update(tabId, { url: getURL('failures/nonexistant.html') }); |
| + }, |
| ]); |
| }); |
| -} |
| +}; |