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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 frame->reload(true); | 143 frame->reload(true); |
144 pumpPendingRequestsForFrameToLoad(frame); | 144 pumpPendingRequestsForFrameToLoad(frame); |
145 } | 145 } |
146 | 146 |
147 void pumpPendingRequestsForFrameToLoad(WebFrame* frame) | 147 void pumpPendingRequestsForFrameToLoad(WebFrame* frame) |
148 { | 148 { |
149 Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FRO
M_HERE, bind(&runServeAsyncRequestsTask, testClientForFrame(frame))); | 149 Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FRO
M_HERE, bind(&runServeAsyncRequestsTask, testClientForFrame(frame))); |
150 testing::enterRunLoop(); | 150 testing::enterRunLoop(); |
151 } | 151 } |
152 | 152 |
| 153 WebMouseEvent createMouseEvent(WebInputEvent::Type type, WebMouseEvent::Button b
utton, const IntPoint& point, int modifiers) |
| 154 { |
| 155 WebMouseEvent result; |
| 156 result.type = type; |
| 157 result.x = result.windowX = result.globalX = point.x(); |
| 158 result.y = result.windowX = result.globalX = point.y(); |
| 159 result.modifiers = modifiers; |
| 160 result.button = button; |
| 161 result.clickCount = 1; |
| 162 return result; |
| 163 } |
| 164 |
153 WebLocalFrame* createLocalChild(WebRemoteFrame* parent, const WebString& name, W
ebFrameClient* client, WebFrame* previousSibling, const WebFrameOwnerProperties&
properties) | 165 WebLocalFrame* createLocalChild(WebRemoteFrame* parent, const WebString& name, W
ebFrameClient* client, WebFrame* previousSibling, const WebFrameOwnerProperties&
properties) |
154 { | 166 { |
155 if (!client) | 167 if (!client) |
156 client = defaultWebFrameClient(); | 168 client = defaultWebFrameClient(); |
157 | 169 |
158 return parent->createLocalChild(WebTreeScopeType::Document, name, nameToUniq
ueName(name), WebSandboxFlags::None, client, previousSibling, properties, nullpt
r); | 170 return parent->createLocalChild(WebTreeScopeType::Document, name, nameToUniq
ueName(name), WebSandboxFlags::None, client, previousSibling, properties, nullpt
r); |
159 } | 171 } |
160 | 172 |
161 WebRemoteFrame* createRemoteChild(WebRemoteFrame* parent, WebRemoteFrameClient*
client, const WebString& name) | 173 WebRemoteFrame* createRemoteChild(WebRemoteFrame* parent, WebRemoteFrameClient*
client, const WebString& name) |
162 { | 174 { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 301 } |
290 | 302 |
291 void TestWebViewClient::initializeLayerTreeView() | 303 void TestWebViewClient::initializeLayerTreeView() |
292 { | 304 { |
293 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); | 305 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); |
294 ASSERT(m_layerTreeView); | 306 ASSERT(m_layerTreeView); |
295 } | 307 } |
296 | 308 |
297 } // namespace FrameTestHelpers | 309 } // namespace FrameTestHelpers |
298 } // namespace blink | 310 } // namespace blink |
OLD | NEW |