| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 {"example.test", "example.test", true}, | 509 {"example.test", "example.test", true}, |
| 510 {"EXAMPLE.TEST", "example.test", true}, | 510 {"EXAMPLE.TEST", "example.test", true}, |
| 511 {"eXaMpLe.TeSt/path", "example.test%2Fpath", false}, | 511 {"eXaMpLe.TeSt/path", "example.test%2Fpath", false}, |
| 512 {",", "%2C", true}, | 512 {",", "%2C", true}, |
| 513 {"💩", "xn--ls8h", true}, | 513 {"💩", "xn--ls8h", true}, |
| 514 {"[]", "[]", false}, | 514 {"[]", "[]", false}, |
| 515 {"%yo", "%25yo", false}, | 515 {"%yo", "%25yo", false}, |
| 516 }; | 516 }; |
| 517 | 517 |
| 518 for (const TestCase& test : cases) { | 518 for (const TestCase& test : cases) { |
| 519 SCOPED_TRACE(testing::Message() << "raw host: '" << test.host << "'"); | 519 SCOPED_TRACE(::testing::Message() << "raw host: '" << test.host << "'"); |
| 520 String host = String::FromUTF8(test.host); | 520 String host = String::FromUTF8(test.host); |
| 521 bool success = false; | 521 bool success = false; |
| 522 String canonical_host = SecurityOrigin::CanonicalizeHost(host, &success); | 522 String canonical_host = SecurityOrigin::CanonicalizeHost(host, &success); |
| 523 EXPECT_EQ(test.canonical_output, canonical_host); | 523 EXPECT_EQ(test.canonical_output, canonical_host); |
| 524 EXPECT_EQ(test.expected_success, success); | 524 EXPECT_EQ(test.expected_success, success); |
| 525 } | 525 } |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace blink | 528 } // namespace blink |
| OLD | NEW |