Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/web/WebEmbeddedWorker.h" 5 #include "public/web/WebEmbeddedWorker.h"
6 6
7 #include "platform/testing/URLTestHelpers.h" 7 #include "platform/testing/URLTestHelpers.h"
8 #include "platform/testing/UnitTestHelpers.h" 8 #include "platform/testing/UnitTestHelpers.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "public/platform/WebURLLoaderMockFactory.h" 10 #include "public/platform/WebURLLoaderMockFactory.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 private: 85 private:
86 bool m_hasAssociatedRegistration; 86 bool m_hasAssociatedRegistration;
87 }; 87 };
88 88
89 class WebEmbeddedWorkerImplTest : public ::testing::Test { 89 class WebEmbeddedWorkerImplTest : public ::testing::Test {
90 protected: 90 protected:
91 void SetUp() override { 91 void SetUp() override {
92 m_mockClient = new MockServiceWorkerContextClient(); 92 m_mockClient = new MockServiceWorkerContextClient();
93 m_worker = wrapUnique(WebEmbeddedWorker::create(m_mockClient, nullptr)); 93 m_worker =
94 WTF::wrapUnique(WebEmbeddedWorker::create(m_mockClient, nullptr));
94 95
95 WebURL scriptURL = URLTestHelpers::toKURL("https://www.example.com/sw.js"); 96 WebURL scriptURL = URLTestHelpers::toKURL("https://www.example.com/sw.js");
96 WebURLResponse response; 97 WebURLResponse response;
97 response.setMIMEType("text/javascript"); 98 response.setMIMEType("text/javascript");
98 response.setHTTPStatusCode(200); 99 response.setHTTPStatusCode(200);
99 Platform::current()->getURLLoaderMockFactory()->registerURL(scriptURL, 100 Platform::current()->getURLLoaderMockFactory()->registerURL(scriptURL,
100 response, ""); 101 response, "");
101 102
102 m_startData.scriptURL = scriptURL; 103 m_startData.scriptURL = scriptURL;
103 m_startData.userAgent = WebString("dummy user agent"); 104 m_startData.userAgent = WebString("dummy user agent");
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 ::testing::Mock::VerifyAndClearExpectations(m_mockClient); 291 ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
291 292
292 // Resume after download. 293 // Resume after download.
293 EXPECT_CALL(*m_mockClient, createServiceWorkerProvider()) 294 EXPECT_CALL(*m_mockClient, createServiceWorkerProvider())
294 .WillOnce(::testing::Return(nullptr)); 295 .WillOnce(::testing::Return(nullptr));
295 m_worker->resumeAfterDownload(); 296 m_worker->resumeAfterDownload();
296 ::testing::Mock::VerifyAndClearExpectations(m_mockClient); 297 ::testing::Mock::VerifyAndClearExpectations(m_mockClient);
297 } 298 }
298 299
299 } // namespace blink 300 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698