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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 1052993006: Refactor frame navigation/detach state cleanup to be more sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Port comment over Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« Source/core/loader/FrameLoader.cpp ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« Source/core/loader/FrameLoader.cpp ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698