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

Side by Side Diff: extensions/browser/api/storage/storage_frontend_unittest.cc

Issue 2090063002: Remove calls to deprecated MessageLoop methods in extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/storage/storage_frontend.h" 5 #include "extensions/browser/api/storage/storage_frontend.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void SetUp() override { 49 void SetUp() override {
50 ExtensionsTest::SetUp(); 50 ExtensionsTest::SetUp();
51 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 51 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
52 storage_factory_ = new ValueStoreFactoryImpl(temp_dir_.path()); 52 storage_factory_ = new ValueStoreFactoryImpl(temp_dir_.path());
53 ResetFrontend(); 53 ResetFrontend();
54 } 54 }
55 55
56 void TearDown() override { 56 void TearDown() override {
57 frontend_.reset(); 57 frontend_.reset();
58 // Execute any pending deletion tasks. 58 // Execute any pending deletion tasks.
59 message_loop_.RunUntilIdle(); 59 base::RunLoop().RunUntilIdle();
60 ExtensionsTest::TearDown(); 60 ExtensionsTest::TearDown();
61 } 61 }
62 62
63 protected: 63 protected:
64 void ResetFrontend() { 64 void ResetFrontend() {
65 frontend_ = 65 frontend_ =
66 StorageFrontend::CreateForTesting(storage_factory_, browser_context()); 66 StorageFrontend::CreateForTesting(storage_factory_, browser_context());
67 } 67 }
68 68
69 base::ScopedTempDir temp_dir_; 69 base::ScopedTempDir temp_dir_;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 std::unique_ptr<base::Value> megabyte = util::CreateMegabyte(); 215 std::unique_ptr<base::Value> megabyte = util::CreateMegabyte();
216 for (int i = 0; i < 5; ++i) { 216 for (int i = 0; i < 5; ++i) {
217 local_storage->Set(DEFAULTS, base::IntToString(i), *megabyte); 217 local_storage->Set(DEFAULTS, base::IntToString(i), *megabyte);
218 } 218 }
219 219
220 EXPECT_FALSE( 220 EXPECT_FALSE(
221 local_storage->Set(DEFAULTS, "WillError", *megabyte)->status().ok()); 221 local_storage->Set(DEFAULTS, "WillError", *megabyte)->status().ok());
222 } 222 }
223 223
224 } // namespace extensions 224 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698