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

Side by Side Diff: content/browser/quota/quota_reservation_manager_unittest.cc

Issue 2316043002: //content: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 } // namespace 184 } // namespace
185 185
186 class QuotaReservationManagerTest : public testing::Test { 186 class QuotaReservationManagerTest : public testing::Test {
187 public: 187 public:
188 QuotaReservationManagerTest() {} 188 QuotaReservationManagerTest() {}
189 ~QuotaReservationManagerTest() override {} 189 ~QuotaReservationManagerTest() override {}
190 190
191 void SetUp() override { 191 void SetUp() override {
192 ASSERT_TRUE(work_dir_.CreateUniqueTempDir()); 192 ASSERT_TRUE(work_dir_.CreateUniqueTempDir());
193 file_path_ = work_dir_.path().Append(FILE_PATH_LITERAL("hoge")); 193 file_path_ = work_dir_.GetPath().Append(FILE_PATH_LITERAL("hoge"));
194 SetFileSize(file_path_, kInitialFileSize); 194 SetFileSize(file_path_, kInitialFileSize);
195 195
196 std::unique_ptr<QuotaReservationManager::QuotaBackend> backend( 196 std::unique_ptr<QuotaReservationManager::QuotaBackend> backend(
197 new FakeBackend); 197 new FakeBackend);
198 reservation_manager_.reset(new QuotaReservationManager(std::move(backend))); 198 reservation_manager_.reset(new QuotaReservationManager(std::move(backend)));
199 } 199 }
200 200
201 void TearDown() override { reservation_manager_.reset(); } 201 void TearDown() override { reservation_manager_.reset(); }
202 202
203 FakeBackend* fake_backend() { 203 FakeBackend* fake_backend() {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 EXPECT_EQ(kInitialFileSize + 10, GetFileSize(file_path())); 364 EXPECT_EQ(kInitialFileSize + 10, GetFileSize(file_path()));
365 EXPECT_EQ(kInitialFileSize + 15 + 20, fake_backend()->on_memory_usage()); 365 EXPECT_EQ(kInitialFileSize + 15 + 20, fake_backend()->on_memory_usage());
366 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_disk_usage()); 366 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_disk_usage());
367 367
368 reservation2 = NULL; 368 reservation2 = NULL;
369 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_memory_usage()); 369 EXPECT_EQ(kInitialFileSize + 10, fake_backend()->on_memory_usage());
370 } 370 }
371 371
372 } // namespace content 372 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/quota/quota_manager_unittest.cc ('k') | content/browser/quota/storage_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698