| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 WebViewImpl* WebViewHelper::initializeWithOpener(WebFrame* opener, bool enableJa
vascript, TestWebFrameClient* webFrameClient, TestWebViewClient* webViewClient,
TestWebWidgetClient* webWidgetClient, void (*updateSettingsFunc)(WebSettings*)) | 193 WebViewImpl* WebViewHelper::initializeWithOpener(WebFrame* opener, bool enableJa
vascript, TestWebFrameClient* webFrameClient, TestWebViewClient* webViewClient,
TestWebWidgetClient* webWidgetClient, void (*updateSettingsFunc)(WebSettings*)) |
| 194 { | 194 { |
| 195 reset(); | 195 reset(); |
| 196 | 196 |
| 197 if (!webFrameClient) | 197 if (!webFrameClient) |
| 198 webFrameClient = defaultWebFrameClient(); | 198 webFrameClient = defaultWebFrameClient(); |
| 199 if (!webViewClient) | 199 if (!webViewClient) |
| 200 webViewClient = defaultWebViewClient(); | 200 webViewClient = defaultWebViewClient(); |
| 201 if (!webWidgetClient) | 201 if (!webWidgetClient) |
| 202 webWidgetClient = webViewClient->widgetClient(); | 202 webWidgetClient = webViewClient->widgetClient(); |
| 203 m_webView = WebViewImpl::create(webViewClient); | 203 m_webView = WebViewImpl::create(webViewClient, WebPageVisibilityStateVisible
); |
| 204 m_webView->settings()->setJavaScriptEnabled(enableJavascript); | 204 m_webView->settings()->setJavaScriptEnabled(enableJavascript); |
| 205 m_webView->settings()->setPluginsEnabled(true); | 205 m_webView->settings()->setPluginsEnabled(true); |
| 206 // Enable (mocked) network loads of image URLs, as this simplifies | 206 // Enable (mocked) network loads of image URLs, as this simplifies |
| 207 // the completion of resource loads upon test shutdown & helps avoid | 207 // the completion of resource loads upon test shutdown & helps avoid |
| 208 // dormant loads trigger Resource leaks for image loads. | 208 // dormant loads trigger Resource leaks for image loads. |
| 209 // | 209 // |
| 210 // Consequently, all external image resources must be mocked. | 210 // Consequently, all external image resources must be mocked. |
| 211 m_webView->settings()->setLoadsImagesAutomatically(true); | 211 m_webView->settings()->setLoadsImagesAutomatically(true); |
| 212 if (updateSettingsFunc) | 212 if (updateSettingsFunc) |
| 213 updateSettingsFunc(m_webView->settings()); | 213 updateSettingsFunc(m_webView->settings()); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 m_frame->close(); | 305 m_frame->close(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void TestWebViewClient::initializeLayerTreeView() | 308 void TestWebViewClient::initializeLayerTreeView() |
| 309 { | 309 { |
| 310 m_layerTreeView = wrapUnique(new WebLayerTreeViewImplForTesting); | 310 m_layerTreeView = wrapUnique(new WebLayerTreeViewImplForTesting); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace FrameTestHelpers | 313 } // namespace FrameTestHelpers |
| 314 } // namespace blink | 314 } // namespace blink |
| OLD | NEW |