Commit 8602a98c authored by Tim van der Lippe's avatar Tim van der Lippe Committed by Commit Bot

Remove layout tests that were ported to e2etests

These tests were ported in
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2074760
and
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2077665
and run on the DevTools CQ.

Bug: 1044632
Change-Id: Ie68e4ffc2d1a1145d08e564e9d6e0aad79d4509f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2077737
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: default avatarPaul Lewis <aerotwist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745429}
parent ef3296a1
Tests that Web Inspector gets populated with databases that were opened before inspector is shown.
Name: InspectorDatabaseTest
Version: 1.0
Domain: 127.0.0.1
Name: InspectorDatabaseTest2
Version: 1.0
Domain: 127.0.0.1
// 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/database-open.html');
TestRunner.addResult(
`Tests that Web Inspector gets populated with databases that were opened before inspector is shown.\n`);
await TestRunner.loadModule('application_test_runner');
ApplicationTestRunner.databaseModel().enable();
function run() {
function compareByName(d1, d2) {
if (d1.name < d2.name)
return -1;
if (d1.name > d2.name)
return 1;
return 0;
}
var databases = ApplicationTestRunner.databaseModel().databases();
databases.sort(compareByName);
for (var i = 0; i < databases.length; ++i) {
TestRunner.addResult('Name: ' + databases[i].name);
TestRunner.addResult('Version: ' + databases[i].version);
TestRunner.addResult('Domain: ' + databases[i].domain);
}
TestRunner.completeTest();
}
TestRunner.deprecatedRunAfterPendingDispatches(run);
})();
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script>
function onload()
{
var db = openDatabase("InspectorDatabaseTest", "1.0", "Test of database instrumentation", 1);
var db2 = openDatabase("InspectorDatabaseTest2", "1.0", "Test of database instrumentation 2", 1);
testRunner.inspectSecondaryWindow();
}
</script>
</head>
<body onload="onload()">
</body>
</html>
<html>
<head>
<script src="../../../../../devtools/sources/debugger/resources/unformatted4.js"></script>
<script>
function f1()
{
var a=0;var b=1;var c=3;var d=4;var e=5;
var f=0;
return 0;
}
</script>
</head>
<body onload="testRunner.inspectSecondaryWindow()">
</body>
</html>
Tests the script formatting is working fine with breakpoints.
Running: testSetup
Running: testBreakpointSetInOriginalAndRemovedInFormatted
Adding breakpoint.
Formatting.
Removing breakpoint.
Unformatting.
// 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/script-formatter-breakpoints-4.html');
TestRunner.addResult(`Tests the script formatting is working fine with breakpoints.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.showPanel('sources');
Bindings.breakpointManager._storage._breakpoints = new Map();
var panel = UI.panels.sources;
var scriptFormatter;
SourcesTestRunner.runDebuggerTestSuite([
function testSetup(next) {
SourcesTestRunner.scriptFormatter().then(function(sf) {
scriptFormatter = sf;
next();
});
},
function testBreakpointSetInOriginalAndRemovedInFormatted(next) {
SourcesTestRunner.showScriptSource('script-formatter-breakpoints-4.html', didShowScriptSource);
async function didShowScriptSource(sourceFrame) {
TestRunner.addResult('Adding breakpoint.');
TestRunner.addSniffer(
Bindings.BreakpointManager.ModelBreakpoint.prototype,
'_addResolvedLocation', breakpointResolved);
await SourcesTestRunner.setBreakpoint(sourceFrame, 9, '', true);
}
function breakpointResolved() {
TestRunner.addResult('Formatting.');
TestRunner.addSniffer(
Sources.ScriptFormatterEditorAction.prototype, '_updateButton', uiSourceCodeScriptFormatted);
scriptFormatter._toggleFormatScriptSource();
}
async function uiSourceCodeScriptFormatted() {
TestRunner.addResult('Removing breakpoint.');
var formattedSourceFrame = panel.visibleView;
await SourcesTestRunner.waitUntilDebuggerPluginLoaded(
formattedSourceFrame);
await SourcesTestRunner.removeBreakpoint(formattedSourceFrame, 11);
TestRunner.addResult('Unformatting.');
await Formatter.sourceFormatter.discardFormattedUISourceCode(panel.visibleView.uiSourceCode());
var breakpoints = Bindings.breakpointManager._storage._setting.get();
TestRunner.assertEquals(breakpoints.length, 0, 'There should not be any breakpoints in the storage.');
next();
}
}
]);
})();
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