| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 FrameTestHelpers::loadFrame(mainFrameImpl(), url.utf8().data()); | 116 FrameTestHelpers::loadFrame(mainFrameImpl(), url.utf8().data()); |
| 117 SingleLinkRewritingDelegate delegate(parsedURL, WebString("local")); | 117 SingleLinkRewritingDelegate delegate(parsedURL, WebString("local")); |
| 118 SimpleWebFrameSerializerClient serializerClient; | 118 SimpleWebFrameSerializerClient serializerClient; |
| 119 WebFrameSerializer::serialize( | 119 WebFrameSerializer::serialize( |
| 120 mainFrameImpl(), &serializerClient, &delegate); | 120 mainFrameImpl(), &serializerClient, &delegate); |
| 121 return serializerClient.toString(); | 121 return serializerClient.toString(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 WebLocalFrameImpl* mainFrameImpl() | 124 WebLocalFrameImpl* mainFrameImpl() |
| 125 { | 125 { |
| 126 return m_helper.webViewImpl()->mainFrameImpl(); | 126 return m_helper.webView()->mainFrameImpl(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 FrameTestHelpers::WebViewHelper m_helper; | 130 FrameTestHelpers::WebViewHelper m_helper; |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 TEST_F(WebFrameSerializerTest, URLAttributeValues) | 133 TEST_F(WebFrameSerializerTest, URLAttributeValues) |
| 134 { | 134 { |
| 135 registerMockedImageURL("javascript:\""); | 135 registerMockedImageURL("javascript:\""); |
| 136 | 136 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 159 EXPECT_EQ(expectedHTML, actualHTML); | 159 EXPECT_EQ(expectedHTML, actualHTML); |
| 160 } | 160 } |
| 161 | 161 |
| 162 TEST_F(WebFrameSerializerTest, FromUrlWithMinusMinus) | 162 TEST_F(WebFrameSerializerTest, FromUrlWithMinusMinus) |
| 163 { | 163 { |
| 164 String actualHTML = serializeFile("http://www.test.com?--x--", "text_only_pa
ge.html"); | 164 String actualHTML = serializeFile("http://www.test.com?--x--", "text_only_pa
ge.html"); |
| 165 EXPECT_EQ("<!-- saved from url=(0030)http://www.test.com/?-%2Dx-%2D -->", ac
tualHTML.substring(1, 60)); | 165 EXPECT_EQ("<!-- saved from url=(0030)http://www.test.com/?-%2Dx-%2D -->", ac
tualHTML.substring(1, 60)); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |