| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 WebURLResponse response; | 101 WebURLResponse response; |
| 102 response.setMIMEType("text/html"); | 102 response.setMIMEType("text/html"); |
| 103 response.setHTTPStatusCode(statusCode); | 103 response.setHTTPStatusCode(statusCode); |
| 104 | 104 |
| 105 Platform::current()->getURLLoaderMockFactory()->registerErrorURL( | 105 Platform::current()->getURLLoaderMockFactory()->registerErrorURL( |
| 106 KURL(m_baseUrl, file), response, error); | 106 KURL(m_baseUrl, file), response, error); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void registerRewriteURL(const char* fromURL, const char* toURL) { | 109 void registerRewriteURL(const char* fromURL, const char* toURL) { |
| 110 m_rewriteURLs.add(fromURL, toURL); | 110 m_rewriteURLs.insert(fromURL, toURL); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void registerSkipURL(const char* url) { | 113 void registerSkipURL(const char* url) { |
| 114 m_skipURLs.push_back(KURL(m_baseUrl, url)); | 114 m_skipURLs.push_back(KURL(m_baseUrl, url)); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void serialize(const char* url) { | 117 void serialize(const char* url) { |
| 118 FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), | 118 FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), |
| 119 KURL(m_baseUrl, url).getString().utf8().data()); | 119 KURL(m_baseUrl, url).getString().utf8().data()); |
| 120 FrameSerializer serializer(m_resources, *this); | 120 FrameSerializer serializer(m_resources, *this); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 KURL(ParsedURLString, "http://foo.com?--"))); | 553 KURL(ParsedURLString, "http://foo.com?--"))); |
| 554 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", | 554 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", |
| 555 FrameSerializer::markOfTheWebDeclaration( | 555 FrameSerializer::markOfTheWebDeclaration( |
| 556 KURL(ParsedURLString, "http://foo.com#--"))); | 556 KURL(ParsedURLString, "http://foo.com#--"))); |
| 557 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", | 557 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", |
| 558 FrameSerializer::markOfTheWebDeclaration( | 558 FrameSerializer::markOfTheWebDeclaration( |
| 559 KURL(ParsedURLString, "http://foo.com#bar--baz"))); | 559 KURL(ParsedURLString, "http://foo.com#bar--baz"))); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace blink | 562 } // namespace blink |
| OLD | NEW |