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

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

Issue 397323003: LevelDBDatabase::Compact compacts db (on disk) w/o requiring reopen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compacting after waiting for previous writes to finish. Created 6 years, 5 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
« no previous file with comments | « no previous file | content/browser/indexed_db/leveldb/leveldb_database.cc » ('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_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 // deleting reduces the amount stored. 634 // deleting reduces the amount stored.
635 635
636 // The below tests make assumptions about implementation specifics, such as 636 // The below tests make assumptions about implementation specifics, such as
637 // data compression, compaction efficiency, and the maximum amount of 637 // data compression, compaction efficiency, and the maximum amount of
638 // metadata and log data remains after a deletion. It is possible that 638 // metadata and log data remains after a deletion. It is possible that
639 // changes to the implementation may require these constants to be tweaked. 639 // changes to the implementation may require these constants to be tweaked.
640 640
641 const int kTestFillBytes = 1024 * 1024 * 5; // 5MB 641 const int kTestFillBytes = 1024 * 1024 * 5; // 5MB
642 EXPECT_GT(after_filling, kTestFillBytes); 642 EXPECT_GT(after_filling, kTestFillBytes);
643 643
644 const int kTestCompactBytes = 1024 * 1024 * 1; // 1MB 644 const int kTestCompactBytes = 1024 * 10; // 10kB
645 EXPECT_LT(after_deleting, kTestCompactBytes); 645 EXPECT_LT(after_deleting, kTestCompactBytes);
646 } 646 }
647 647
648 // Complex multi-step (converted from pyauto) tests begin here. 648 // Complex multi-step (converted from pyauto) tests begin here.
649 649
650 // Verify null key path persists after restarting browser. 650 // Verify null key path persists after restarting browser.
651 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, PRE_NullKeyPathPersistence) { 651 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, PRE_NullKeyPathPersistence) {
652 NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part1", 652 NavigateAndWaitForTitle(shell(), "bug_90635.html", "#part1",
653 "pass - first run"); 653 "pass - first run");
654 } 654 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 #define MAYBE_RenderThreadShutdownTest DISABLED_RenderThreadShutdownTest 733 #define MAYBE_RenderThreadShutdownTest DISABLED_RenderThreadShutdownTest
734 #else 734 #else
735 #define MAYBE_RenderThreadShutdownTest RenderThreadShutdownTest 735 #define MAYBE_RenderThreadShutdownTest RenderThreadShutdownTest
736 #endif 736 #endif
737 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, 737 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess,
738 MAYBE_RenderThreadShutdownTest) { 738 MAYBE_RenderThreadShutdownTest) {
739 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); 739 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html"));
740 } 740 }
741 741
742 } // namespace content 742 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/leveldb/leveldb_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698