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

Side by Side Diff: webkit/common/dom_storage/dom_storage_map_unittest.cc

Issue 15995038: Use a direct include of utf_string_conversions.h in google_apis/, gpu/, ipc/, media/, ppapi/, print… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better 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/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "webkit/common/dom_storage/dom_storage_map.h" 7 #include "webkit/common/dom_storage/dom_storage_map.h"
8 8
9 namespace dom_storage { 9 namespace dom_storage {
10 10
11 TEST(DomStorageMapTest, DomStorageMapBasics) { 11 TEST(DomStorageMapTest, DomStorageMapBasics) {
12 const base::string16 kKey(ASCIIToUTF16("key")); 12 const base::string16 kKey(ASCIIToUTF16("key"));
13 const base::string16 kValue(ASCIIToUTF16("value")); 13 const base::string16 kValue(ASCIIToUTF16("value"));
14 const size_t kValueBytes = kValue.size() * sizeof(char16); 14 const size_t kValueBytes = kValue.size() * sizeof(char16);
15 const size_t kItemBytes = 15 const size_t kItemBytes =
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // When overbudget, a new value of greater size than the existing value can 115 // When overbudget, a new value of greater size than the existing value can
116 // not be set, but a new value of lesser or equal size can be set. 116 // not be set, but a new value of lesser or equal size can be set.
117 EXPECT_TRUE(map->SetItem(kKey, kValue, &old_nullable_value)); 117 EXPECT_TRUE(map->SetItem(kKey, kValue, &old_nullable_value));
118 EXPECT_FALSE(map->SetItem(kKey, base::string16(kValue + kValue), 118 EXPECT_FALSE(map->SetItem(kKey, base::string16(kValue + kValue),
119 &old_nullable_value)); 119 &old_nullable_value));
120 EXPECT_TRUE(map->SetItem(kKey, base::string16(), &old_nullable_value)); 120 EXPECT_TRUE(map->SetItem(kKey, base::string16(), &old_nullable_value));
121 EXPECT_EQ(kValue, old_nullable_value.string()); 121 EXPECT_EQ(kValue, old_nullable_value.string());
122 } 122 }
123 123
124 } // namespace dom_storage 124 } // namespace dom_storage
OLDNEW
« no previous file with comments | « webkit/common/database/database_connections_unittest.cc ('k') | webkit/common/fileapi/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698