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

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

Issue 7553009: Add some browser tests for net-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/webui/net_internals/prerender_view.js ('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 /** 5 /**
6 * Navigates to the test tab, runs the test suite |totalIterations| times, using 6 * Navigates to the test tab, runs the test suite |totalIterations| times, using
7 * |url|, and expects to see |expectedResult| from each iteration. Checks the 7 * |url|, and expects to see |expectedResult| from each iteration. Checks the
8 * order and several fields of the events received. 8 * order and several fields of the events received.
9 */ 9 */
10 netInternalsTest.test('NetInternalsTestView', 10 netInternalsTest.test('NetInternalsTestView',
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 expectFalse(this.seenStartExperiment_, 105 expectFalse(this.seenStartExperiment_,
106 'Suite stopped while experiment was still running.'); 106 'Suite stopped while experiment was still running.');
107 expectEquals(12, this.experimentsRun_, 107 expectEquals(12, this.experimentsRun_,
108 'Incorrect number of experiments run.'); 108 'Incorrect number of experiments run.');
109 checkTestTableRows(this.experimentsRun_); 109 checkTestTableRows(this.experimentsRun_);
110 110
111 ++this.completedIterations_; 111 ++this.completedIterations_;
112 if (this.completedIterations_ < this.totalIterations_) { 112 if (this.completedIterations_ < this.totalIterations_) {
113 this.startTestSuite(); 113 this.startTestSuite();
114 } else { 114 } else {
115 netInternalsTest.testDone(); 115 asyncTestDone();
116 } 116 }
117 } 117 }
118 }; 118 };
119 119
120 /** 120 /**
121 * Checks that there are |expected| rows in the test table. 121 * Checks that there are |expected| rows in the test table.
122 * @param {number} expectedRows Expected number of rows in the table. 122 * @param {number} expectedRows Expected number of rows in the table.
123 */ 123 */
124 function checkTestTableRows(expectedRows) { 124 function checkTestTableRows(expectedRows) {
125 netInternalsTest.checkStyledTableRows(SUMMARY_DIV_ID, expectedRows); 125 netInternalsTest.checkStyledTableRows(SUMMARY_DIV_ID, expectedRows);
126 } 126 }
127 127
128 netInternalsTest.switchToView('tests'); 128 netInternalsTest.switchToView('tests');
129 129
130 // Create observer and start the test. 130 // Create observer and start the test.
131 var testObserver = new TestObserver(url, expectedResult, totalIterations); 131 var testObserver = new TestObserver(url, expectedResult, totalIterations);
132 g_browser.addConnectionTestsObserver(testObserver); 132 g_browser.addConnectionTestsObserver(testObserver);
133 testObserver.startTestSuite(); 133 testObserver.startTestSuite();
134 }); 134 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/net_internals/prerender_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698