OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_util.h" | 6 #include "base/files/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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
12 #include "content/public/test/test_browser_context.h" | 12 #include "content/public/test/test_browser_context.h" |
13 #include "content/public/test/test_browser_thread.h" | 13 #include "content/public/test/test_browser_thread.h" |
14 #include "extensions/browser/api/extensions_api_client.h" | 14 #include "extensions/browser/api/extensions_api_client.h" |
15 #include "extensions/browser/api/storage/leveldb_settings_storage_factory.h" | 15 #include "extensions/browser/api/storage/leveldb_settings_storage_factory.h" |
16 #include "extensions/browser/api/storage/settings_namespace.h" | 16 #include "extensions/browser/api/storage/settings_namespace.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Local storage should run out after ~5MB. | 211 // Local storage should run out after ~5MB. |
212 scoped_ptr<base::Value> megabyte = util::CreateMegabyte(); | 212 scoped_ptr<base::Value> megabyte = util::CreateMegabyte(); |
213 for (int i = 0; i < 5; ++i) { | 213 for (int i = 0; i < 5; ++i) { |
214 local_storage->Set(DEFAULTS, base::StringPrintf("%d", i), *megabyte); | 214 local_storage->Set(DEFAULTS, base::StringPrintf("%d", i), *megabyte); |
215 } | 215 } |
216 | 216 |
217 EXPECT_TRUE(local_storage->Set(DEFAULTS, "WillError", *megabyte)->HasError()); | 217 EXPECT_TRUE(local_storage->Set(DEFAULTS, "WillError", *megabyte)->HasError()); |
218 } | 218 } |
219 | 219 |
220 } // namespace extensions | 220 } // namespace extensions |
OLD | NEW |