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

Side by Side Diff: chrome/test/data/devtools/target_list/background.js

Issue 730433003: [DevTools] Remote frontend is now embedded to iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, fixed test Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 var REMOTE_DEBUGGER_HOST = 'localhost:9222'; 5 var REMOTE_DEBUGGER_HOST = 'localhost:9222';
6 6
7 function requestUrl(path, callback) { 7 function requestUrl(path, callback) {
8 var req = new XMLHttpRequest(); 8 var req = new XMLHttpRequest();
9 req.open('GET', 'http://' + REMOTE_DEBUGGER_HOST + path, true); 9 req.open('GET', 'http://' + REMOTE_DEBUGGER_HOST + path, true);
10 req.onload = function() { 10 req.onload = function() {
(...skipping 11 matching lines...) Expand all
22 22
23 function checkTarget(targets, url, type, opt_title, opt_faviconUrl) { 23 function checkTarget(targets, url, type, opt_title, opt_faviconUrl) {
24 var target = 24 var target =
25 targets.filter(function(t) { return t.url == url }) [0]; 25 targets.filter(function(t) { return t.url == url }) [0];
26 if (!target) 26 if (!target)
27 chrome.test.fail('Cannot find a target with url ' + url); 27 chrome.test.fail('Cannot find a target with url ' + url);
28 28
29 var wsAddress = REMOTE_DEBUGGER_HOST + '/devtools/page/' + target.id; 29 var wsAddress = REMOTE_DEBUGGER_HOST + '/devtools/page/' + target.id;
30 30
31 chrome.test.assertEq( 31 chrome.test.assertEq(
32 '/devtools/devtools.html?ws=' + wsAddress, 32 '/devtools/inspector.html?ws=' + wsAddress,
33 target.devtoolsFrontendUrl); 33 target.devtoolsFrontendUrl);
34 // On some platforms (e.g. Chrome OS) target.faviconUrl might be empty for 34 // On some platforms (e.g. Chrome OS) target.faviconUrl might be empty for
35 // a freshly created tab. Ignore the check then. 35 // a freshly created tab. Ignore the check then.
36 if (target.faviconUrl && opt_faviconUrl) 36 if (target.faviconUrl && opt_faviconUrl)
37 chrome.test.assertEq(opt_faviconUrl, target.faviconUrl); 37 chrome.test.assertEq(opt_faviconUrl, target.faviconUrl);
38 // Sometimes thumbnailUrl is not available for a freshly loaded tab. 38 // Sometimes thumbnailUrl is not available for a freshly loaded tab.
39 if (target.thumbnailUrl) 39 if (target.thumbnailUrl)
40 chrome.test.assertEq('/thumb/' + target.id, target.thumbnailUrl); 40 chrome.test.assertEq('/thumb/' + target.id, target.thumbnailUrl);
41 chrome.test.assertEq(opt_title || target.url, target.title); 41 chrome.test.assertEq(opt_title || target.url, target.title);
42 chrome.test.assertEq(type, target.type); 42 chrome.test.assertEq(type, target.type);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 }, 245 },
246 246
247 function newSpecificPage() { 247 function newSpecificPage() {
248 runNewPageTest('/json/new?chrome://version/', "chrome://version/"); 248 runNewPageTest('/json/new?chrome://version/', "chrome://version/");
249 }, 249 },
250 250
251 function newDefaultPage() { 251 function newDefaultPage() {
252 runNewPageTest('/json/new', "about:blank"); 252 runNewPageTest('/json/new', "about:blank");
253 } 253 }
254 ]); 254 ]);
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/devtools_ui.cc ('k') | chromecast/browser/devtools/remote_debugging_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698