Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: content/browser/in_process_webkit/indexed_db_browsertest.cc

Issue 11098057: Turn on LevelDB logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to ToT, README, cleanup Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/leveldatabase/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 ASSERT_TRUE(file_util::CopyDirectory(test_data_dir, 227 ASSERT_TRUE(file_util::CopyDirectory(test_data_dir,
228 context_impl->data_path(), 228 context_impl->data_path(),
229 kRecursive)); 229 kRecursive));
230 } 230 }
231 }; 231 };
232 232
233 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion0Schema, MigrationTest) { 233 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion0Schema, MigrationTest) {
234 SimpleTest(GetTestUrl("indexeddb", "migration_test.html")); 234 SimpleTest(GetTestUrl("indexeddb", "migration_test.html"));
235 } 235 }
236 236
237 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, LevelDBLogFileTest) {
238 // Any page that opens an IndexedDB will work here.
239 SimpleTest(GetTestUrl("indexeddb", "database_test.html"));
240 scoped_refptr<IndexedDBContext> context =
241 BrowserContext::GetDefaultStoragePartition(
242 shell()->web_contents()->GetBrowserContext())->
243 GetIndexedDBContext();
244 IndexedDBContextImpl* context_impl =
245 static_cast<IndexedDBContextImpl*>(context.get());
246 FilePath leveldb_dir(FILE_PATH_LITERAL("file__0.indexeddb.leveldb"));
247 FilePath log_file(FILE_PATH_LITERAL("LOG"));
248 FilePath log_file_path =
249 context_impl->data_path().Append(leveldb_dir).Append(log_file);
250 int64 size;
251 EXPECT_TRUE(file_util::GetFileSize(log_file_path, &size));
252 EXPECT_GT(size, 0);
253 }
254
255 // Converted pyauto tests begin here.
jsbell 2012/10/11 23:58:05 What is the purpose of this comment?
dgrogan 2012/10/12 01:41:30 Just makes finding the end of the "regular" browse
256
237 // Verify null key path persists after restarting browser. 257 // Verify null key path persists after restarting browser.
238 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, PRE_NullKeyPathPersistence) { 258 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, PRE_NullKeyPathPersistence) {
239 NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part1", 259 NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part1",
240 "pass - first run"); 260 "pass - first run");
241 } 261 }
242 262
243 // Verify null key path persists after restarting browser. 263 // Verify null key path persists after restarting browser.
244 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, NullKeyPathPersistence) { 264 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, NullKeyPathPersistence) {
245 NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part2", 265 NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part2",
246 "pass - second run"); 266 "pass - second run");
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); 300 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16);
281 301
282 base::KillProcess( 302 base::KillProcess(
283 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); 303 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true);
284 shell()->Close(); 304 shell()->Close();
285 305
286 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); 306 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
287 } 307 }
288 308
289 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/leveldatabase/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698