| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 return webViewImpl(); | 286 return webViewImpl(); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void WebViewHelper::reset() | 289 void WebViewHelper::reset() |
| 290 { | 290 { |
| 291 if (m_webViewWidget) { | 291 if (m_webViewWidget) { |
| 292 m_webViewWidget->close(); | 292 m_webViewWidget->close(); |
| 293 m_webViewWidget = nullptr; | 293 m_webViewWidget = nullptr; |
| 294 } | 294 } |
| 295 if (m_webView) { | 295 if (m_webView) { |
| 296 // Loading completion is handled asynchronously |
| 297 // (FrameLoader::checkCompleted()), so we call runPendingTasks() here |
| 298 // to make sure loading is completed and |
| 299 // the ASSERT() in the following line is successful. |
| 300 testing::runPendingTasks(); |
| 296 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame
(m_webView->mainFrame())->isLoading()); | 301 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame
(m_webView->mainFrame())->isLoading()); |
| 297 m_webView->willCloseLayerTreeView(); | 302 m_webView->willCloseLayerTreeView(); |
| 298 m_webView->close(); | 303 m_webView->close(); |
| 299 m_webView = nullptr; | 304 m_webView = nullptr; |
| 300 } | 305 } |
| 301 } | 306 } |
| 302 | 307 |
| 303 void WebViewHelper::resize(WebSize size) | 308 void WebViewHelper::resize(WebSize size) |
| 304 { | 309 { |
| 305 m_testWebViewClient->clearAnimationScheduled(); | 310 m_testWebViewClient->clearAnimationScheduled(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 370 } |
| 366 | 371 |
| 367 void TestWebViewClient::initializeLayerTreeView() | 372 void TestWebViewClient::initializeLayerTreeView() |
| 368 { | 373 { |
| 369 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); | 374 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); |
| 370 ASSERT(m_layerTreeView); | 375 ASSERT(m_layerTreeView); |
| 371 } | 376 } |
| 372 | 377 |
| 373 } // namespace FrameTestHelpers | 378 } // namespace FrameTestHelpers |
| 374 } // namespace blink | 379 } // namespace blink |
| OLD | NEW |