Index: Source/web/tests/WebViewTest.cpp |
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
index c45519c8f7af29b3dac4d01c7f0819d616fa9f93..32b29c1e99668df8b30d3a1dc55b018e7e78b21d 100644 |
--- a/Source/web/tests/WebViewTest.cpp |
+++ b/Source/web/tests/WebViewTest.cpp |
@@ -284,8 +284,10 @@ TEST_F(WebViewTest, SetBaseBackgroundColorBeforeMainFrame) |
// webView does not have a frame yet, but we should still be able to set the background color. |
webView->setBaseBackgroundColor(kBlue); |
EXPECT_EQ(kBlue, webView->backgroundColor()); |
- webView->setMainFrame(WebLocalFrameImpl::create(0)); |
+ WebLocalFrameImpl* frame = WebLocalFrameImpl::create(0); |
+ webView->setMainFrame(frame); |
webView->close(); |
+ frame->close(); |
} |
TEST_F(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent) |