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

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

Issue 1670673003: Refactor the implementation of the webNavigation extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Bug-532666-NavigationHandleAPI
Patch Set: Remove UI thread DCHECKs. Created 4 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 onload = function() { 5 onload = function() {
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 chrome.test.getConfig(function(config) { 9 chrome.test.getConfig(function(config) {
10 chrome.test.runTests([ 10 chrome.test.runTests([
11 // Navigates to a page that redirects (on the server side) to a.html. 11 // Navigates to a page that redirects (on the server side) to a.html.
12 function serverRedirect() { 12 function serverRedirect() {
13 expect([ 13 expect([
14 { label: "a-onBeforeNavigate", 14 { label: "a-onBeforeNavigate",
15 event: "onBeforeNavigate", 15 event: "onBeforeNavigate",
16 details: { frameId: 0, 16 details: { frameId: 0,
17 parentFrameId: -1, 17 parentFrameId: -1,
18 processId: 0, 18 processId: -1,
19 tabId: 0, 19 tabId: 0,
20 timeStamp: 0, 20 timeStamp: 0,
21 url: getURL('a.html') }}, 21 url: getURL('a.html') }},
22 { label: "a-onCommitted", 22 { label: "a-onCommitted",
23 event: "onCommitted", 23 event: "onCommitted",
24 details: { frameId: 0, 24 details: { frameId: 0,
25 processId: 0, 25 processId: 0,
26 tabId: 0, 26 tabId: 0,
27 timeStamp: 0, 27 timeStamp: 0,
28 transitionQualifiers: [], 28 transitionQualifiers: [],
(...skipping 14 matching lines...) Expand all
43 timeStamp: 0, 43 timeStamp: 0,
44 url: getURL('a.html') }}], 44 url: getURL('a.html') }}],
45 [ navigationOrder("a-") ]); 45 [ navigationOrder("a-") ]);
46 chrome.tabs.update( 46 chrome.tabs.update(
47 tabId, { url: getURL('a.html?' + config.testServer.port) }); 47 tabId, { url: getURL('a.html?' + config.testServer.port) });
48 }, 48 },
49 ]); 49 ]);
50 }); 50 });
51 }); 51 });
52 }; 52 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698