| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "web/tests/FrameTestHelpers.h" | 31 #include "web/tests/FrameTestHelpers.h" |
| 32 | 32 |
| 33 #include "platform/testing/URLTestHelpers.h" | 33 #include "platform/testing/URLTestHelpers.h" |
| 34 #include "platform/testing/UnitTestHelpers.h" | 34 #include "platform/testing/UnitTestHelpers.h" |
| 35 #include "platform/testing/WebLayerTreeViewImplForTesting.h" | 35 #include "platform/testing/WebLayerTreeViewImplForTesting.h" |
| 36 #include "public/platform/Platform.h" | 36 #include "public/platform/Platform.h" |
| 37 #include "public/platform/WebData.h" | 37 #include "public/platform/WebData.h" |
| 38 #include "public/platform/WebSecurityOrigin.h" |
| 38 #include "public/platform/WebString.h" | 39 #include "public/platform/WebString.h" |
| 39 #include "public/platform/WebThread.h" | 40 #include "public/platform/WebThread.h" |
| 40 #include "public/platform/WebURLLoaderMockFactory.h" | 41 #include "public/platform/WebURLLoaderMockFactory.h" |
| 41 #include "public/platform/WebURLRequest.h" | 42 #include "public/platform/WebURLRequest.h" |
| 42 #include "public/platform/WebURLResponse.h" | 43 #include "public/platform/WebURLResponse.h" |
| 43 #include "public/web/WebFrameWidget.h" | 44 #include "public/web/WebFrameWidget.h" |
| 44 #include "public/web/WebRemoteFrame.h" | 45 #include "public/web/WebRemoteFrame.h" |
| 45 #include "public/web/WebSettings.h" | 46 #include "public/web/WebSettings.h" |
| 46 #include "public/web/WebTreeScopeType.h" | 47 #include "public/web/WebTreeScopeType.h" |
| 47 #include "public/web/WebViewClient.h" | 48 #include "public/web/WebViewClient.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return uniqueName.toString(); | 118 return uniqueName.toString(); |
| 118 } | 119 } |
| 119 | 120 |
| 120 } // namespace | 121 } // namespace |
| 121 | 122 |
| 122 void loadFrame(WebFrame* frame, const std::string& url) | 123 void loadFrame(WebFrame* frame, const std::string& url) |
| 123 { | 124 { |
| 124 WebURLRequest urlRequest; | 125 WebURLRequest urlRequest; |
| 125 urlRequest.initialize(); | 126 urlRequest.initialize(); |
| 126 urlRequest.setURL(URLTestHelpers::toKURL(url)); | 127 urlRequest.setURL(URLTestHelpers::toKURL(url)); |
| 128 urlRequest.setRequestorOrigin(WebSecurityOrigin::createUnique()); |
| 127 frame->loadRequest(urlRequest); | 129 frame->loadRequest(urlRequest); |
| 128 pumpPendingRequestsForFrameToLoad(frame); | 130 pumpPendingRequestsForFrameToLoad(frame); |
| 129 } | 131 } |
| 130 | 132 |
| 131 void loadHTMLString(WebFrame* frame, const std::string& html, const WebURL& base
URL) | 133 void loadHTMLString(WebFrame* frame, const std::string& html, const WebURL& base
URL) |
| 132 { | 134 { |
| 133 frame->loadHTMLString(WebData(html.data(), html.size()), baseURL); | 135 frame->loadHTMLString(WebData(html.data(), html.size()), baseURL); |
| 134 pumpPendingRequestsForFrameToLoad(frame); | 136 pumpPendingRequestsForFrameToLoad(frame); |
| 135 } | 137 } |
| 136 | 138 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 return m_testWebViewClient->layerTreeView(); | 333 return m_testWebViewClient->layerTreeView(); |
| 332 } | 334 } |
| 333 | 335 |
| 334 void TestWebViewWidgetClient::scheduleAnimation() | 336 void TestWebViewWidgetClient::scheduleAnimation() |
| 335 { | 337 { |
| 336 m_testWebViewClient->scheduleAnimation(); | 338 m_testWebViewClient->scheduleAnimation(); |
| 337 } | 339 } |
| 338 | 340 |
| 339 } // namespace FrameTestHelpers | 341 } // namespace FrameTestHelpers |
| 340 } // namespace blink | 342 } // namespace blink |
| OLD | NEW |