| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "platform/weborigin/SecurityOrigin.h" | 31 #include "platform/weborigin/SecurityOrigin.h" |
| 32 | 32 |
| 33 #include "platform/RuntimeEnabledFeatures.h" | 33 #include "platform/RuntimeEnabledFeatures.h" |
| 34 #include "platform/blob/BlobURL.h" | 34 #include "platform/blob/BlobURL.h" |
| 35 #include "platform/weborigin/KURL.h" | 35 #include "platform/weborigin/KURL.h" |
| 36 #include "platform/weborigin/SecurityPolicy.h" | 36 #include "platform/weborigin/SecurityPolicy.h" |
| 37 #include "platform/weborigin/Suborigin.h" | 37 #include "platform/weborigin/Suborigin.h" |
| 38 #include "platform/wtf/text/StringBuilder.h" |
| 39 #include "platform/wtf/text/WTFString.h" |
| 38 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
| 39 #include "url/url_util.h" | 41 #include "url/url_util.h" |
| 40 #include "wtf/text/StringBuilder.h" | |
| 41 #include "wtf/text/WTFString.h" | |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 const int MaxAllowedPort = 65535; | 45 const int MaxAllowedPort = 65535; |
| 46 | 46 |
| 47 class SecurityOriginTest : public ::testing::Test { | 47 class SecurityOriginTest : public ::testing::Test { |
| 48 public: | 48 public: |
| 49 void SetUp() override { | 49 void SetUp() override { |
| 50 url::AddStandardScheme("http-so", url::SCHEME_WITH_PORT); | 50 url::AddStandardScheme("http-so", url::SCHEME_WITH_PORT); |
| 51 url::AddStandardScheme("https-so", url::SCHEME_WITH_PORT); | 51 url::AddStandardScheme("https-so", url::SCHEME_WITH_PORT); |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 SCOPED_TRACE(testing::Message() << "raw host: '" << test.host << "'"); | 522 SCOPED_TRACE(testing::Message() << "raw host: '" << test.host << "'"); |
| 523 String host = String::fromUTF8(test.host); | 523 String host = String::fromUTF8(test.host); |
| 524 bool success = false; | 524 bool success = false; |
| 525 String canonicalHost = SecurityOrigin::canonicalizeHost(host, &success); | 525 String canonicalHost = SecurityOrigin::canonicalizeHost(host, &success); |
| 526 EXPECT_EQ(test.canonicalOutput, canonicalHost); | 526 EXPECT_EQ(test.canonicalOutput, canonicalHost); |
| 527 EXPECT_EQ(test.expectedSuccess, success); | 527 EXPECT_EQ(test.expectedSuccess, success); |
| 528 } | 528 } |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace blink | 531 } // namespace blink |
| OLD | NEW |