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 "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
10 #include "chrome/test/ui/ui_layout_test.h" | 10 #include "chrome/test/ui/ui_layout_test.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 return file_util::IsDirectoryEmpty(storage_dir); | 148 return file_util::IsDirectoryEmpty(storage_dir); |
149 } | 149 } |
150 | 150 |
151 GURL TestUrl() const { | 151 GURL TestUrl() const { |
152 FilePath test_dir = test_data_directory_; | 152 FilePath test_dir = test_data_directory_; |
153 FilePath test_file = test_dir.AppendASCII("dom_storage_empty_db.html"); | 153 FilePath test_file = test_dir.AppendASCII("dom_storage_empty_db.html"); |
154 return net::FilePathToFileURL(test_file); | 154 return net::FilePathToFileURL(test_file); |
155 } | 155 } |
156 }; | 156 }; |
157 | 157 |
158 // Fails, see http://crbug.com/76008 | 158 TEST_F(DomStorageEmptyDatabaseTest, EmptyDirAfterClear) { |
159 TEST_F(DomStorageEmptyDatabaseTest, FAILS_EmptyDirAfterClear) { | |
160 NavigateToURL(TestUrl()); | 159 NavigateToURL(TestUrl()); |
161 ASSERT_TRUE(StorageDirIsEmpty()); | 160 ASSERT_TRUE(StorageDirIsEmpty()); |
162 | 161 |
163 NavigateToURL(GURL("javascript:set()")); | 162 NavigateToURL(GURL("javascript:set()")); |
164 NavigateToURL(GURL("javascript:clear()")); | 163 NavigateToURL(GURL("javascript:clear()")); |
165 QuitBrowser(); | 164 QuitBrowser(); |
166 EXPECT_TRUE(StorageDirIsEmpty()); | 165 EXPECT_TRUE(StorageDirIsEmpty()); |
167 } | 166 } |
168 | 167 |
169 TEST_F(DomStorageEmptyDatabaseTest, EmptyDirAfterGet) { | 168 TEST_F(DomStorageEmptyDatabaseTest, EmptyDirAfterGet) { |
(...skipping 13 matching lines...) Expand all Loading... |
183 NavigateToURL(GURL("javascript:set()")); | 182 NavigateToURL(GURL("javascript:set()")); |
184 QuitBrowser(); | 183 QuitBrowser(); |
185 EXPECT_FALSE(StorageDirIsEmpty()); | 184 EXPECT_FALSE(StorageDirIsEmpty()); |
186 | 185 |
187 LaunchBrowserAndServer(); | 186 LaunchBrowserAndServer(); |
188 NavigateToURL(TestUrl()); | 187 NavigateToURL(TestUrl()); |
189 NavigateToURL(GURL("javascript:clear()")); | 188 NavigateToURL(GURL("javascript:clear()")); |
190 QuitBrowser(); | 189 QuitBrowser(); |
191 EXPECT_TRUE(StorageDirIsEmpty()); | 190 EXPECT_TRUE(StorageDirIsEmpty()); |
192 } | 191 } |
OLD | NEW |