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

Side by Side Diff: extensions/browser/value_store/value_store_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_unittest.h" 5 #include "extensions/browser/value_store/value_store_unittest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 dict12_->Set(key2_, val2_->CreateDeepCopy()); 161 dict12_->Set(key2_, val2_->CreateDeepCopy());
162 dict123_->Set(key1_, val1_->CreateDeepCopy()); 162 dict123_->Set(key1_, val1_->CreateDeepCopy());
163 dict123_->Set(key2_, val2_->CreateDeepCopy()); 163 dict123_->Set(key2_, val2_->CreateDeepCopy());
164 dict123_->Set(key3_, val3_->CreateDeepCopy()); 164 dict123_->Set(key3_, val3_->CreateDeepCopy());
165 } 165 }
166 166
167 ValueStoreTest::~ValueStoreTest() {} 167 ValueStoreTest::~ValueStoreTest() {}
168 168
169 void ValueStoreTest::SetUp() { 169 void ValueStoreTest::SetUp() {
170 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 170 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
171 storage_.reset((GetParam())(temp_dir_.path().AppendASCII("dbName"))); 171 storage_.reset((GetParam())(temp_dir_.GetPath().AppendASCII("dbName")));
172 ASSERT_TRUE(storage_.get()); 172 ASSERT_TRUE(storage_.get());
173 } 173 }
174 174
175 void ValueStoreTest::TearDown() { 175 void ValueStoreTest::TearDown() {
176 storage_.reset(); 176 storage_.reset();
177 } 177 }
178 178
179 TEST_P(ValueStoreTest, GetWhenEmpty) { 179 TEST_P(ValueStoreTest, GetWhenEmpty) {
180 EXPECT_PRED_FORMAT2(SettingsEq, *empty_dict_, storage_->Get(key1_)); 180 EXPECT_PRED_FORMAT2(SettingsEq, *empty_dict_, storage_->Get(key1_));
181 EXPECT_PRED_FORMAT2(SettingsEq, *empty_dict_, storage_->Get(empty_list_)); 181 EXPECT_PRED_FORMAT2(SettingsEq, *empty_dict_, storage_->Get(empty_list_));
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 { 491 {
492 ValueStoreChangeList changes; 492 ValueStoreChangeList changes;
493 changes.push_back( 493 changes.push_back(
494 ValueStoreChange(key3_, val3_->CreateDeepCopy(), nullptr)); 494 ValueStoreChange(key3_, val3_->CreateDeepCopy(), nullptr));
495 changes.push_back( 495 changes.push_back(
496 ValueStoreChange("qwerty", val3_->CreateDeepCopy(), nullptr)); 496 ValueStoreChange("qwerty", val3_->CreateDeepCopy(), nullptr));
497 EXPECT_PRED_FORMAT2(ChangesEq, changes, storage_->Clear()); 497 EXPECT_PRED_FORMAT2(ChangesEq, changes, storage_->Clear());
498 EXPECT_PRED_FORMAT2(ChangesEq, ValueStoreChangeList(), storage_->Clear()); 498 EXPECT_PRED_FORMAT2(ChangesEq, ValueStoreChangeList(), storage_->Clear());
499 } 499 }
500 } 500 }
OLDNEW
« no previous file with comments | « extensions/browser/value_store/value_store_frontend_unittest.cc ('k') | extensions/common/extension_l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698