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

Unified Diff: content/common/dom_storage/dom_storage_map_unittest.cc

Issue 22297005: Move webkit/{browser,common}/dom_storage into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/dom_storage/dom_storage_map.cc ('k') | content/common/dom_storage/dom_storage_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/dom_storage/dom_storage_map_unittest.cc
diff --git a/webkit/common/dom_storage/dom_storage_map_unittest.cc b/content/common/dom_storage/dom_storage_map_unittest.cc
similarity index 90%
rename from webkit/common/dom_storage/dom_storage_map_unittest.cc
rename to content/common/dom_storage/dom_storage_map_unittest.cc
index d634bce977208a34a4b89bd495c9abe4446be138..76133bf10a153cb23c978b1f9902fd47cefb4b40 100644
--- a/webkit/common/dom_storage/dom_storage_map_unittest.cc
+++ b/content/common/dom_storage/dom_storage_map_unittest.cc
@@ -3,12 +3,12 @@
// found in the LICENSE file.
#include "base/strings/utf_string_conversions.h"
+#include "content/common/dom_storage/dom_storage_map.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/common/dom_storage/dom_storage_map.h"
-namespace dom_storage {
+namespace content {
-TEST(DomStorageMapTest, DomStorageMapBasics) {
+TEST(DOMStorageMapTest, DOMStorageMapBasics) {
const base::string16 kKey(ASCIIToUTF16("key"));
const base::string16 kValue(ASCIIToUTF16("value"));
const size_t kValueBytes = kValue.size() * sizeof(char16);
@@ -21,11 +21,11 @@ TEST(DomStorageMapTest, DomStorageMapBasics) {
(kKey2.size() + kValue2.size()) * sizeof(char16);
const size_t kQuota = 1024; // 1K quota for this test.
- scoped_refptr<DomStorageMap> map(new DomStorageMap(kQuota));
+ scoped_refptr<DOMStorageMap> map(new DOMStorageMap(kQuota));
base::string16 old_value;
base::NullableString16 old_nullable_value;
- ValuesMap swap;
- scoped_refptr<DomStorageMap> copy;
+ DOMStorageValuesMap swap;
+ scoped_refptr<DOMStorageMap> copy;
// Check the behavior of an empty map.
EXPECT_EQ(0u, map->Length());
@@ -82,19 +82,19 @@ TEST(DomStorageMapTest, DomStorageMapBasics) {
EXPECT_EQ(0u, map->bytes_used());
}
-TEST(DomStorageMapTest, EnforcesQuota) {
+TEST(DOMStorageMapTest, EnforcesQuota) {
const base::string16 kKey = ASCIIToUTF16("test_key");
const base::string16 kValue = ASCIIToUTF16("test_value");
const base::string16 kKey2 = ASCIIToUTF16("test_key_2");
// A 50 byte quota is too small to hold both keys, so we
- // should see the DomStorageMap enforcing it.
+ // should see the DOMStorageMap enforcing it.
const size_t kQuota = 50;
base::string16 old_value;
base::NullableString16 old_nullable_value;
- scoped_refptr<DomStorageMap> map(new DomStorageMap(kQuota));
+ scoped_refptr<DOMStorageMap> map(new DOMStorageMap(kQuota));
EXPECT_TRUE(map->SetItem(kKey, kValue, &old_nullable_value));
EXPECT_FALSE(map->SetItem(kKey2, kValue, &old_nullable_value));
EXPECT_EQ(1u, map->Length());
@@ -106,7 +106,7 @@ TEST(DomStorageMapTest, EnforcesQuota) {
EXPECT_EQ(1u, map->Length());
// Verify that the SwapValues method does not do quota checking.
- ValuesMap swap;
+ DOMStorageValuesMap swap;
swap[kKey] = base::NullableString16(kValue, false);
swap[kKey2] = base::NullableString16(kValue, false);
map->SwapValues(&swap);
@@ -121,4 +121,4 @@ TEST(DomStorageMapTest, EnforcesQuota) {
EXPECT_EQ(kValue, old_nullable_value.string());
}
-} // namespace dom_storage
+} // namespace content
« no previous file with comments | « content/common/dom_storage/dom_storage_map.cc ('k') | content/common/dom_storage/dom_storage_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698