Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 1282443002: Fix WebRemoteFrame leak in DetachRemoteFrame unit test. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698