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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/frames/unique-name-set-same-name.html

Issue 2053903002: Returning early when setting a frame name to the same name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replacing part of short-circuiting condition with just an assert. Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function runTest()
6 {
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.dumpChildFramesAsText();
10 }
11 body = document.getElementById('body');
12 frame1 = document.getElementById('frame1');
13 body.removeChild(frame1);
14
15 // Below we effectively execute (pseudo-code):
16 // window.name = "same name as before"
17 // This shouldn't trigger a recalculation of unique name (which can result
18 // in a different unique name, because right now there is no frame1 with
19 // a conflicting window.name=="foo").
20 frame2 = document.getElementById('frame2');
21 frame2.contentWindow.name = "foo";
22
23 // Before fixes, this test used to trigger a DCHECK in
24 // void FrameTreeNode::SetFrameName(...) {
25 // if (name == replication_state_.name) {
26 // // |unique_name| shouldn't change unless |name| changes.
27 // DCHECK_EQ(unique_name, replication_state_.unique_name);
28 // return;
29 // }
30 }
31 </script>
32 </head>
33 <body onload="runTest()" id="body">
34 <iframe name="foo" id="frame1"></iframe>
35 <iframe name="foo" id="frame2"></iframe>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698