OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 7581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7592 TEST_P(ParameterizedWebFrameTest, DetachRemoteFrame) | 7592 TEST_P(ParameterizedWebFrameTest, DetachRemoteFrame) |
7593 { | 7593 { |
7594 FrameTestHelpers::TestWebViewClient viewClient; | 7594 FrameTestHelpers::TestWebViewClient viewClient; |
7595 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; | 7595 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; |
7596 WebView* view = WebView::create(&viewClient); | 7596 WebView* view = WebView::create(&viewClient); |
7597 view->setMainFrame(remoteClient.frame()); | 7597 view->setMainFrame(remoteClient.frame()); |
7598 FrameTestHelpers::TestWebRemoteFrameClient childFrameClient; | 7598 FrameTestHelpers::TestWebRemoteFrameClient childFrameClient; |
7599 WebRemoteFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createRe
moteChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClie
nt); | 7599 WebRemoteFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createRe
moteChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClie
nt); |
7600 childFrame->detach(); | 7600 childFrame->detach(); |
7601 view->close(); | 7601 view->close(); |
| 7602 childFrame->close(); |
7602 } | 7603 } |
7603 | 7604 |
7604 class TestConsoleMessageWebFrameClient : public FrameTestHelpers::TestWebFrameCl
ient { | 7605 class TestConsoleMessageWebFrameClient : public FrameTestHelpers::TestWebFrameCl
ient { |
7605 public: | 7606 public: |
7606 virtual void didAddMessageToConsole(const WebConsoleMessage& message, const
WebString& sourceName, unsigned sourceLine, const WebString& stackTrace) | 7607 virtual void didAddMessageToConsole(const WebConsoleMessage& message, const
WebString& sourceName, unsigned sourceLine, const WebString& stackTrace) |
7607 { | 7608 { |
7608 messages.push_back(message); | 7609 messages.push_back(message); |
7609 } | 7610 } |
7610 | 7611 |
7611 std::vector<WebConsoleMessage> messages; | 7612 std::vector<WebConsoleMessage> messages; |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7987 | 7988 |
7988 TEST_F(WebFrameTest, MaxFramesDetach) | 7989 TEST_F(WebFrameTest, MaxFramesDetach) |
7989 { | 7990 { |
7990 registerMockedHttpURLLoad("max-frames-detach.html"); | 7991 registerMockedHttpURLLoad("max-frames-detach.html"); |
7991 FrameTestHelpers::WebViewHelper webViewHelper; | 7992 FrameTestHelpers::WebViewHelper webViewHelper; |
7992 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); | 7993 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); |
7993 webViewImpl->mainFrameImpl()->collectGarbage(); | 7994 webViewImpl->mainFrameImpl()->collectGarbage(); |
7994 } | 7995 } |
7995 | 7996 |
7996 } // namespace blink | 7997 } // namespace blink |
OLD | NEW |