Skip to content

Commit

Permalink
Load legacy modules in DevTools layout tests 1/n
Browse files Browse the repository at this point in the history
R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I57e9b3a8694916092236bf4863c8569d1e6e6974
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2749216
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861970}
  • Loading branch information
TimvdLippe authored and Chromium LUCI CQ committed Mar 11, 2021
1 parent 8addf93 commit ed6e264
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TestRunner.addResult(`Tests that the changes view highlights diffs correctly.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadModule('changes');
await TestRunner.loadLegacyModule('changes');
await TestRunner.showPanel('sources');
await TestRunner.addStylesheetTag('resources/before.css');
await TestRunner.addStylesheetTag('resources/after.css');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(async function() {
TestRunner.addResult(`Tests that the changes sidebar contains the changed uisourcecodes.\n`);
await TestRunner.loadModule('changes');
await TestRunner.loadLegacyModule('changes');

var fulfill = function() {};
var workspace = new Workspace.Workspace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,7 @@
TestRunner.completeTest();
}

self.runtime.loadModulePromise('cookie_table').then(run);
await self.runtime.loadModulePromise('cookie_table');
await TestRunner.loadLegacyModule('cookie_table');
run();
})();
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(async function() {
TestRunner.addResult(`Tests that Linkifier works correctly.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('sources');
await TestRunner.evaluateInPagePromise(`function foo () {} //# sourceURL=linkifier.js`)
var script;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TestRunner.addResult(`Test that console.log() would linkify the links. Bug 231074.\n`);

await TestRunner.loadModule('console_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('console');
await TestRunner.evaluateInPagePromise(`
console.log("www.chromium.org");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(async function() {
TestRunner.addResult(`Tests the tooltip for the image on hover.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('elements');
const imgURL = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANcAAACuCAIAAAAqMg/rAAAAAXNSR0IArs4c6QAAAU9JREFUeNrt0jERAAAIxDDAv+dHAxNLIqHXTlLwaiTAheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSF4EJcCC7EheBCXAguxIXgQlwILsSFEuBCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLgQX4kJwIS4EF+JCcCEuBBfiQnAhLoSDBZXqBFnkRyeqAAAAAElFTkSuQmCC`;
await TestRunner.loadHTML(`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
await TestRunner.loadModule('console_test_runner');
await TestRunner.loadModule('extensions_test_runner');
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadLegacyModule('components');

TestRunner.clickOnURL = async function() {
await UI.viewManager.showView("console").then(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

(async function() {
await TestRunner.loadModule('help');
await TestRunner.loadLegacyModule('help');

TestRunner.addResult(`Unit test for release note\n`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

(async function() {
await TestRunner.loadModule('help');
await TestRunner.loadLegacyModule('help');

TestRunner.addResult(`Test release note\n`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TestRunner.addResult(`Tests that jumping to previous location works as intended.\n`);
await TestRunner.loadModule('console_test_runner');
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('sources');
await TestRunner.addScriptTag('resources/example-fileset-for-test.js');
await TestRunner.addScriptTag('resources/jump-text.js');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(async function() {
TestRunner.addResult(`Tests how execution context and target are selected.\n`);
await TestRunner.loadModule('sdk_test_runner');
await TestRunner.loadLegacyModule('main');
await TestRunner.showPanel('sources');

var context = new UI.Context();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Tests asynchronous network initiator for image loaded from JS.

async-callstack-network-initiator-image.js:14
async-callstack-network-initiator-image.js:15

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TestRunner.addResult(`Tests asynchronous network initiator for image loaded from JS.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadModule('console_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('sources');
await TestRunner.evaluateInPagePromise(`
function testFunction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TestRunner.addResult(`Tests that mobile, network, and CPU throttling interact with each other logically.\n`);
await TestRunner.showPanel("network");
await TestRunner.showPanel("timeline");
await TestRunner.loadLegacyModule('emulation');
await UI.viewManager.showView("network.config");

var deviceModeView = new Emulation.DeviceModeView();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
It expects two FunctionCall for InjectedScript, two TimerInstall events, two FunctionCall events and one TimerRemove event to be logged with performActions.js script name and some line number.

detailsTextContent for TimerInstall event: 'performActions.js:32'
details.textContent for TimerInstall event: 'performActions.js:32'
detailsTextContent for TimerInstall event: 'performActions.js:33'
details.textContent for TimerInstall event: 'performActions.js:33'
detailsTextContent for FunctionCall event: 'performActions.js:37'
details.textContent for FunctionCall event: 'intervalTimerWork @ performActions.js:37'
detailsTextContent for FunctionCall event: 'performActions.js:37'
details.textContent for FunctionCall event: 'intervalTimerWork @ performActions.js:37'
detailsTextContent for TimerRemove event: 'performActions.js:40'
details.textContent for TimerRemove event: 'performActions.js:40'
detailsTextContent for TimerInstall event: 'performActions.js:34'
details.textContent for TimerInstall event: 'performActions.js:34'
detailsTextContent for FunctionCall event: 'performActions.js:38'
details.textContent for FunctionCall event: 'intervalTimerWork @ performActions.js:38'
detailsTextContent for FunctionCall event: 'performActions.js:38'
details.textContent for FunctionCall event: 'intervalTimerWork @ performActions.js:38'
detailsTextContent for TimerRemove event: 'performActions.js:41'
details.textContent for TimerRemove event: 'performActions.js:41'

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
`Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
It expects two FunctionCall for InjectedScript, two TimerInstall events, two FunctionCall events and one TimerRemove event to be logged with performActions.js script name and some line number.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('timeline');

function performActions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(async function() {
TestRunner.addResult(`Test that causes are correctly generated for various types of events.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<div id="testElement"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TestRunner.addResult(`Tests the Timeline API instrumentation of a Layout event\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.loadModule('performance_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Priority: Low
Mime Type: string
Encoded Data: string
Decoded Body: 223 B
Initiator: timeline-network-resource-details.js:18
Initiator: timeline-network-resource-details.js:19
URL: anImage.png
Duration: string
Request Method: GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(async function() {
TestRunner.addResult(`Tests the Timeline UI API for network requests.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.loadLegacyModule('components');
await TestRunner.showPanel('timeline');
await TestRunner.evaluateInPagePromise(`
function performActions()
Expand Down

0 comments on commit ed6e264

Please sign in to comment.