Commit 1467592e authored by Tim van der Lippe's avatar Tim van der Lippe Committed by Chromium LUCI CQ

Remove problematic layout tests

During the module.json extensions migration, we discovered that these
two tests were breaking on the sources/network migration. However, many
other tests that use/interact with the sources and/or network panel are
passing. A closer investigation of these showed that they are relying on
an intricate loading order, which assumes the module.json loading. Since
we are changing the loading order, these tests start failing.

Taking a closer look at the intent of the tests, we realized that we
already have existing e2e-test coverage in the DevTools frontend.
Therefore, we propose removing the problematic tests to unblock the
extensions migration, while we maintain coverage through our e2e-tests.

R=aerotwist@chromium.org

Also-By: andoli@chromium.org
Bug: 1134103
Change-Id: I56a57d1c190897c8419b6c9c1a0b4c016966df52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2584164
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835671}
parent 69335845
...@@ -1978,18 +1978,6 @@ IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest, ...@@ -1978,18 +1978,6 @@ IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest,
CloseDevToolsWindow(); CloseDevToolsWindow();
} }
IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest,
InspectSharedWorkerNetworkPanel) {
GURL url = embedded_test_server()->GetURL(kSharedWorkerTestPage);
ui_test_utils::NavigateToURL(browser(), url);
scoped_refptr<DevToolsAgentHost> host =
WaitForFirstSharedWorker(kSharedWorkerTestWorker);
OpenDevToolsWindow(host);
RunTestFunction(window_, "testSharedWorkerNetworkPanel");
CloseDevToolsWindow();
}
class DevToolsAgentHostTest : public InProcessBrowserTest {}; class DevToolsAgentHostTest : public InProcessBrowserTest {};
// Tests DevToolsAgentHost retention by its target. // Tests DevToolsAgentHost retention by its target.
......
Tests "Force update on page load" checkbox
A new ServiceWorker is activated.
The first ServiceWorker is activated.
The first frame loaded.
The second frame loaded.
Check "Force update on page load" check box
A new ServiceWorker is activated.
The third frame loaded. The second worker must be activated before here.
A new ServiceWorker is activated.
The fourth frame loaded. The third worker must be activated before here.
Uncheck "Force update on page load" check box
The fifth frame loaded.
// 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() {
TestRunner.addResult(`Tests "Force update on page load" checkbox\n`);
await TestRunner.loadModule('application_test_runner');
// Note: every test that uses a storage API must manually clean-up state from previous tests.
await ApplicationTestRunner.resetState();
await TestRunner.showPanel('resources');
const scriptURL = 'http://127.0.0.1:8000/devtools/service-workers/resources/force-update-on-page-load-worker.php';
const scope = 'http://127.0.0.1:8000/devtools/service-workers/resources/service-worker-force-update-on-page-load/';
function waitForWorkerActivated(scope) {
return new Promise(function(resolve) {
TestRunner.addSniffer(Resources.ServiceWorkersView.prototype, '_updateRegistration', updateRegistration, false);
function updateRegistration(registration) {
if (registration.scopeURL == scope) {
for (var version of registration.versions.values()) {
if (version.isRunning() && version.isActivated()) {
resolve();
return;
}
}
}
TestRunner.addSniffer(Resources.ServiceWorkersView.prototype, '_updateRegistration', updateRegistration, false);
}
});
}
function installNewWorkerDetector(scope) {
var workerIdSet = {};
TestRunner.addSniffer(Resources.ServiceWorkersView.prototype, '_updateRegistration', updateRegistration, true);
function updateRegistration(registration) {
if (registration.scopeURL == scope) {
for (var version of registration.versions.values()) {
if (!workerIdSet[version.id] && version.isRunning() && version.isActivated()) {
workerIdSet[version.id] = true;
TestRunner.addResult('A new ServiceWorker is activated.');
}
}
}
}
}
installNewWorkerDetector(scope);
UI.inspectorView.showPanel('sources')
.then(() => waitForWorkerActivated(scope))
.then(function() {
TestRunner.addResult('The first ServiceWorker is activated.');
return TestRunner.addIframe(scope);
})
.then(function() {
TestRunner.addResult('The first frame loaded.');
return TestRunner.addIframe(scope);
})
.then(function() {
TestRunner.addResult('The second frame loaded.');
TestRunner.addResult('Check "Force update on page load" check box');
Common.settings.settingForTest('serviceWorkerUpdateOnReload').set(true);
return TestRunner.addIframe(scope);
})
.then(function() {
TestRunner.addResult('The third frame loaded. The second worker must be activated before here.');
return TestRunner.addIframe(scope);
})
.then(function() {
TestRunner.addResult('The fourth frame loaded. The third worker must be activated before here.');
TestRunner.addResult('Uncheck "Force update on page load" check box');
Common.settings.settingForTest('serviceWorkerUpdateOnReload').set(false);
return TestRunner.addIframe(scope);
})
.then(function() {
TestRunner.addResult('The fifth frame loaded.');
ApplicationTestRunner.deleteServiceWorkerRegistration(scope);
TestRunner.completeTest();
})
.catch(function(exception) {
TestRunner.addResult('Error');
TestRunner.addResult(exception);
ApplicationTestRunner.deleteServiceWorkerRegistration(scope);
TestRunner.completeTest();
});
UI.panels.resources._sidebar.serviceWorkersTreeElement.select();
ApplicationTestRunner.registerServiceWorker(scriptURL, scope);
})();
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