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

Unified Diff: content/browser/service_worker/service_worker_registration_unittest.cc

Issue 2627543002: ServiceWorker: Returns true for IsMojoForServiceWorkerEnabled (Closed)
Patch Set: Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_registration_unittest.cc
diff --git a/content/browser/service_worker/service_worker_registration_unittest.cc b/content/browser/service_worker/service_worker_registration_unittest.cc
index 593519b391d0340e854c0c4080a42381a5cdd465..9e87cab6f1325d51b10ad488b8c087a5ad2fb70a 100644
--- a/content/browser/service_worker/service_worker_registration_unittest.cc
+++ b/content/browser/service_worker/service_worker_registration_unittest.cc
@@ -99,10 +99,7 @@ class ServiceWorkerRegistrationTest : public testing::Test {
TestBrowserThreadBundle thread_bundle_;
};
-class ServiceWorkerRegistrationTestP
- : public MojoServiceWorkerTestP<ServiceWorkerRegistrationTest> {};
-
-TEST_P(ServiceWorkerRegistrationTestP, SetAndUnsetVersions) {
+TEST_F(ServiceWorkerRegistrationTest, SetAndUnsetVersions) {
const GURL kScope("http://www.example.not/");
const GURL kScript("http://www.example.not/service_worker.js");
int64_t kRegistrationId = 1L;
@@ -170,7 +167,7 @@ TEST_P(ServiceWorkerRegistrationTestP, SetAndUnsetVersions) {
kInvalidServiceWorkerVersionId);
}
-TEST_P(ServiceWorkerRegistrationTestP, FailedRegistrationNoCrash) {
+TEST_F(ServiceWorkerRegistrationTest, FailedRegistrationNoCrash) {
const GURL kScope("http://www.example.not/");
int64_t kRegistrationId = 1L;
scoped_refptr<ServiceWorkerRegistration> registration =
@@ -184,7 +181,7 @@ TEST_P(ServiceWorkerRegistrationTestP, FailedRegistrationNoCrash) {
// Don't crash when handle gets destructed.
}
-TEST_P(ServiceWorkerRegistrationTestP, NavigationPreload) {
+TEST_F(ServiceWorkerRegistrationTest, NavigationPreload) {
const GURL kScope("http://www.example.not/");
const GURL kScript("https://www.example.not/service_worker.js");
// Setup.
@@ -222,9 +219,9 @@ TEST_P(ServiceWorkerRegistrationTestP, NavigationPreload) {
// Sets up a registration with a waiting worker, and an active worker
// with a controllee and an inflight request.
-class ServiceWorkerActivationTest : public ServiceWorkerRegistrationTestP {
+class ServiceWorkerActivationTest : public ServiceWorkerRegistrationTest {
public:
- ServiceWorkerActivationTest() : ServiceWorkerRegistrationTestP() {}
+ ServiceWorkerActivationTest() : ServiceWorkerRegistrationTest() {}
void SetUp() override {
ServiceWorkerRegistrationTest::SetUp();
@@ -302,7 +299,7 @@ class ServiceWorkerActivationTest : public ServiceWorkerRegistrationTestP {
};
// Test activation triggered by finishing all requests.
-TEST_P(ServiceWorkerActivationTest, NoInflightRequest) {
+TEST_F(ServiceWorkerActivationTest, NoInflightRequest) {
scoped_refptr<ServiceWorkerRegistration> reg = registration();
scoped_refptr<ServiceWorkerVersion> version_1 = reg->active_version();
scoped_refptr<ServiceWorkerVersion> version_2 = reg->waiting_version();
@@ -321,7 +318,7 @@ TEST_P(ServiceWorkerActivationTest, NoInflightRequest) {
}
// Test activation triggered by loss of controllee.
-TEST_P(ServiceWorkerActivationTest, NoControllee) {
+TEST_F(ServiceWorkerActivationTest, NoControllee) {
scoped_refptr<ServiceWorkerRegistration> reg = registration();
scoped_refptr<ServiceWorkerVersion> version_1 = reg->active_version();
scoped_refptr<ServiceWorkerVersion> version_2 = reg->waiting_version();
@@ -340,7 +337,7 @@ TEST_P(ServiceWorkerActivationTest, NoControllee) {
}
// Test activation triggered by skipWaiting.
-TEST_P(ServiceWorkerActivationTest, SkipWaiting) {
+TEST_F(ServiceWorkerActivationTest, SkipWaiting) {
scoped_refptr<ServiceWorkerRegistration> reg = registration();
scoped_refptr<ServiceWorkerVersion> version_1 = reg->active_version();
scoped_refptr<ServiceWorkerVersion> version_2 = reg->waiting_version();
@@ -359,7 +356,7 @@ TEST_P(ServiceWorkerActivationTest, SkipWaiting) {
}
// Test activation triggered by skipWaiting and finishing requests.
-TEST_P(ServiceWorkerActivationTest, SkipWaitingWithInflightRequest) {
+TEST_F(ServiceWorkerActivationTest, SkipWaitingWithInflightRequest) {
scoped_refptr<ServiceWorkerRegistration> reg = registration();
scoped_refptr<ServiceWorkerVersion> version_1 = reg->active_version();
scoped_refptr<ServiceWorkerVersion> version_2 = reg->waiting_version();
@@ -377,12 +374,4 @@ TEST_P(ServiceWorkerActivationTest, SkipWaitingWithInflightRequest) {
EXPECT_EQ(version_2.get(), reg->active_version());
}
-INSTANTIATE_TEST_CASE_P(ServiceWorkerRegistrationTest,
- ServiceWorkerRegistrationTestP,
- testing::Bool());
-
-INSTANTIATE_TEST_CASE_P(ServiceWorkerActivationTest,
- ServiceWorkerActivationTest,
- testing::Bool());
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698