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

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/on_updated/test.js

Issue 2634333003: Convert SearchTabHelper to use the new navigation callbacks. (Closed)
Patch Set: closer to original Created 3 years, 11 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
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper_unittest.cc ('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 var expectedEventData; 5 var expectedEventData;
6 var capturedEventData; 6 var capturedEventData;
7 var shouldIgnore; 7 var shouldIgnore;
8 8
9 function expect(data, ignoreFunc) { 9 function expect(data, ignoreFunc) {
10 expectedEventData = data; 10 expectedEventData = data;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 { status: 'loading', url: getURL('browserThenRendererInitiated/b.html') }, 43 { status: 'loading', url: getURL('browserThenRendererInitiated/b.html') },
44 { status: 'complete' }, 44 { status: 'complete' },
45 ]); 45 ]);
46 46
47 chrome.tabs.create({ url: getURL('browserThenRendererInitiated/a.html') }); 47 chrome.tabs.create({ url: getURL('browserThenRendererInitiated/a.html') });
48 }, 48 },
49 49
50 function newTab() { 50 function newTab() {
51 // Test for crbug.com/27208. 51 // Test for crbug.com/27208.
52 expect([ 52 expect([
53 { title : "New Tab" },
53 { status: 'loading', url: 'chrome://newtab/' }, 54 { status: 'loading', url: 'chrome://newtab/' },
54 { status: 'complete' } 55 { status: 'complete' }
55 ]); 56 ], function(info) {
57 // TODO(jam): remove this logic and the title line above when PlzNavigate
58 // is turned on by default. Right now the test has to handle both cases
59 // which have different timing. http://crbug.com/368813
60 if (info.status === 'loading' && capturedEventData.length == 0) {
61 expectedEventData.shift();
62 }
63 return false;
64 });
56 65
57 chrome.tabs.create({ url: 'chrome://newtab/' }); 66 chrome.tabs.create({ url: 'chrome://newtab/' });
58 }, 67 },
59 68
60 /* 69 /*
61 // TODO(rafaelw) -- This is disabled because this test is flakey. 70 // TODO(rafaelw) -- This is disabled because this test is flakey.
62 function updateDuringCreateCallback() { 71 function updateDuringCreateCallback() {
63 // Test for crbug.com/27204. 72 // Test for crbug.com/27204.
64 // We have to ignore anything that comes before the about:blank loading 73 // We have to ignore anything that comes before the about:blank loading
65 // status. 74 // status.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 expect([ 134 expect([
126 { status: 'loading', url: getURL('title/test.html') }, 135 { status: 'loading', url: getURL('title/test.html') },
127 { status: 'complete' }, 136 { status: 'complete' },
128 { title: 'foo' }, 137 { title: 'foo' },
129 { title: 'bar' } 138 { title: 'bar' }
130 ]); 139 ]);
131 140
132 chrome.tabs.create({ url: getURL('title/test.html') }); 141 chrome.tabs.create({ url: getURL('title/test.html') });
133 } 142 }
134 ]); 143 ]);
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698