| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 return webViewImpl(); | 238 return webViewImpl(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void WebViewHelper::reset() | 241 void WebViewHelper::reset() |
| 242 { | 242 { |
| 243 if (m_webViewWidget) { | 243 if (m_webViewWidget) { |
| 244 m_webViewWidget->close(); | 244 m_webViewWidget->close(); |
| 245 m_webViewWidget = nullptr; | 245 m_webViewWidget = nullptr; |
| 246 } | 246 } |
| 247 if (m_webView) { | 247 if (m_webView) { |
| 248 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame
(m_webView->mainFrame())->isLoading()); | 248 DCHECK(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame
(m_webView->mainFrame())->isLoading()); |
| 249 m_webView->willCloseLayerTreeView(); | 249 m_webView->willCloseLayerTreeView(); |
| 250 m_webView->close(); | 250 m_webView->close(); |
| 251 m_webView = nullptr; | 251 m_webView = nullptr; |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 void WebViewHelper::resize(WebSize size) | 255 void WebViewHelper::resize(WebSize size) |
| 256 { | 256 { |
| 257 m_testWebViewClient->clearAnimationScheduled(); | 257 m_testWebViewClient->clearAnimationScheduled(); |
| 258 webViewImpl()->resize(size); | 258 webViewImpl()->resize(size); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 278 frame->close(); | 278 frame->close(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 void TestWebFrameClient::didStartLoading(bool) | 281 void TestWebFrameClient::didStartLoading(bool) |
| 282 { | 282 { |
| 283 ++m_loadsInProgress; | 283 ++m_loadsInProgress; |
| 284 } | 284 } |
| 285 | 285 |
| 286 void TestWebFrameClient::didStopLoading() | 286 void TestWebFrameClient::didStopLoading() |
| 287 { | 287 { |
| 288 ASSERT(m_loadsInProgress > 0); | 288 DCHECK_GT(m_loadsInProgress, 0); |
| 289 --m_loadsInProgress; | 289 --m_loadsInProgress; |
| 290 } | 290 } |
| 291 | 291 |
| 292 TestWebRemoteFrameClient::TestWebRemoteFrameClient() | 292 TestWebRemoteFrameClient::TestWebRemoteFrameClient() |
| 293 : m_frame(WebRemoteFrameImpl::create(WebTreeScopeType::Document, this, nullp
tr)) | 293 : m_frame(WebRemoteFrameImpl::create(WebTreeScopeType::Document, this, nullp
tr)) |
| 294 { | 294 { |
| 295 } | 295 } |
| 296 | 296 |
| 297 void TestWebRemoteFrameClient::frameDetached(DetachType type) | 297 void TestWebRemoteFrameClient::frameDetached(DetachType type) |
| 298 { | 298 { |
| 299 if (type == DetachType::Remove && m_frame->parent()) | 299 if (type == DetachType::Remove && m_frame->parent()) |
| 300 m_frame->parent()->removeChild(m_frame); | 300 m_frame->parent()->removeChild(m_frame); |
| 301 m_frame->close(); | 301 m_frame->close(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void TestWebViewClient::initializeLayerTreeView() | 304 void TestWebViewClient::initializeLayerTreeView() |
| 305 { | 305 { |
| 306 m_layerTreeView = adoptPtr(new WebLayerTreeViewImplForTesting); | 306 m_layerTreeView = adoptPtr(new WebLayerTreeViewImplForTesting); |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace FrameTestHelpers | 309 } // namespace FrameTestHelpers |
| 310 } // namespace blink | 310 } // namespace blink |
| OLD | NEW |