OLD | NEW |
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/browser/dom_storage/dom_storage_database.h" | 5 #include "webkit/browser/dom_storage/dom_storage_database.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "sql/statement.h" | 12 #include "sql/statement.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace dom_storage { | 15 namespace dom_storage { |
16 | 16 |
17 void CreateV1Table(sql::Connection* db) { | 17 void CreateV1Table(sql::Connection* db) { |
18 ASSERT_TRUE(db->is_open()); | 18 ASSERT_TRUE(db->is_open()); |
19 ASSERT_TRUE(db->Execute("DROP TABLE IF EXISTS ItemTable")); | 19 ASSERT_TRUE(db->Execute("DROP TABLE IF EXISTS ItemTable")); |
20 ASSERT_TRUE(db->Execute( | 20 ASSERT_TRUE(db->Execute( |
21 "CREATE TABLE ItemTable (" | 21 "CREATE TABLE ItemTable (" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |