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

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

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 22 matching lines...) Expand all
33 scoped_ptr<Value> CreateKilobyte() { 33 scoped_ptr<Value> CreateKilobyte() {
34 std::string kilobyte_string; 34 std::string kilobyte_string;
35 for (int i = 0; i < 1024; ++i) { 35 for (int i = 0; i < 1024; ++i) {
36 kilobyte_string += "a"; 36 kilobyte_string += "a";
37 } 37 }
38 return scoped_ptr<Value>(Value::CreateStringValue(kilobyte_string)); 38 return scoped_ptr<Value>(Value::CreateStringValue(kilobyte_string));
39 } 39 }
40 40
41 // Creates a megabyte of data. 41 // Creates a megabyte of data.
42 scoped_ptr<Value> CreateMegabyte() { 42 scoped_ptr<Value> CreateMegabyte() {
43 ListValue* megabyte = new ListValue(); 43 base::ListValue* megabyte = new base::ListValue();
44 for (int i = 0; i < 1000; ++i) { 44 for (int i = 0; i < 1000; ++i) {
45 megabyte->Append(CreateKilobyte().release()); 45 megabyte->Append(CreateKilobyte().release());
46 } 46 }
47 return scoped_ptr<Value>(megabyte); 47 return scoped_ptr<Value>(megabyte);
48 } 48 }
49 49
50 } 50 }
51 51
52 class ExtensionSettingsFrontendTest : public testing::Test { 52 class ExtensionSettingsFrontendTest : public testing::Test {
53 public: 53 public:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 frontend_->RunWithStorage( 280 frontend_->RunWithStorage(
281 id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback)); 281 id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback));
282 frontend_->RunWithStorage( 282 frontend_->RunWithStorage(
283 id, settings::LOCAL, base::Bind(&UnlimitedLocalStorageTestCallback)); 283 id, settings::LOCAL, base::Bind(&UnlimitedLocalStorageTestCallback));
284 284
285 base::MessageLoop::current()->RunUntilIdle(); 285 base::MessageLoop::current()->RunUntilIdle();
286 } 286 }
287 287
288 } // namespace extensions 288 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698