Index: Source/web/tests/WebViewTest.cpp |
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
index 346ddafd94cbc7a37d85c9e849c65fa1e8b6d71f..7960e46defeef04c6eeeb7fb73ce638d9c21bfe3 100644 |
--- a/Source/web/tests/WebViewTest.cpp |
+++ b/Source/web/tests/WebViewTest.cpp |
@@ -319,8 +319,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) |