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

Side by Side Diff: LayoutTests/editing/selection/focus-iframe-removal-crash.html

Issue 225163004: Element::focus() should acquire the reference of LocalFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/editing/selection/focus-iframe-removal-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <iframe></iframe>
8 <script>
9 description('Should not crash if iframe\'s document element\'s DOMFocusOut event handler removes the iframe in the parent document.');
10
11 window.jsTestIsAsync = true;
12
13 function run()
14 {
15 var iframe = document.getElementsByTagName('iframe')[0];
16 iframe.contentDocument.documentElement.contentEditable = true;
17 iframe.contentDocument.documentElement.addEventListener('DOMFocusOut', funct ion () {
yosin_UTC9 2014/04/14 02:00:27 nit: Can we use "focusout" instead of "DOMFocusOut
Yuta Kitamura 2014/04/14 02:44:32 Done.
18 iframe.parentNode.removeChild(iframe);
19 }, false);
20 iframe.contentDocument.documentElement.focus();
21
22 testPassed('Did not crash.');
23 window.finishJSTest();
24 }
25
26 document.addEventListener('DOMContentLoaded', run);
27 </script>
28 </body>
29 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/selection/focus-iframe-removal-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698