Index: Source/web/tests/WebViewTest.cpp |
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
index 6fdc756c6e15722f85ae5053fd9ed6cc1b749837..e85d8995e77af248971ff30092d6cce456512378 100644 |
--- a/Source/web/tests/WebViewTest.cpp |
+++ b/Source/web/tests/WebViewTest.cpp |
@@ -304,6 +304,9 @@ TEST_F(WebViewTest, SetBaseBackgroundColor) |
EXPECT_EQ(kTransparent, webView->backgroundColor()); |
LocalFrame* frame = webView->mainFrameImpl()->frame(); |
+ // This is a hack to prevent createView() from violating invariants about |
+ // frame state during navigation/detach. |
+ frame->document()->prepareForDestruction(); |
// Creating a new frame view with the background color having 0 alpha. |
frame->createView(IntSize(1024, 768), Color::transparent, true); |