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

Side by Side Diff: chrome/browser/extensions/api/storage/settings_quota_unittest.cc

Issue 175853002: Revert of Add a Restore() method to ValueStore and make StorageAPI use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/api/storage/settings_backend.h"
9 #include "chrome/browser/extensions/api/storage/settings_storage_quota_enforcer. h" 10 #include "chrome/browser/extensions/api/storage/settings_storage_quota_enforcer. h"
10 #include "chrome/browser/value_store/testing_value_store.h" 11 #include "chrome/browser/value_store/testing_value_store.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 using base::DictionaryValue; 14 using base::DictionaryValue;
14 using base::ListValue; 15 using base::ListValue;
15 using base::Value; 16 using base::Value;
16 17
17 namespace extensions { 18 namespace extensions {
18 19
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 589
589 storage_->Set(DEFAULTS, "c", *byte_value_1_); 590 storage_->Set(DEFAULTS, "c", *byte_value_1_);
590 591
591 EXPECT_EQ(6u, storage_->GetBytesInUse()); 592 EXPECT_EQ(6u, storage_->GetBytesInUse());
592 EXPECT_EQ(2u, storage_->GetBytesInUse("a")); 593 EXPECT_EQ(2u, storage_->GetBytesInUse("a"));
593 EXPECT_EQ(2u, storage_->GetBytesInUse("b")); 594 EXPECT_EQ(2u, storage_->GetBytesInUse("b"));
594 EXPECT_EQ(4u, storage_->GetBytesInUse(ab)); 595 EXPECT_EQ(4u, storage_->GetBytesInUse(ab));
595 } 596 }
596 597
597 } // namespace extensions 598 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698