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

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

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 6 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/test/data/webui/mock_timer.js ('k') | chrome/test/data/webui/repeating_button_test.html » ('j') | 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
11 // @return {Array.<object>} List of events for an abbreviated URL request. 11 // @return {Array<object>} List of events for an abbreviated URL request.
12 function urlRequestEvents(id) { 12 function urlRequestEvents(id) {
13 return [ 13 return [
14 { 14 {
15 'phase': EventPhase.PHASE_BEGIN, 15 'phase': EventPhase.PHASE_BEGIN,
16 'source': { 16 'source': {
17 'id': id, 17 'id': id,
18 'type': EventSourceType.URL_REQUEST 18 'type': EventSourceType.URL_REQUEST
19 }, 19 },
20 'time': '953534778', 20 'time': '953534778',
21 'type': EventType.REQUEST_ALIVE 21 'type': EventType.REQUEST_ALIVE
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 ]; 96 ];
97 } 97 }
98 98
99 /** 99 /**
100 * Tests the filters, both in terms of filtering correctly and UI. 100 * Tests the filters, both in terms of filtering correctly and UI.
101 */ 101 */
102 TEST_F('NetInternalsTest', 'netInternalsEventsViewFilter', function() { 102 TEST_F('NetInternalsTest', 'netInternalsEventsViewFilter', function() {
103 // Sets the filter and checks the results. 103 // Sets the filter and checks the results.
104 // @param {string} filter Filter to use. 104 // @param {string} filter Filter to use.
105 // @param {Array.<boolean>} matches Ordered list of whether or not each source 105 // @param {Array<boolean>} matches Ordered list of whether or not each source
106 // matches |filter|. Order must match display order after applying the 106 // matches |filter|. Order must match display order after applying the
107 // filter. 107 // filter.
108 function checkFilter(filter, matches) { 108 function checkFilter(filter, matches) {
109 EventsView.getInstance().setFilterText_(filter); 109 EventsView.getInstance().setFilterText_(filter);
110 110
111 var postFilter = 0; 111 var postFilter = 0;
112 for (var i = 0; i < matches.length; ++i) { 112 for (var i = 0; i < matches.length; ++i) {
113 if (matches[i]) 113 if (matches[i])
114 ++postFilter; 114 ++postFilter;
115 } 115 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 $(EventsView.SORT_BY_SOURCE_TYPE_ID).click(); 240 $(EventsView.SORT_BY_SOURCE_TYPE_ID).click();
241 expectEquals('sort:source text', eventsView.getFilterText_()); 241 expectEquals('sort:source text', eventsView.getFilterText_());
242 eventsView.setFilterText_('text sort:id "more text"'); 242 eventsView.setFilterText_('text sort:id "more text"');
243 $(EventsView.SORT_BY_ID_ID).click(); 243 $(EventsView.SORT_BY_ID_ID).click();
244 expectEquals('-sort:id text "more text"', eventsView.getFilterText_()); 244 expectEquals('-sort:id text "more text"', eventsView.getFilterText_());
245 245
246 testDone(); 246 testDone();
247 }); 247 });
248 248
249 })(); // Anonymous namespace 249 })(); // Anonymous namespace
OLDNEW
« no previous file with comments | « chrome/test/data/webui/mock_timer.js ('k') | chrome/test/data/webui/repeating_button_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698