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

Side by Side Diff: LayoutTests/fast/events/dom-character-data-modified-textarea-crash.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 // This test uses a weired textarea to reproduce the issue. The condition of a c rash is very sensitive to HTML. 5 // This test uses a weired textarea to reproduce the issue. The condition of a c rash is very sensitive to HTML.
6 // If we add a new-line at EOF or add other tags in <body> part, the crash will be unlikely to happen. 6 // If we add a new-line at EOF or add other tags in <body> part, the crash will be unlikely to happen.
7 // For example, if we move this comment to the actual HTML or try to load 'js-te st-pre.js', the crash won't happen. 7 // For example, if we move this comment to the actual HTML or try to load 'js-te st.js', the crash won't happen.
8 // 8 //
9 // * Mutation events should not be dispatched on this case. This bug is being tr acked by webkit bug https://bugs.webkit.org/show_bug.cgi?id=87372 9 // * Mutation events should not be dispatched on this case. This bug is being tr acked by webkit bug https://bugs.webkit.org/show_bug.cgi?id=87372
10 // * ... And Mutation events are no longer fired. See https://bugs.webkit.org/sh ow_bug.cgi?id=93427. 10 // * ... And Mutation events are no longer fired. See https://bugs.webkit.org/sh ow_bug.cgi?id=93427.
11 // We would keep this test just for preventing regression. 11 // We would keep this test just for preventing regression.
12 if (window.testRunner) { 12 if (window.testRunner) {
13 testRunner.dumpAsText(); 13 testRunner.dumpAsText();
14 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
15 } 15 }
16 16
17 function attackAndFinish() { 17 function attackAndFinish() {
18 document.designMode = "on"; 18 document.designMode = "on";
19 document.execCommand("SelectAll"); 19 document.execCommand("SelectAll");
20 document.execCommand("Delete"); 20 document.execCommand("Delete");
21 document.body.offsetLeft; 21 document.body.offsetLeft;
22 document.body.innerHTML = 'Test passes if a DOMCharacterModified event on th e textarea does not crash.'; 22 document.body.innerHTML = 'Test passes if a DOMCharacterModified event on th e textarea does not crash.';
23 if (window.testRunner) 23 if (window.testRunner)
24 testRunner.notifyDone(); 24 testRunner.notifyDone();
25 } 25 }
26 26
27 document.addEventListener("DOMCharacterDataModified", attackAndFinish); 27 document.addEventListener("DOMCharacterDataModified", attackAndFinish);
28 28
29 window.setTimeout(attackAndFinish, 10); 29 window.setTimeout(attackAndFinish, 10);
30 </script> 30 </script>
31 </head> 31 </head>
32 <textarea> < 32 <textarea> <
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698