Commit 8cc471ec authored by Tim van der Lippe's avatar Tim van der Lippe Committed by Commit Bot

Remove DevTools startup layout test

This test was replaced by an e2etest in
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2083316

TBR=aerotwist@chromium.org

Bug: 1044632
Change-Id: Ie1fd5772d3139aa4b61a725cd271bd4bf6feec60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2084853Reviewed-by: default avatarTim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746369}
parent 18720166
Tests that scripts for dynamically added script elements are shown in sources panel if inspector is opened after the scripts were loaded. https://bugs.webkit.org/show_bug.cgi?id=99324
UISourceCodes:
dynamic-script.js
dynamic-scripts.html
evalSourceURL.js
scriptElementContentSourceURL.js
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
await TestRunner.setupStartupTest('resources/dynamic-scripts.html');
TestRunner.addResult(
`Tests that scripts for dynamically added script elements are shown in sources panel if inspector is opened after the scripts were loaded. https://bugs.webkit.org/show_bug.cgi?id=99324\n`);
await TestRunner.loadModule('sources_test_runner');
SourcesTestRunner.startDebuggerTest(step2);
function step2() {
TestRunner.deprecatedRunAfterPendingDispatches(step3);
}
function step3() {
var panel = UI.panels.sources;
var uiSourceCodes = Workspace.workspace.uiSourceCodesForProjectType(Workspace.projectTypes.Network);
var urls = uiSourceCodes.map(function(uiSourceCode) {
return uiSourceCode.name();
});
urls.sort();
var whiteList = [
'dynamic-script.js', 'dynamic-scripts.html', 'evalSourceURL.js', 'scriptElementContentSourceURL.js'
];
function filter(url) {
for (var i = 0; i < whiteList.length; ++i) {
if (url.indexOf(whiteList[i]) !== -1)
return true;
}
return false;
}
urls = urls.filter(filter);
TestRunner.addResult('UISourceCodes:');
for (var i = 0; i < urls.length; ++i)
TestRunner.addResult(' ' + urls[i]);
SourcesTestRunner.completeDebuggerTest();
}
})();
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script>
function appendDynamicScriptElement(src, content)
{
var scriptElement = document.createElement("script");
if (src)
scriptElement.src = src;
else
scriptElement.textContent = content;
document.head.appendChild(scriptElement);
}
function loadScripts()
{
var sourceURLComment = "\n //# sourceURL=";
window.eval("function fooEval() {}");
window.eval("function fooEvalSourceURL() {}" + sourceURLComment + "evalSourceURL.js");
appendDynamicScriptElement("", "function fooScriptElementContent1() {}");
appendDynamicScriptElement("", "function fooScriptElementContent2() {}");
appendDynamicScriptElement("", "function fooScriptElementContentSourceURL() {}" + sourceURLComment + "scriptElementContentSourceURL.js");
appendDynamicScriptElement("dynamic-script.js");
}
function scriptLoaded()
{
testRunner.inspectSecondaryWindow();
}
</script>
</head>
<body onload="loadScripts()">
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment