OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "chrome/test/base/testing_browser_process.h" | 7 #include "chrome/test/base/testing_browser_process.h" |
8 #include "chrome/test/base/testing_browser_process_test.h" | |
9 #include "chrome/test/base/testing_profile.h" | 8 #include "chrome/test/base/testing_profile.h" |
10 #include "content/browser/in_process_webkit/webkit_context.h" | 9 #include "content/browser/in_process_webkit/webkit_context.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "webkit/quota/mock_special_storage_policy.h" | 11 #include "webkit/quota/mock_special_storage_policy.h" |
12 | 12 |
13 class DOMStorageTest : public TestingBrowserProcessTest { | 13 class DOMStorageTest : public testing::Test { |
14 public: | 14 public: |
15 DOMStorageTest() | 15 DOMStorageTest() |
16 : message_loop_(MessageLoop::TYPE_IO), | 16 : message_loop_(MessageLoop::TYPE_IO), |
17 webkit_thread_(BrowserThread::WEBKIT, &message_loop_) { | 17 webkit_thread_(BrowserThread::WEBKIT, &message_loop_) { |
18 } | 18 } |
19 protected: | 19 protected: |
20 MessageLoop message_loop_; | 20 MessageLoop message_loop_; |
21 | 21 |
22 private: | 22 private: |
23 BrowserThread webkit_thread_; | 23 BrowserThread webkit_thread_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 profile.GetWebKitContext()->DeleteSessionOnlyData(); | 63 profile.GetWebKitContext()->DeleteSessionOnlyData(); |
64 | 64 |
65 // Expected result: the database file for the permanent storage remains but | 65 // Expected result: the database file for the permanent storage remains but |
66 // the database for the session only storage was deleted. | 66 // the database for the session only storage was deleted. |
67 EXPECT_FALSE(file_util::PathExists(session_only_database_path)); | 67 EXPECT_FALSE(file_util::PathExists(session_only_database_path)); |
68 EXPECT_TRUE(file_util::PathExists(permanent_database_path)); | 68 EXPECT_TRUE(file_util::PathExists(permanent_database_path)); |
69 } | 69 } |
70 // Run the message loop to ensure that DOMStorageContext gets destroyed. | 70 // Run the message loop to ensure that DOMStorageContext gets destroyed. |
71 message_loop_.RunAllPending(); | 71 message_loop_.RunAllPending(); |
72 } | 72 } |
OLD | NEW |