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

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

Issue 9521006: Cleanup some classnames to match style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase off head Created 8 years, 9 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/browser/resources/net_internals/test_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) 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 /** 5 /**
6 * @fileoverview The way these tests work is as follows: 6 * @fileoverview The way these tests work is as follows:
7 * C++ in net_internals_ui_browsertest.cc does any necessary setup, and then 7 * C++ in net_internals_ui_browsertest.cc does any necessary setup, and then
8 * calls the entry point for a test with RunJavascriptTest. The called 8 * calls the entry point for a test with RunJavascriptTest. The called
9 * function can then use the assert/expect functions defined in test_api.js. 9 * function can then use the assert/expect functions defined in test_api.js.
10 * All callbacks from the browser are wrapped in such a way that they can 10 * All callbacks from the browser are wrapped in such a way that they can
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 /** 131 /**
132 * Returns the first styled table body that's a descendent of |ancestorId|. 132 * Returns the first styled table body that's a descendent of |ancestorId|.
133 * If the specified node is itself a table body node, just returns that node. 133 * If the specified node is itself a table body node, just returns that node.
134 * Returns null if no such node is found. 134 * Returns null if no such node is found.
135 * @param {string} ancestorId HTML element id containing a styled table. 135 * @param {string} ancestorId HTML element id containing a styled table.
136 */ 136 */
137 NetInternalsTest.getStyledTableDescendent = function(ancestorId) { 137 NetInternalsTest.getStyledTableDescendent = function(ancestorId) {
138 if ($(ancestorId).nodeName == 'TBODY') 138 if ($(ancestorId).nodeName == 'TBODY')
139 return $(ancestorId); 139 return $(ancestorId);
140 // The tbody element of the first styled table in |parentId|. 140 // The tbody element of the first styled table in |parentId|.
141 return document.querySelector('#' + ancestorId + ' .styledTable tbody'); 141 return document.querySelector('#' + ancestorId + ' .styled-table tbody');
142 }; 142 };
143 143
144 /** 144 /**
145 * Finds the first styled table body that's a descendent of |ancestorId|, 145 * Finds the first styled table body that's a descendent of |ancestorId|,
146 * including the |ancestorId| element itself, and returns the number of rows 146 * including the |ancestorId| element itself, and returns the number of rows
147 * it has. Returns -1 if there's no such table. 147 * it has. Returns -1 if there's no such table.
148 * @param {string} ancestorId HTML element id containing a styled table. 148 * @param {string} ancestorId HTML element id containing a styled table.
149 * @return {number} Number of rows the style table's body has. 149 * @return {number} Number of rows the style table's body has.
150 */ 150 */
151 NetInternalsTest.getStyledTableNumRows = function(ancestorId) { 151 NetInternalsTest.getStyledTableNumRows = function(ancestorId) {
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 ]; 671 ];
672 672
673 for (var i = 0; i < allIds.length; ++i) { 673 for (var i = 0; i < allIds.length; ++i) {
674 var curId = allIds[i]; 674 var curId = allIds[i];
675 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId))); 675 expectEquals(nodeId == curId, NetInternalsTest.nodeIsVisible($(curId)));
676 } 676 }
677 }; 677 };
678 678
679 return NetInternalsTest; 679 return NetInternalsTest;
680 })(); 680 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/test_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698