Index: Source/web/tests/WebViewTest.cpp |
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
index 2989695d443e2c8c19ea5f77c40e0faa56cfcf9b..a83c13f2da394372b339bcd6695c405dc814c7ff 100644 |
--- a/Source/web/tests/WebViewTest.cpp |
+++ b/Source/web/tests/WebViewTest.cpp |
@@ -285,8 +285,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) |