| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 break; | 172 break; |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 if (completeURL.isNull() || !m_rewriteURLs.contains(completeURL)) | 176 if (completeURL.isNull() || !m_rewriteURLs.contains(completeURL)) |
| 177 return false; | 177 return false; |
| 178 | 178 |
| 179 StringBuilder uriBuilder; | 179 StringBuilder uriBuilder; |
| 180 uriBuilder.append(m_rewriteFolder); | 180 uriBuilder.append(m_rewriteFolder); |
| 181 uriBuilder.append('/'); | 181 uriBuilder.append('/'); |
| 182 uriBuilder.append(m_rewriteURLs.get(completeURL)); | 182 uriBuilder.append(m_rewriteURLs.at(completeURL)); |
| 183 rewrittenLink = uriBuilder.toString(); | 183 rewrittenLink = uriBuilder.toString(); |
| 184 return true; | 184 return true; |
| 185 } | 185 } |
| 186 | 186 |
| 187 bool shouldSkipResourceWithURL(const KURL& url) { | 187 bool shouldSkipResourceWithURL(const KURL& url) { |
| 188 return m_skipURLs.contains(url); | 188 return m_skipURLs.contains(url); |
| 189 } | 189 } |
| 190 | 190 |
| 191 FrameTestHelpers::WebViewHelper m_helper; | 191 FrameTestHelpers::WebViewHelper m_helper; |
| 192 std::string m_folder; | 192 std::string m_folder; |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 KURL(ParsedURLString, "http://foo.com?--"))); | 554 KURL(ParsedURLString, "http://foo.com?--"))); |
| 555 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", | 555 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", |
| 556 FrameSerializer::markOfTheWebDeclaration( | 556 FrameSerializer::markOfTheWebDeclaration( |
| 557 KURL(ParsedURLString, "http://foo.com#--"))); | 557 KURL(ParsedURLString, "http://foo.com#--"))); |
| 558 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", | 558 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", |
| 559 FrameSerializer::markOfTheWebDeclaration( | 559 FrameSerializer::markOfTheWebDeclaration( |
| 560 KURL(ParsedURLString, "http://foo.com#bar--baz"))); | 560 KURL(ParsedURLString, "http://foo.com#bar--baz"))); |
| 561 } | 561 } |
| 562 | 562 |
| 563 } // namespace blink | 563 } // namespace blink |
| OLD | NEW |