OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/service_worker/service_worker_database.h" | 5 #include "content/browser/service_worker/service_worker_database.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "content/browser/service_worker/service_worker_database.pb.h" | 12 #include "content/browser/service_worker/service_worker_database.pb.h" |
13 #include "content/common/service_worker/service_worker_types.h" | 13 #include "content/common/service_worker/service_worker_types.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 CreateDatabase(database_dir.path())); | 1038 CreateDatabase(database_dir.path())); |
1039 | 1039 |
1040 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(true)); | 1040 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(true)); |
1041 ASSERT_TRUE(base::DirectoryExists(database_dir.path())); | 1041 ASSERT_TRUE(base::DirectoryExists(database_dir.path())); |
1042 | 1042 |
1043 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->DestroyDatabase()); | 1043 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->DestroyDatabase()); |
1044 ASSERT_FALSE(base::DirectoryExists(database_dir.path())); | 1044 ASSERT_FALSE(base::DirectoryExists(database_dir.path())); |
1045 } | 1045 } |
1046 | 1046 |
1047 } // namespace content | 1047 } // namespace content |
OLD | NEW |