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

Side by Side Diff: chrome/browser/resources/net_internals/test_view.js

Issue 7564029: Use javascript strict mode throughout a number of net-internals files. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix one more var 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
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 * This view displays the progress and results from the "connection tester". 6 * This view displays the progress and results from the "connection tester".
7 * 7 *
8 * - Has an input box to specify the URL. 8 * - Has an input box to specify the URL.
9 * - Has a button to start running the tests. 9 * - Has a button to start running the tests.
10 * - Shows the set of experiments that have been run so far, and their 10 * - Shows the set of experiments that have been run so far, and their
11 * result. 11 * result.
12 */ 12 */
13 var TestView = (function() {
14 'use strict';
13 15
14 var TestView = (function() {
15 // IDs for special HTML elements in test_view.html 16 // IDs for special HTML elements in test_view.html
16 const MAIN_BOX_ID = 'test-view-tab-content'; 17 var MAIN_BOX_ID = 'test-view-tab-content';
17 const URL_INPUT_ID = 'test-view-url-input'; 18 var URL_INPUT_ID = 'test-view-url-input';
18 const FORM_ID = 'test-view-connection-tests-form'; 19 var FORM_ID = 'test-view-connection-tests-form';
19 const SUMMARY_DIV_ID = 'test-view-summary'; 20 var SUMMARY_DIV_ID = 'test-view-summary';
20 21
21 // We inherit from DivView. 22 // We inherit from DivView.
22 var superClass = DivView; 23 var superClass = DivView;
23 24
24 /** 25 /**
25 * @constructor 26 * @constructor
26 */ 27 */
27 function TestView() { 28 function TestView() {
29 assertFirstConstructorCall(TestView);
30
28 // Call superclass's constructor. 31 // Call superclass's constructor.
29 superClass.call(this, MAIN_BOX_ID); 32 superClass.call(this, MAIN_BOX_ID);
30 33
31 this.urlInput_ = $(URL_INPUT_ID); 34 this.urlInput_ = $(URL_INPUT_ID);
32 this.summaryDiv_ = $(SUMMARY_DIV_ID); 35 this.summaryDiv_ = $(SUMMARY_DIV_ID);
33 36
34 var form = $(FORM_ID); 37 var form = $(FORM_ID);
35 form.addEventListener('submit', this.onSubmitForm_.bind(this), false); 38 form.addEventListener('submit', this.onSubmitForm_.bind(this), false);
36 39
37 // Register to test information as it's received. 40 // Register to test information as it's received.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 * Callback for when the last test in the suite has finished. 147 * Callback for when the last test in the suite has finished.
145 */ 148 */
146 onCompletedConnectionTestSuite: function() { 149 onCompletedConnectionTestSuite: function() {
147 var p = addNode(this.summaryDiv_, 'p'); 150 var p = addNode(this.summaryDiv_, 'p');
148 addTextNode(p, 'Completed connection test suite suite'); 151 addTextNode(p, 'Completed connection test suite suite');
149 } 152 }
150 }; 153 };
151 154
152 return TestView; 155 return TestView;
153 })(); 156 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/spdy_view.js ('k') | chrome/browser/resources/net_internals/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698