OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/public/browser/service_worker_context.h" | 5 #include "content/public/browser/service_worker_context.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 703 |
704 class ServiceWorkerContextRecoveryTest | 704 class ServiceWorkerContextRecoveryTest |
705 : public ServiceWorkerContextTest, | 705 : public ServiceWorkerContextTest, |
706 public testing::WithParamInterface<testing::tuple<bool, bool>> { | 706 public testing::WithParamInterface<testing::tuple<bool, bool>> { |
707 public: | 707 public: |
708 ServiceWorkerContextRecoveryTest() {} | 708 ServiceWorkerContextRecoveryTest() {} |
709 virtual ~ServiceWorkerContextRecoveryTest() {} | 709 virtual ~ServiceWorkerContextRecoveryTest() {} |
710 | 710 |
711 protected: | 711 protected: |
712 void SetUp() override { | 712 void SetUp() override { |
713 if (is_mojo_enabled()) { | 713 if (!is_mojo_enabled()) { |
714 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 714 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
715 switches::kMojoServiceWorker); | 715 switches::kDisableMojoServiceWorker); |
716 } | 716 } |
717 ServiceWorkerContextTest::SetUp(); | 717 ServiceWorkerContextTest::SetUp(); |
718 } | 718 } |
719 | 719 |
720 bool is_mojo_enabled() const { return testing::get<0>(GetParam()); } | 720 bool is_mojo_enabled() const { return testing::get<0>(GetParam()); } |
721 bool is_storage_on_disk() const { return testing::get<1>(GetParam()); } | 721 bool is_storage_on_disk() const { return testing::get<1>(GetParam()); } |
722 }; | 722 }; |
723 | 723 |
724 TEST_P(ServiceWorkerContextRecoveryTest, DeleteAndStartOver) { | 724 TEST_P(ServiceWorkerContextRecoveryTest, DeleteAndStartOver) { |
725 GURL pattern("http://www.example.com/"); | 725 GURL pattern("http://www.example.com/"); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 815 |
816 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextTest, | 816 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextTest, |
817 ServiceWorkerContextTestP, | 817 ServiceWorkerContextTestP, |
818 testing::Bool()); | 818 testing::Bool()); |
819 | 819 |
820 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextRecoveryTest, | 820 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextRecoveryTest, |
821 ServiceWorkerContextRecoveryTest, | 821 ServiceWorkerContextRecoveryTest, |
822 testing::Combine(testing::Bool(), testing::Bool())); | 822 testing::Combine(testing::Bool(), testing::Bool())); |
823 | 823 |
824 } // namespace content | 824 } // namespace content |
OLD | NEW |