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

Side by Side Diff: chrome/test/data/extensions/api_test/webnavigation/test_failures.js

Issue 10785018: Send an webNavigation.onErrorOccurred when a load fails after the initial navigation was committed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/webnavigation/failures/e.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function runTests() { 5 function runTests() {
6 var getURL = chrome.extension.getURL; 6 var getURL = chrome.extension.getURL;
7 chrome.tabs.create({"url": "about:blank"}, function(tab) { 7 chrome.tabs.create({"url": "about:blank"}, function(tab) {
8 var tabId = tab.id; 8 var tabId = tab.id;
9 9
10 chrome.test.runTests([ 10 chrome.test.runTests([
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 tabId: 0, 144 tabId: 0,
145 timeStamp: 0, 145 timeStamp: 0,
146 url: getURL('failures/c.html') }}], 146 url: getURL('failures/c.html') }}],
147 [ navigationOrder("a-"), 147 [ navigationOrder("a-"),
148 navigationOrder("b-"), 148 navigationOrder("b-"),
149 isIFrameOf("b-", "a-"), 149 isIFrameOf("b-", "a-"),
150 isLoadedBy("c-", "b-"), 150 isLoadedBy("c-", "b-"),
151 ["c-onBeforeNavigate", "c-onErrorOccurred"]]); 151 ["c-onBeforeNavigate", "c-onErrorOccurred"]]);
152 chrome.tabs.update(tabId, { url: getURL('failures/a.html') }); 152 chrome.tabs.update(tabId, { url: getURL('failures/a.html') });
153 }, 153 },
154
155 // Cancel a navigation after it is already committed.
156 function cancel() {
157 expect([
158 { label: "onBeforeNavigate",
159 event: "onBeforeNavigate",
160 details: { frameId: 0,
161 tabId: 0,
162 timeStamp: 0,
163 url: getURL('failures/e.html') }},
164 { label: "onCommitted",
165 event: "onCommitted",
166 details: { frameId: 0,
167 tabId: 0,
168 timeStamp: 0,
169 transitionQualifiers: [],
170 transitionType: "link",
171 url: getURL('failures/e.html') }},
172 { label: "onDOMContentLoaded",
173 event: "onDOMContentLoaded",
174 details: { frameId: 0,
175 tabId: 0,
176 timeStamp: 0,
177 url: getURL('failures/e.html') }},
178 { label: "onErrorOccurred",
179 event: "onErrorOccurred",
180 details: { error: "net::ERR_ABORTED",
181 frameId: 0,
182 tabId: 0,
183 timeStamp: 0,
184 url: getURL('failures/e.html') }}],
185 [["onBeforeNavigate", "onCommitted", "onDOMContentLoaded",
186 "onErrorOccurred"]]);
187 chrome.tabs.update(tabId, { url: getURL('failures/e.html') });
188 },
154 ]); 189 ]);
155 }); 190 });
156 } 191 }
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/webnavigation/failures/e.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698