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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include "platform/testing/URLTestHelpers.h" | 34 #include "platform/testing/URLTestHelpers.h" |
35 #include "platform/testing/UnitTestHelpers.h" | 35 #include "platform/testing/UnitTestHelpers.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/WebString.h" | 38 #include "public/platform/WebString.h" |
39 #include "public/platform/WebThread.h" | 39 #include "public/platform/WebThread.h" |
40 #include "public/platform/WebURLRequest.h" | 40 #include "public/platform/WebURLRequest.h" |
41 #include "public/platform/WebURLResponse.h" | 41 #include "public/platform/WebURLResponse.h" |
42 #include "public/platform/WebUnitTestSupport.h" | 42 #include "public/platform/WebUnitTestSupport.h" |
43 #include "public/web/WebRemoteFrame.h" | |
44 #include "public/web/WebSettings.h" | 43 #include "public/web/WebSettings.h" |
45 #include "public/web/WebViewClient.h" | 44 #include "public/web/WebViewClient.h" |
46 #include "web/WebLocalFrameImpl.h" | 45 #include "web/WebLocalFrameImpl.h" |
47 #include "wtf/StdLibExtras.h" | 46 #include "wtf/StdLibExtras.h" |
48 | 47 |
49 namespace blink { | 48 namespace blink { |
50 namespace FrameTestHelpers { | 49 namespace FrameTestHelpers { |
51 | 50 |
52 namespace { | 51 namespace { |
53 | 52 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 // runPendingTasks only ensures that main thread task queue is empty, | 313 // runPendingTasks only ensures that main thread task queue is empty, |
315 // and asynchronous parsing make use of off main thread HTML parser. | 314 // and asynchronous parsing make use of off main thread HTML parser. |
316 testing::runPendingTasks(); | 315 testing::runPendingTasks(); |
317 if (!isLoading()) | 316 if (!isLoading()) |
318 break; | 317 break; |
319 | 318 |
320 Platform::current()->yieldCurrentThread(); | 319 Platform::current()->yieldCurrentThread(); |
321 } | 320 } |
322 } | 321 } |
323 | 322 |
324 TestWebRemoteFrameClient::TestWebRemoteFrameClient() | |
325 : m_frame(WebRemoteFrame::create(this)) | |
326 { | |
327 } | |
328 | |
329 void TestWebRemoteFrameClient::frameDetached() | |
330 { | |
331 if (m_frame->parent()) | |
332 m_frame->parent()->removeChild(m_frame); | |
333 m_frame->close(); | |
334 } | |
335 | |
336 void TestWebViewClient::initializeLayerTreeView() | 323 void TestWebViewClient::initializeLayerTreeView() |
337 { | 324 { |
338 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); | 325 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); |
339 ASSERT(m_layerTreeView); | 326 ASSERT(m_layerTreeView); |
340 } | 327 } |
341 | 328 |
342 } // namespace FrameTestHelpers | 329 } // namespace FrameTestHelpers |
343 } // namespace blink | 330 } // namespace blink |
OLD | NEW |