OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
11 #include "webkit/fileapi/file_system_origin_database.h" | 11 #include "webkit/fileapi/file_system_origin_database.h" |
12 | 12 |
13 namespace fileapi { | 13 namespace fileapi { |
14 | 14 |
15 TEST(FileSystemOriginDatabaseTest, BasicTest) { | 15 TEST(FileSystemOriginDatabaseTest, BasicTest) { |
16 ScopedTempDir dir; | 16 ScopedTempDir dir; |
17 ASSERT_TRUE(dir.CreateUniqueTempDir()); | 17 ASSERT_TRUE(dir.CreateUniqueTempDir()); |
18 const FilePath kDBFile = dir.path().AppendASCII("fsod.db"); | 18 const FilePath kDBFile = dir.path().AppendASCII("fsod.db"); |
19 EXPECT_FALSE(file_util::PathExists(kDBFile)); | 19 EXPECT_FALSE(file_util::PathExists(kDBFile)); |
20 | 20 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 EXPECT_EQ(origins[1].second, path1); | 157 EXPECT_EQ(origins[1].second, path1); |
158 } else { | 158 } else { |
159 EXPECT_EQ(origins[0].first, origin1); | 159 EXPECT_EQ(origins[0].first, origin1); |
160 EXPECT_EQ(origins[0].second, path1); | 160 EXPECT_EQ(origins[0].second, path1); |
161 EXPECT_EQ(origins[1].first, origin0); | 161 EXPECT_EQ(origins[1].first, origin0); |
162 EXPECT_EQ(origins[1].second, path0); | 162 EXPECT_EQ(origins[1].second, path0); |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 } // namespace fileapi | 166 } // namespace fileapi |
OLD | NEW |