| Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp
|
| index 13eff21c12b6eaa5f44b2ada0c914c31fba21604..3e7546d57bda3b087cb3831dbb102a8c24fff024 100644
|
| --- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp
|
| +++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp
|
| @@ -47,7 +47,6 @@
|
|
|
| m_startData.scriptURL = scriptURL;
|
| m_startData.userAgent = WebString("dummy user agent");
|
| - m_startData.pauseAfterDownloadMode = WebEmbeddedWorkerStartData::DontPauseAfterDownload;
|
| m_startData.waitForDebuggerMode = WebEmbeddedWorkerStartData::DontWaitForDebugger;
|
| m_startData.v8CacheOptions = WebSettings::V8CacheOptionsDefault;
|
| }
|
| @@ -104,37 +103,6 @@
|
| ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| }
|
|
|
| -TEST_F(WebEmbeddedWorkerImplTest, TerminateWhilePausedAfterDownload)
|
| -{
|
| - EXPECT_CALL(*m_mockClient, workerReadyForInspection())
|
| - .Times(1);
|
| - m_startData.pauseAfterDownloadMode = WebEmbeddedWorkerStartData::PauseAfterDownload;
|
| - m_worker->startWorkerContext(m_startData);
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -
|
| - // Load the shadow page.
|
| - EXPECT_CALL(*m_mockClient, createServiceWorkerNetworkProvider(::testing::_))
|
| - .WillOnce(::testing::Return(nullptr));
|
| - Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -
|
| - // Load the script.
|
| - EXPECT_CALL(*m_mockClient, workerScriptLoaded())
|
| - .Times(1);
|
| - EXPECT_CALL(*m_mockClient, createServiceWorkerProvider())
|
| - .Times(0);
|
| - Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -
|
| - // Terminate before resuming after download.
|
| - EXPECT_CALL(*m_mockClient, createServiceWorkerProvider())
|
| - .Times(0);
|
| - EXPECT_CALL(*m_mockClient, workerContextFailedToStart())
|
| - .Times(1);
|
| - m_worker->terminateWorkerContext();
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -}
|
| -
|
| TEST_F(WebEmbeddedWorkerImplTest, ScriptNotFound)
|
| {
|
| WebURL scriptURL = URLTestHelpers::toKURL("https://www.example.com/sw-404.js");
|
| @@ -170,14 +138,13 @@
|
| ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| }
|
|
|
| -// The running worker is detected as a memory leak. crbug.com/586897
|
| #if defined(ADDRESS_SANITIZER)
|
| -#define MAYBE_DontPauseAfterDownload DISABLED_DontPauseAfterDownload
|
| +#define MAYBE_Success DISABLED_Success
|
| #else
|
| -#define MAYBE_DontPauseAfterDownload DontPauseAfterDownload
|
| +#define MAYBE_Success Success
|
| #endif
|
|
|
| -TEST_F(WebEmbeddedWorkerImplTest, DontPauseAfterDownload)
|
| +TEST_F(WebEmbeddedWorkerImplTest, MAYBE_Success)
|
| {
|
| EXPECT_CALL(*m_mockClient, workerReadyForInspection())
|
| .Times(1);
|
| @@ -199,40 +166,4 @@
|
| ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| }
|
|
|
| -// The running worker is detected as a memory leak. crbug.com/586897
|
| -#if defined(ADDRESS_SANITIZER)
|
| -#define MAYBE_PauseAfterDownload DISABLED_PauseAfterDownload
|
| -#else
|
| -#define MAYBE_PauseAfterDownload PauseAfterDownload
|
| -#endif
|
| -
|
| -TEST_F(WebEmbeddedWorkerImplTest, PauseAfterDownload)
|
| -{
|
| - EXPECT_CALL(*m_mockClient, workerReadyForInspection())
|
| - .Times(1);
|
| - m_startData.pauseAfterDownloadMode = WebEmbeddedWorkerStartData::PauseAfterDownload;
|
| - m_worker->startWorkerContext(m_startData);
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -
|
| - // Load the shadow page.
|
| - EXPECT_CALL(*m_mockClient, createServiceWorkerNetworkProvider(::testing::_))
|
| - .WillOnce(::testing::Return(nullptr));
|
| - Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -
|
| - // Load the script.
|
| - EXPECT_CALL(*m_mockClient, workerScriptLoaded())
|
| - .Times(1);
|
| - EXPECT_CALL(*m_mockClient, createServiceWorkerProvider())
|
| - .Times(0);
|
| - Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -
|
| - // Resume after download.
|
| - EXPECT_CALL(*m_mockClient, createServiceWorkerProvider())
|
| - .WillOnce(::testing::Return(nullptr));
|
| - m_worker->resumeAfterDownload();
|
| - ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
|
| -}
|
| -
|
| } // namespace blink
|
|
|