| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <ostream> |
| 7 | 8 |
| 8 #include "base/logging.h" | |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "gtest/gtest-message.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 12 #include "url/origin.h" | 13 #include "url/origin.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 TEST(OriginTest, UniqueOriginComparison) { | 17 TEST(OriginTest, UniqueOriginComparison) { |
| 17 url::Origin unique_origin; | 18 url::Origin unique_origin; |
| 18 EXPECT_EQ("", unique_origin.scheme()); | 19 EXPECT_EQ("", unique_origin.scheme()); |
| 19 EXPECT_EQ("", unique_origin.host()); | 20 EXPECT_EQ("", unique_origin.host()); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 std::string(test.host, test.host_length), test.port); | 247 std::string(test.host, test.host_length), test.port); |
| 247 EXPECT_EQ("", origin.scheme()); | 248 EXPECT_EQ("", origin.scheme()); |
| 248 EXPECT_EQ("", origin.host()); | 249 EXPECT_EQ("", origin.host()); |
| 249 EXPECT_EQ(0, origin.port()); | 250 EXPECT_EQ(0, origin.port()); |
| 250 EXPECT_TRUE(origin.unique()); | 251 EXPECT_TRUE(origin.unique()); |
| 251 EXPECT_FALSE(origin.IsSameOriginWith(origin)); | 252 EXPECT_FALSE(origin.IsSameOriginWith(origin)); |
| 252 } | 253 } |
| 253 } | 254 } |
| 254 | 255 |
| 255 } // namespace url | 256 } // namespace url |
| OLD | NEW |