Commit fbcffd3c authored by Matt Falkenhagen's avatar Matt Falkenhagen Committed by Commit Bot

service worker: Disable two unit tests when ServiceWorkerOnUI is on.

The code path these test doesn't happen when the feature is on:
* EmbeddedWorkerInstanceTest.DetachDuringProcessAllocation
* EmbeddedWorkerInstanceTest.StopDuringProcessAllocation

Bug: 824858
Change-Id: Iadfc474fc1a0acb56ec9562a17fed28023927931
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795530Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695401}
parent 6c5267fb
...@@ -337,6 +337,14 @@ TEST_F(EmbeddedWorkerInstanceTest, StopWhenDevToolsAttached) { ...@@ -337,6 +337,14 @@ TEST_F(EmbeddedWorkerInstanceTest, StopWhenDevToolsAttached) {
} }
TEST_F(EmbeddedWorkerInstanceTest, DetachDuringProcessAllocation) { TEST_F(EmbeddedWorkerInstanceTest, DetachDuringProcessAllocation) {
if (ServiceWorkerContext::IsServiceWorkerOnUIEnabled()) {
// This test calls Start() then Detach() to test detaching during process
// allocation. But when ServiceWorkerOnUI is enabled, Start() synchronously
// reaches the SetupOnUIThread() step, so process allocation occurs before
// Detach() is called, so this test doesn't make sense.
return;
}
const GURL scope("http://example.com/"); const GURL scope("http://example.com/");
const GURL url("http://example.com/worker.js"); const GURL url("http://example.com/worker.js");
...@@ -394,6 +402,14 @@ TEST_F(EmbeddedWorkerInstanceTest, DetachAfterSendingStartWorkerMessage) { ...@@ -394,6 +402,14 @@ TEST_F(EmbeddedWorkerInstanceTest, DetachAfterSendingStartWorkerMessage) {
} }
TEST_F(EmbeddedWorkerInstanceTest, StopDuringProcessAllocation) { TEST_F(EmbeddedWorkerInstanceTest, StopDuringProcessAllocation) {
if (ServiceWorkerContext::IsServiceWorkerOnUIEnabled()) {
// This test calls Start() then Stop() to test stopping during process
// allocation. But when ServiceWorkerOnUI is enabled, Start() synchronously
// reaches the SetupOnUIThread() step, so process allocation occurs before
// Stop() is called, so this test doesn't make sense.
return;
}
const GURL scope("http://example.com/"); const GURL scope("http://example.com/");
const GURL url("http://example.com/worker.js"); const GURL url("http://example.com/worker.js");
......
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