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

Side by Side Diff: extensions/browser/value_store/value_store_frontend_unittest.cc

Issue 2314363002: extensions: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Comment addressed Created 4 years, 3 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/value_store/value_store_frontend.h" 5 #include "extensions/browser/value_store/value_store_frontend.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 14 matching lines...) Expand all
25 : ui_thread_(BrowserThread::UI, base::MessageLoop::current()), 25 : ui_thread_(BrowserThread::UI, base::MessageLoop::current()),
26 file_thread_(BrowserThread::FILE, base::MessageLoop::current()) { 26 file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {
27 } 27 }
28 28
29 void SetUp() override { 29 void SetUp() override {
30 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 30 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
31 31
32 base::FilePath test_data_dir; 32 base::FilePath test_data_dir;
33 ASSERT_TRUE(PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir)); 33 ASSERT_TRUE(PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir));
34 base::FilePath src_db(test_data_dir.AppendASCII("value_store_db")); 34 base::FilePath src_db(test_data_dir.AppendASCII("value_store_db"));
35 db_path_ = temp_dir_.path().AppendASCII("temp_db"); 35 db_path_ = temp_dir_.GetPath().AppendASCII("temp_db");
36 base::CopyDirectory(src_db, db_path_, true); 36 base::CopyDirectory(src_db, db_path_, true);
37 37
38 factory_ = new extensions::TestValueStoreFactory(db_path_); 38 factory_ = new extensions::TestValueStoreFactory(db_path_);
39 39
40 ResetStorage(); 40 ResetStorage();
41 } 41 }
42 42
43 void TearDown() override { 43 void TearDown() override {
44 base::RunLoop().RunUntilIdle(); // wait for storage to delete 44 base::RunLoop().RunUntilIdle(); // wait for storage to delete
45 storage_.reset(); 45 storage_.reset();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 { 115 {
116 ASSERT_TRUE(Get("key1", &value)); 116 ASSERT_TRUE(Get("key1", &value));
117 std::string result; 117 std::string result;
118 ASSERT_TRUE(value->GetAsString(&result)); 118 ASSERT_TRUE(value->GetAsString(&result));
119 EXPECT_EQ("new1", result); 119 EXPECT_EQ("new1", result);
120 } 120 }
121 121
122 ASSERT_FALSE(Get("key2", &value)); 122 ASSERT_FALSE(Get("key2", &value));
123 } 123 }
OLDNEW
« no previous file with comments | « extensions/browser/value_store/leveldb_value_store_unittest.cc ('k') | extensions/browser/value_store/value_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698