| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return matches; | 100 return matches; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace | 103 } // namespace |
| 104 | 104 |
| 105 class WebFrameSerializerTest : public ::testing::Test { | 105 class WebFrameSerializerTest : public ::testing::Test { |
| 106 protected: | 106 protected: |
| 107 WebFrameSerializerTest() { m_helper.initialize(); } | 107 WebFrameSerializerTest() { m_helper.initialize(); } |
| 108 | 108 |
| 109 ~WebFrameSerializerTest() override { | 109 ~WebFrameSerializerTest() override { |
| 110 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs(); | 110 Platform::current() |
| 111 WebCache::clear(); | 111 ->getURLLoaderMockFactory() |
| 112 ->unregisterAllURLsAndClearMemoryCache(); |
| 112 } | 113 } |
| 113 | 114 |
| 114 void registerMockedImageURLLoad(const String& url) { | 115 void registerMockedImageURLLoad(const String& url) { |
| 115 // Image resources need to be mocked, but irrelevant here what image they | 116 // Image resources need to be mocked, but irrelevant here what image they |
| 116 // map to. | 117 // map to. |
| 117 registerMockedFileURLLoad(URLTestHelpers::toKURL(url.utf8().data()), | 118 registerMockedFileURLLoad(URLTestHelpers::toKURL(url.utf8().data()), |
| 118 "frameserialization/awesome.png"); | 119 "frameserialization/awesome.png"); |
| 119 } | 120 } |
| 120 void registerMockedFileURLLoad(const KURL& url, | 121 void registerMockedFileURLLoad(const KURL& url, |
| 121 const String& filePath, | 122 const String& filePath, |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 359 |
| 359 TEST_F(WebFrameSerializerSanitizationTest, KeepPopupOverlayIfNotRequested) { | 360 TEST_F(WebFrameSerializerSanitizationTest, KeepPopupOverlayIfNotRequested) { |
| 360 webView()->resize(WebSize(500, 500)); | 361 webView()->resize(WebSize(500, 500)); |
| 361 setRemovePopupOverlay(false); | 362 setRemovePopupOverlay(false); |
| 362 String mhtml = generateMHTMLParts("http://www.test.com", "popup.html"); | 363 String mhtml = generateMHTMLParts("http://www.test.com", "popup.html"); |
| 363 EXPECT_NE(WTF::kNotFound, mhtml.find("class=3D\"overlay")); | 364 EXPECT_NE(WTF::kNotFound, mhtml.find("class=3D\"overlay")); |
| 364 EXPECT_NE(WTF::kNotFound, mhtml.find("class=3D\"modal")); | 365 EXPECT_NE(WTF::kNotFound, mhtml.find("class=3D\"modal")); |
| 365 } | 366 } |
| 366 | 367 |
| 367 } // namespace blink | 368 } // namespace blink |
| OLD | NEW |