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

Side by Side Diff: chrome/test/data/webui/inspect_ui_test.js

Issue 560523004: DevTools: Made id unique across different remote browsers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed leak in test Created 6 years, 2 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/browser/resources/inspect/inspect.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 function waitForElements(selector, populateFunctionName, callback) { 5 function waitForElements(selector, populateFunctionName, callback) {
6 var elements = document.querySelectorAll(selector); 6 var elements = document.querySelectorAll(selector);
7 if (elements.length) { 7 if (elements.length) {
8 callback(elements); 8 callback(elements);
9 return; 9 return;
10 } 10 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 var chromeBrowser = findByContentSubstring( 60 var chromeBrowser = findByContentSubstring(
61 browsers, 'Chrome (32.0.1679.0)', '.browser-name'); 61 browsers, 'Chrome (32.0.1679.0)', '.browser-name');
62 expectNotEquals(undefined, chromeBrowser); 62 expectNotEquals(undefined, chromeBrowser);
63 63
64 var chromePages = chromeBrowser.querySelectorAll('.pages'); 64 var chromePages = chromeBrowser.querySelectorAll('.pages');
65 var chromiumPage = findByContentSubstring( 65 var chromiumPage = findByContentSubstring(
66 chromePages, 'http://www.chromium.org/', '.url'); 66 chromePages, 'http://www.chromium.org/', '.url');
67 expectNotEquals(undefined, chromiumPage); 67 expectNotEquals(undefined, chromiumPage);
68 68
69 var pageById = {};
70 Array.prototype.forEach.call(devices, function (device) {
71 var pages = device.querySelectorAll('.row');
72 Array.prototype.forEach.call(pages, function (page) {
73 expectEquals(undefined, pageById[page.targetId]);
74 pageById[page.targetId] = page;
75 });
76 });
77
69 var webView = findByContentSubstring( 78 var webView = findByContentSubstring(
70 browsers, 'WebView in com.sample.feed (4.0)', '.browser-name'); 79 browsers, 'WebView in com.sample.feed (4.0)', '.browser-name');
71 expectNotEquals(undefined, webView); 80 expectNotEquals(undefined, webView);
72 81
73 testDone(); 82 testDone();
74 }); 83 });
75 } 84 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/inspect/inspect.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698