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

Side by Side Diff: webkit/dom_storage/dom_storage_database_unittest.cc

Issue 10317028: webkit: Instead of doing a conversion just use string16(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/dom_storage/dom_storage_database.h" 5 #include "webkit/dom_storage/dom_storage_database.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 string16 kCannedKeys[] = { 84 string16 kCannedKeys[] = {
85 ASCIIToUTF16("test"), 85 ASCIIToUTF16("test"),
86 ASCIIToUTF16("company"), 86 ASCIIToUTF16("company"),
87 ASCIIToUTF16("date"), 87 ASCIIToUTF16("date"),
88 ASCIIToUTF16("empty") 88 ASCIIToUTF16("empty")
89 }; 89 };
90 NullableString16 kCannedValues[] = { 90 NullableString16 kCannedValues[] = {
91 NullableString16(ASCIIToUTF16("123"), false), 91 NullableString16(ASCIIToUTF16("123"), false),
92 NullableString16(ASCIIToUTF16("Google"), false), 92 NullableString16(ASCIIToUTF16("Google"), false),
93 NullableString16(ASCIIToUTF16("18-01-2012"), false), 93 NullableString16(ASCIIToUTF16("18-01-2012"), false),
94 NullableString16(ASCIIToUTF16(""), false) 94 NullableString16(string16(), false)
95 }; 95 };
96 for (unsigned i = 0; i < sizeof(kCannedKeys) / sizeof(kCannedKeys[0]); i++) 96 for (unsigned i = 0; i < sizeof(kCannedKeys) / sizeof(kCannedKeys[0]); i++)
97 (*values)[kCannedKeys[i]] = kCannedValues[i]; 97 (*values)[kCannedKeys[i]] = kCannedValues[i];
98 } 98 }
99 99
100 TEST(DomStorageDatabaseTest, SimpleOpenAndClose) { 100 TEST(DomStorageDatabaseTest, SimpleOpenAndClose) {
101 DomStorageDatabase db; 101 DomStorageDatabase db;
102 EXPECT_FALSE(db.IsOpen()); 102 EXPECT_FALSE(db.IsOpen());
103 ASSERT_TRUE(db.LazyOpen(true)); 103 ASSERT_TRUE(db.LazyOpen(true));
104 EXPECT_TRUE(db.IsOpen()); 104 EXPECT_TRUE(db.IsOpen());
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 db.ReadAllValues(&values); 368 db.ReadAllValues(&values);
369 EXPECT_EQ(0u, values.size()); 369 EXPECT_EQ(0u, values.size());
370 EXPECT_FALSE(db.IsOpen()); 370 EXPECT_FALSE(db.IsOpen());
371 371
372 EXPECT_TRUE(file_util::PathExists(temp_dir.path())); 372 EXPECT_TRUE(file_util::PathExists(temp_dir.path()));
373 } 373 }
374 } 374 }
375 375
376 } // namespace dom_storage 376 } // namespace dom_storage
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698