| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 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 // Basic tests that verify our KURL's interface behaves the same as the | 31 // Basic tests that verify our KURL's interface behaves the same as the |
| 32 // original KURL's. | 32 // original KURL's. |
| 33 | 33 |
| 34 #include "platform/weborigin/KURL.h" | 34 #include "platform/weborigin/KURL.h" |
| 35 | 35 |
| 36 #include "platform/wtf/StdLibExtras.h" |
| 37 #include "platform/wtf/text/CString.h" |
| 38 #include "platform/wtf/text/WTFString.h" |
| 36 #include "testing/gtest/include/gtest/gtest.h" | 39 #include "testing/gtest/include/gtest/gtest.h" |
| 37 #include "url/url_util.h" | 40 #include "url/url_util.h" |
| 38 #include "wtf/StdLibExtras.h" | |
| 39 #include "wtf/text/CString.h" | |
| 40 #include "wtf/text/WTFString.h" | |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 TEST(KURLTest, Getters) { | 44 TEST(KURLTest, Getters) { |
| 45 struct GetterCase { | 45 struct GetterCase { |
| 46 const char* url; | 46 const char* url; |
| 47 const char* protocol; | 47 const char* protocol; |
| 48 const char* host; | 48 const char* host; |
| 49 int port; | 49 int port; |
| 50 const char* user; | 50 const char* user; |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 }; | 755 }; |
| 756 | 756 |
| 757 for (size_t i = 0; i < WTF_ARRAY_LENGTH(referrerCases); i++) { | 757 for (size_t i = 0; i < WTF_ARRAY_LENGTH(referrerCases); i++) { |
| 758 KURL kurl(ParsedURLString, referrerCases[i].input); | 758 KURL kurl(ParsedURLString, referrerCases[i].input); |
| 759 String referrer = kurl.strippedForUseAsReferrer(); | 759 String referrer = kurl.strippedForUseAsReferrer(); |
| 760 EXPECT_STREQ(referrerCases[i].output, referrer.utf8().data()); | 760 EXPECT_STREQ(referrerCases[i].output, referrer.utf8().data()); |
| 761 } | 761 } |
| 762 } | 762 } |
| 763 | 763 |
| 764 } // namespace blink | 764 } // namespace blink |
| OLD | NEW |