| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "content/browser/browser_thread_impl.h" | 7 #include "content/browser/browser_thread_impl.h" |
| 8 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" | 8 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
| 9 #include "content/public/browser/storage_partition.h" | 9 #include "content/public/browser/storage_partition.h" |
| 10 #include "content/public/common/url_constants.h" | 10 #include "content/public/common/url_constants.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 message_loop_.RunUntilIdle(); | 127 message_loop_.RunUntilIdle(); |
| 128 | 128 |
| 129 // No data was cleared because of SetForceKeepSessionState. | 129 // No data was cleared because of SetForceKeepSessionState. |
| 130 EXPECT_TRUE(file_util::DirectoryExists(normal_path)); | 130 EXPECT_TRUE(file_util::DirectoryExists(normal_path)); |
| 131 EXPECT_TRUE(file_util::DirectoryExists(session_only_path)); | 131 EXPECT_TRUE(file_util::DirectoryExists(session_only_path)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 class MockWebIDBDatabase : public WebKit::WebIDBDatabase | 134 class MockWebIDBDatabase : public WebKit::WebIDBDatabase |
| 135 { | 135 { |
| 136 public: | 136 public: |
| 137 MockWebIDBDatabase(bool expect_force_close) | 137 explicit MockWebIDBDatabase(bool expect_force_close) |
| 138 : expect_force_close_(expect_force_close), | 138 : expect_force_close_(expect_force_close), |
| 139 force_close_called_(false) {} | 139 force_close_called_(false) {} |
| 140 | 140 |
| 141 ~MockWebIDBDatabase() | 141 ~MockWebIDBDatabase() |
| 142 { | 142 { |
| 143 EXPECT_TRUE(force_close_called_ == expect_force_close_); | 143 EXPECT_TRUE(force_close_called_ == expect_force_close_); |
| 144 } | 144 } |
| 145 | 145 |
| 146 virtual void forceClose() | 146 virtual void forceClose() |
| 147 { | 147 { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 message_loop_.RunUntilIdle(); | 194 message_loop_.RunUntilIdle(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 // Make sure we wait until the destructor has run. | 197 // Make sure we wait until the destructor has run. |
| 198 message_loop_.RunUntilIdle(); | 198 message_loop_.RunUntilIdle(); |
| 199 | 199 |
| 200 EXPECT_FALSE(file_util::DirectoryExists(test_path)); | 200 EXPECT_FALSE(file_util::DirectoryExists(test_path)); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace content | 203 } // namespace content |
| OLD | NEW |