OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 registerURL(file, file, mimeType); | 98 registerURL(file, file, mimeType); |
99 } | 99 } |
100 | 100 |
101 void registerErrorURL(const char* file, int statusCode) | 101 void registerErrorURL(const char* file, int statusCode) |
102 { | 102 { |
103 WebURLError error; | 103 WebURLError error; |
104 error.reason = 0xdead + statusCode; | 104 error.reason = 0xdead + statusCode; |
105 error.domain = "FrameSerializerTest"; | 105 error.domain = "FrameSerializerTest"; |
106 | 106 |
107 WebURLResponse response; | 107 WebURLResponse response; |
108 response.initialize(); | |
109 response.setMIMEType("text/html"); | 108 response.setMIMEType("text/html"); |
110 response.setHTTPStatusCode(statusCode); | 109 response.setHTTPStatusCode(statusCode); |
111 | 110 |
112 Platform::current()->getURLLoaderMockFactory()->registerErrorURL(KURL(m_
baseUrl, file), response, error); | 111 Platform::current()->getURLLoaderMockFactory()->registerErrorURL(KURL(m_
baseUrl, file), response, error); |
113 } | 112 } |
114 | 113 |
115 void registerRewriteURL(const char* fromURL, const char* toURL) | 114 void registerRewriteURL(const char* fromURL, const char* toURL) |
116 { | 115 { |
117 m_rewriteURLs.add(fromURL, toURL); | 116 m_rewriteURLs.add(fromURL, toURL); |
118 } | 117 } |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 EXPECT_EQ("saved from url=(0015)http://foo.com/", FrameSerializer::markOfThe
WebDeclaration(KURL(ParsedURLString, "http://foo.com"))); | 525 EXPECT_EQ("saved from url=(0015)http://foo.com/", FrameSerializer::markOfThe
WebDeclaration(KURL(ParsedURLString, "http://foo.com"))); |
527 EXPECT_EQ("saved from url=(0015)http://f-o.com/", FrameSerializer::markOfThe
WebDeclaration(KURL(ParsedURLString, "http://f-o.com"))); | 526 EXPECT_EQ("saved from url=(0015)http://f-o.com/", FrameSerializer::markOfThe
WebDeclaration(KURL(ParsedURLString, "http://f-o.com"))); |
528 EXPECT_EQ("saved from url=(0019)http://foo.com-%2D/", FrameSerializer::markO
fTheWebDeclaration(KURL(ParsedURLString, "http://foo.com--"))); | 527 EXPECT_EQ("saved from url=(0019)http://foo.com-%2D/", FrameSerializer::markO
fTheWebDeclaration(KURL(ParsedURLString, "http://foo.com--"))); |
529 EXPECT_EQ("saved from url=(0024)http://f-%2D.com-%2D%3E/", FrameSerializer::
markOfTheWebDeclaration(KURL(ParsedURLString, "http://f--.com-->"))); | 528 EXPECT_EQ("saved from url=(0024)http://f-%2D.com-%2D%3E/", FrameSerializer::
markOfTheWebDeclaration(KURL(ParsedURLString, "http://f--.com-->"))); |
530 EXPECT_EQ("saved from url=(0020)http://foo.com/?-%2D", FrameSerializer::mark
OfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com?--"))); | 529 EXPECT_EQ("saved from url=(0020)http://foo.com/?-%2D", FrameSerializer::mark
OfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com?--"))); |
531 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", FrameSerializer::mark
OfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#--"))); | 530 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", FrameSerializer::mark
OfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#--"))); |
532 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", FrameSerializer
::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#bar--baz"))); | 531 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", FrameSerializer
::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#bar--baz"))); |
533 } | 532 } |
534 | 533 |
535 } // namespace blink | 534 } // namespace blink |
OLD | NEW |