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

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

Issue 1041473002: Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/FrameTestHelpers.cpp
diff --git a/Source/web/tests/FrameTestHelpers.cpp b/Source/web/tests/FrameTestHelpers.cpp
index ba2cf31dba49741403bf29c2c2b89fefe5987934..3603e90486dc9923e7e1167fdb07194fcea5e5c4 100644
--- a/Source/web/tests/FrameTestHelpers.cpp
+++ b/Source/web/tests/FrameTestHelpers.cpp
@@ -293,9 +293,9 @@ WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, WebTreeSco
return frame;
}
-void TestWebFrameClient::frameDetached(WebFrame* frame)
+void TestWebFrameClient::frameDetached(WebFrame* frame, DetachType type)
{
- if (frame->parent())
+ if (type == DetachType::Remove && frame->parent())
frame->parent()->removeChild(frame);
frame->close();
}
@@ -331,9 +331,9 @@ TestWebRemoteFrameClient::TestWebRemoteFrameClient()
{
}
-void TestWebRemoteFrameClient::frameDetached()
+void TestWebRemoteFrameClient::frameDetached(DetachType type)
{
- if (m_frame->parent())
+ if (type == DetachType::Remove && m_frame->parent())
m_frame->parent()->removeChild(m_frame);
m_frame->close();
}
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698