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

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

Issue 519583005: Remove PrerenderManager.enabled_ and related members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove enabled from prerender_view.js. Created 6 years, 3 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 (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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /** 80 /**
81 * PrerenderInfoObserver function. Tracks state transitions, checks the 81 * PrerenderInfoObserver function. Tracks state transitions, checks the
82 * table sizes, and does some sanity checking on received data. 82 * table sizes, and does some sanity checking on received data.
83 * @param {object} prerenderInfo State of prerendering pages. 83 * @param {object} prerenderInfo State of prerendering pages.
84 */ 84 */
85 onPrerenderInfoChanged: function(prerenderInfo) { 85 onPrerenderInfoChanged: function(prerenderInfo) {
86 if (this.isDone()) 86 if (this.isDone())
87 return; 87 return;
88 88
89 // Verify that prerendering is enabled.
90 assertTrue(prerenderInfo.enabled, 'Prerendering not enabled.');
91
92 // Check number of rows in both tables. 89 // Check number of rows in both tables.
mmenke 2014/09/03 14:30:55 Per comment in other file, should add this back.
Bence 2014/09/03 17:05:18 Done.
93 NetInternalsTest.checkTbodyRows(PrerenderView.HISTORY_TABLE_ID, 90 NetInternalsTest.checkTbodyRows(PrerenderView.HISTORY_TABLE_ID,
94 prerenderInfo.history.length); 91 prerenderInfo.history.length);
95 NetInternalsTest.checkTbodyRows(PrerenderView.ACTIVE_TABLE_ID, 92 NetInternalsTest.checkTbodyRows(PrerenderView.ACTIVE_TABLE_ID,
96 prerenderInfo.active.length); 93 prerenderInfo.active.length);
97 94
98 if (this.state_ == STATE.START_PRERENDERING) { 95 if (this.state_ == STATE.START_PRERENDERING) {
99 this.startPrerendering_(prerenderInfo); 96 this.startPrerendering_(prerenderInfo);
100 } else if (this.state_ == STATE.NEED_NAVIGATE) { 97 } else if (this.state_ == STATE.NEED_NAVIGATE) {
101 // Can't safely swap in a prerender until the main frame has committed. 98 // Can't safely swap in a prerender until the main frame has committed.
102 // Waiting until the load has completed isn't necessary, but it's simpler. 99 // Waiting until the load has completed isn't necessary, but it's simpler.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 */ 194 */
198 TEST_F('NetInternalsTest', 'netInternalsPrerenderViewFail', function() { 195 TEST_F('NetInternalsTest', 'netInternalsPrerenderViewFail', function() {
199 var taskQueue = new NetInternalsTest.TaskQueue(true); 196 var taskQueue = new NetInternalsTest.TaskQueue(true);
200 taskQueue.addTask( 197 taskQueue.addTask(
201 new NetInternalsTest.GetTestServerURLTask('files/download-test1.lib')); 198 new NetInternalsTest.GetTestServerURLTask('files/download-test1.lib'));
202 taskQueue.addTask(new PrerenderTask(false, 'Download')); 199 taskQueue.addTask(new PrerenderTask(false, 'Download'));
203 taskQueue.run(); 200 taskQueue.run();
204 }); 201 });
205 202
206 })(); // Anonymous namespace 203 })(); // Anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698