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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 }; | 620 }; |
621 | 621 |
622 class ServiceWorkerResourceStorageDiskTest | 622 class ServiceWorkerResourceStorageDiskTest |
623 : public ServiceWorkerResourceStorageTest { | 623 : public ServiceWorkerResourceStorageTest { |
624 public: | 624 public: |
625 virtual void SetUp() override { | 625 virtual void SetUp() override { |
626 ASSERT_TRUE(user_data_directory_.CreateUniqueTempDir()); | 626 ASSERT_TRUE(user_data_directory_.CreateUniqueTempDir()); |
627 ServiceWorkerResourceStorageTest::SetUp(); | 627 ServiceWorkerResourceStorageTest::SetUp(); |
628 } | 628 } |
629 | 629 |
630 virtual base::FilePath GetUserDataDirectory() override { | 630 base::FilePath GetUserDataDirectory() override { |
631 return user_data_directory_.path(); | 631 return user_data_directory_.path(); |
632 } | 632 } |
633 | 633 |
634 protected: | 634 protected: |
635 base::ScopedTempDir user_data_directory_; | 635 base::ScopedTempDir user_data_directory_; |
636 }; | 636 }; |
637 | 637 |
638 TEST_F(ServiceWorkerResourceStorageTest, DeleteRegistration_NoLiveVersion) { | 638 TEST_F(ServiceWorkerResourceStorageTest, DeleteRegistration_NoLiveVersion) { |
639 bool was_called = false; | 639 bool was_called = false; |
640 ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED; | 640 ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 are_equal = true; | 1052 are_equal = true; |
1053 storage()->CompareScriptResources( | 1053 storage()->CompareScriptResources( |
1054 5, 6, | 1054 5, 6, |
1055 base::Bind(&OnCompareComplete, &status, &are_equal)); | 1055 base::Bind(&OnCompareComplete, &status, &are_equal)); |
1056 base::RunLoop().RunUntilIdle(); | 1056 base::RunLoop().RunUntilIdle(); |
1057 EXPECT_EQ(SERVICE_WORKER_OK, status); | 1057 EXPECT_EQ(SERVICE_WORKER_OK, status); |
1058 EXPECT_FALSE(are_equal); | 1058 EXPECT_FALSE(are_equal); |
1059 } | 1059 } |
1060 | 1060 |
1061 } // namespace content | 1061 } // namespace content |
OLD | NEW |