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

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

Issue 11747025: Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ms release build Created 7 years, 11 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 | Annotate | Revision Log
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 "testing/gtest/include/gtest/gtest.h"
6
7 #include "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
8 #include "base/values.h"
9 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/extensions/settings/settings_backend.h" 8 #include "base/values.h"
12 #include "chrome/browser/extensions/settings/settings_storage_quota_enforcer.h" 9 #include "chrome/browser/extensions/api/storage/settings_backend.h"
10 #include "chrome/browser/extensions/api/storage/settings_storage_quota_enforcer. h"
13 #include "chrome/browser/value_store/testing_value_store.h" 11 #include "chrome/browser/value_store/testing_value_store.h"
12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 namespace extensions { 14 namespace extensions {
16 15
17 // To save typing ValueStore::DEFAULTS/IGNORE_QUOTA everywhere. 16 // To save typing ValueStore::DEFAULTS/IGNORE_QUOTA everywhere.
18 const ValueStore::WriteOptions DEFAULTS = ValueStore::DEFAULTS; 17 const ValueStore::WriteOptions DEFAULTS = ValueStore::DEFAULTS;
19 const ValueStore::WriteOptions IGNORE_QUOTA = 18 const ValueStore::WriteOptions IGNORE_QUOTA =
20 ValueStore::IGNORE_QUOTA; 19 ValueStore::IGNORE_QUOTA;
21 20
22 class ExtensionSettingsQuotaTest : public testing::Test { 21 class ExtensionSettingsQuotaTest : public testing::Test {
23 public: 22 public:
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 585
587 storage_->Set(DEFAULTS, "c", *byte_value_1_); 586 storage_->Set(DEFAULTS, "c", *byte_value_1_);
588 587
589 EXPECT_EQ(6u, storage_->GetBytesInUse()); 588 EXPECT_EQ(6u, storage_->GetBytesInUse());
590 EXPECT_EQ(2u, storage_->GetBytesInUse("a")); 589 EXPECT_EQ(2u, storage_->GetBytesInUse("a"));
591 EXPECT_EQ(2u, storage_->GetBytesInUse("b")); 590 EXPECT_EQ(2u, storage_->GetBytesInUse("b"));
592 EXPECT_EQ(4u, storage_->GetBytesInUse(ab)); 591 EXPECT_EQ(4u, storage_->GetBytesInUse(ab));
593 } 592 }
594 593
595 } // namespace extensions 594 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698