| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/database/database_identifier.h" | 5 #include "webkit/common/database/database_identifier.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "googleurl/src/gurl.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "url/gurl.h" |
| 10 | 10 |
| 11 namespace webkit_database { | 11 namespace webkit_database { |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 TEST(DatabaseIdentifierTest, CreateIdentifierFromOrigin) { | 14 TEST(DatabaseIdentifierTest, CreateIdentifierFromOrigin) { |
| 15 struct OriginTestCase { | 15 struct OriginTestCase { |
| 16 std::string origin; | 16 std::string origin; |
| 17 std::string expectedIdentifier; | 17 std::string expectedIdentifier; |
| 18 } cases[] = { | 18 } cases[] = { |
| 19 {"http://google.com", "http_google.com_0"}, | 19 {"http://google.com", "http_google.com_0"}, |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 << "test case " << bogus_components[i]; | 236 << "test case " << bogus_components[i]; |
| 237 EXPECT_EQ(GURL("null"), identifier.ToOrigin()) | 237 EXPECT_EQ(GURL("null"), identifier.ToOrigin()) |
| 238 << "test case " << bogus_components[i]; | 238 << "test case " << bogus_components[i]; |
| 239 EXPECT_EQ(true, identifier.is_unique()) | 239 EXPECT_EQ(true, identifier.is_unique()) |
| 240 << "test case " << bogus_components[i]; | 240 << "test case " << bogus_components[i]; |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace | 244 } // namespace |
| 245 } // namespace webkit_database | 245 } // namespace webkit_database |
| OLD | NEW |