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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl_unittest.cc

Issue 1906243002: [tracing] Add a memory dump provider for DOM storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix dcheck and return value. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/dom_storage/dom_storage_context_impl_unittest.cc
diff --git a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
index 5173ac17c302c168b209a68d199c580c3d02b7c4..cd13ccbda454f32baea9d39b7735d122a7f75481 100644
--- a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
@@ -51,7 +51,11 @@ class DOMStorageContextImplTest : public testing::Test {
task_runner_.get());
}
- void TearDown() override { base::MessageLoop::current()->RunUntilIdle(); }
+ void TearDown() override {
+ if (context_)
+ context_->Shutdown();
+ base::MessageLoop::current()->RunUntilIdle();
+ }
void VerifySingleOriginRemains(const GURL& origin) {
// Use a new instance to examine the contexts of temp_dir_.
@@ -62,6 +66,7 @@ class DOMStorageContextImplTest : public testing::Test {
context->GetLocalStorageUsage(&infos, kDontIncludeFileInfo);
ASSERT_EQ(1u, infos.size());
EXPECT_EQ(origin, infos[0].origin);
+ context->Shutdown();
}
int session_id_offset() { return context_->session_id_offset_; }
@@ -195,6 +200,7 @@ TEST_F(DOMStorageContextImplTest, PersistentIds) {
TEST_F(DOMStorageContextImplTest, DeleteSessionStorage) {
// Create a DOMStorageContextImpl which will save sessionStorage on disk.
+ context_->Shutdown();
context_ = new DOMStorageContextImpl(temp_dir_.path(),
temp_dir_.path(),
storage_policy_.get(),
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.cc ('k') | content/browser/dom_storage/dom_storage_namespace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698