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

Unified Diff: third_party/WebKit/LayoutTests/fast/frames/unique-name-remove-add-child.html

Issue 1968213002: Try harder to make sure that blink::FrameTree::m_uniqueName is truly unique. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments from dcheng@. Created 4 years, 7 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
Index: third_party/WebKit/LayoutTests/fast/frames/unique-name-remove-add-child.html
diff --git a/third_party/WebKit/LayoutTests/fast/frames/unique-name-remove-add-child.html b/third_party/WebKit/LayoutTests/fast/frames/unique-name-remove-add-child.html
new file mode 100644
index 0000000000000000000000000000000000000000..ca7fe5e72a9424d34a6904f98b44b274b2442020
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/frames/unique-name-remove-add-child.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function runTest()
+{
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+ }
+ body = document.getElementById('body');
+ frame1 = document.getElementById('frame1');
+ body.removeChild(frame1);
+
+ // frame3 is added to the frame tree when the parent has the same number of
+ // children as when frame2 was being added. In the past this has led to
+ // frame2 and frame3 having the same unique name - https://crbug.com/576969#c3
+ frame3 = document.createElement('iframe');
+ frame3.id = "frame3";
+ body.appendChild(frame3);
+}
+</script>
+</head>
+<body onload="runTest()" id="body">
+<iframe id="frame1"></iframe>
+<iframe id="frame2"></iframe>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698