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

Side by Side Diff: LayoutTests/fast/dom/inline-event-attributes-crash.html

Issue 48903019: Delete js-test-post.js. (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 <script src="../js/resources/js-test-pre.js"></script> 2 <script src="../js/resources/js-test-pre.js"></script>
3 <script> 3 <script>
4 4
5 description('Tests that malformed code in event handler attributes does not caus e a crash'); 5 description('Tests that malformed code in event handler attributes does not caus e a crash');
6 6
7 function dispatchClick(element) 7 function dispatchClick(element)
8 { 8 {
9 var clickEvent = document.createEvent('MouseEvent'); 9 var clickEvent = document.createEvent('MouseEvent');
10 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false , false, false, false, 0, null); 10 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false , false, false, false, 0, null);
11 element.dispatchEvent(clickEvent); 11 element.dispatchEvent(clickEvent);
12 } 12 }
13 13
14 // Ignore errors due to the syntax error in the attribute. 14 // Ignore errors due to the syntax error in the attribute.
15 window.onerror = function() { 15 window.onerror = function() {
16 return true; 16 return true;
17 }; 17 };
18 18
19 var div = document.createElement('div'); 19 var div = document.createElement('div');
20 div.setAttribute('onclick', 'return 42; }(); var x = {'); 20 div.setAttribute('onclick', 'return 42; }(); var x = {');
21 dispatchClick(div); 21 dispatchClick(div);
22 22
23 testPassed('Did not crash'); 23 testPassed('Did not crash');
24 24
25 </script> 25 </script>
26 <script src="../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/incompatible-operations.html ('k') | LayoutTests/fast/dom/inline-event-attributes-event-param-name.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698