Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1619)

Side by Side Diff: Source/weborigin/KURLTest.cpp

Issue 24255018: Side three of two-sided patch for URL encoding. Restores tests expectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missing two platform origin-exact-matching-expected.txt files Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/platform/mac-snowleopard/http/tests/xmlhttprequest/origin-exact-matching-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 { 298 {
299 struct EncodeCase { 299 struct EncodeCase {
300 const char* input; 300 const char* input;
301 const char* output; 301 const char* output;
302 } encode_cases[] = { 302 } encode_cases[] = {
303 {"hello, world", "hello%2C%20world"}, 303 {"hello, world", "hello%2C%20world"},
304 {"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", 304 {"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
305 "%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F"}, 305 "%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F"},
306 {"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F", 306 {"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
307 "%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F"}, 307 "%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F"},
308 {" !\"#$%&'()*+,-./", 308 {" !\"#$%&'()*+,-./", "%20!%22%23%24%25%26%27()*%2B%2C-./"},
309 "%20!%22%23%24%25%26'()*%2B%2C-./"},
310 {"0123456789:;<=>?", 309 {"0123456789:;<=>?",
311 "0123456789%3A%3B%3C%3D%3E%3F"}, 310 "0123456789%3A%3B%3C%3D%3E%3F"},
312 {"@ABCDEFGHIJKLMNO", 311 {"@ABCDEFGHIJKLMNO",
313 "%40ABCDEFGHIJKLMNO"}, 312 "%40ABCDEFGHIJKLMNO"},
314 {"PQRSTUVWXYZ[\\]^_", 313 {"PQRSTUVWXYZ[\\]^_",
315 "PQRSTUVWXYZ%5B%5C%5D%5E_"}, 314 "PQRSTUVWXYZ%5B%5C%5D%5E_"},
316 {"`abcdefghijklmno", 315 {"`abcdefghijklmno",
317 "%60abcdefghijklmno"}, 316 "%60abcdefghijklmno"},
318 {"pqrstuvwxyz{|}~\x7f", 317 {"pqrstuvwxyz{|}~\x7f",
319 "pqrstuvwxyz%7B%7C%7D~%7F"}, 318 "pqrstuvwxyz%7B%7C%7D~%7F"},
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 WebCore::KURL url2(WebCore::ParsedURLString, "foo-bar:"); 650 WebCore::KURL url2(WebCore::ParsedURLString, "foo-bar:");
652 EXPECT_TRUE(url2.protocolIs("foo-bar")); 651 EXPECT_TRUE(url2.protocolIs("foo-bar"));
653 EXPECT_FALSE(url2.protocolIs("foo")); 652 EXPECT_FALSE(url2.protocolIs("foo"));
654 653
655 WebCore::KURL invalidUTF8(WebCore::ParsedURLString, "http://a@9%aa%:"); 654 WebCore::KURL invalidUTF8(WebCore::ParsedURLString, "http://a@9%aa%:");
656 EXPECT_FALSE(invalidUTF8.protocolIs("http")); 655 EXPECT_FALSE(invalidUTF8.protocolIs("http"));
657 EXPECT_TRUE(invalidUTF8.protocolIs("")); 656 EXPECT_TRUE(invalidUTF8.protocolIs(""));
658 } 657 }
659 658
660 } // namespace 659 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/platform/mac-snowleopard/http/tests/xmlhttprequest/origin-exact-matching-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698