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

Side by Side Diff: chrome/test/data/webui/net_internals/prerender_view.js

Issue 136583007: Refactor prerender_browsertests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and switch some CHECKs to ASSERT_TRUE Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/prerender/prerender_loader_with_unload.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Include test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['net_internals_test.js']); 6 GEN_INCLUDE(['net_internals_test.js']);
7 7
8 // Anonymous namespace 8 // Anonymous namespace
9 (function() { 9 (function() {
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 /** 140 /**
141 * Navigate to the prerendered page in the background tab. 141 * Navigate to the prerendered page in the background tab.
142 * @param {Object} prerenderInfo State of prerendering pages. 142 * @param {Object} prerenderInfo State of prerendering pages.
143 */ 143 */
144 navigate_: function(prerenderInfo) { 144 navigate_: function(prerenderInfo) {
145 expectEquals(0, prerenderInfo.history.length); 145 expectEquals(0, prerenderInfo.history.length);
146 assertEquals(1, prerenderInfo.active.length); 146 assertEquals(1, prerenderInfo.active.length);
147 expectEquals(this.url_, prerenderInfo.active[0].url); 147 expectEquals(this.url_, prerenderInfo.active[0].url);
148 expectTrue(this.shouldSucceed_); 148 expectTrue(this.shouldSucceed_);
149 chrome.send('navigateToPrerender'); 149 chrome.send('navigateToPrerender', [this.url_]);
150 this.state_ = STATE.HISTORY_WAIT; 150 this.state_ = STATE.HISTORY_WAIT;
151 }, 151 },
152 152
153 /** 153 /**
154 * We expect to either see the failure url as an active entry, or see it 154 * We expect to either see the failure url as an active entry, or see it
155 * in the history. In the latter case, the test completes. 155 * in the history. In the latter case, the test completes.
156 * @param {Object} prerenderInfo State of prerendering pages. 156 * @param {Object} prerenderInfo State of prerendering pages.
157 */ 157 */
158 checkDone_: function(prerenderInfo) { 158 checkDone_: function(prerenderInfo) {
159 // If we see the url as active, continue running the test. 159 // If we see the url as active, continue running the test.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 */ 197 */
198 TEST_F('NetInternalsTest', 'netInternalsPrerenderViewFail', function() { 198 TEST_F('NetInternalsTest', 'netInternalsPrerenderViewFail', function() {
199 var taskQueue = new NetInternalsTest.TaskQueue(true); 199 var taskQueue = new NetInternalsTest.TaskQueue(true);
200 taskQueue.addTask( 200 taskQueue.addTask(
201 new NetInternalsTest.GetTestServerURLTask('files/download-test1.lib')); 201 new NetInternalsTest.GetTestServerURLTask('files/download-test1.lib'));
202 taskQueue.addTask(new PrerenderTask(false, 'Download')); 202 taskQueue.addTask(new PrerenderTask(false, 'Download'));
203 taskQueue.run(); 203 taskQueue.run();
204 }); 204 });
205 205
206 })(); // Anonymous namespace 206 })(); // Anonymous namespace
OLDNEW
« no previous file with comments | « chrome/test/data/prerender/prerender_loader_with_unload.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698