Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLScriptElement / script-tests / script-for-attribute-unexpected-execution.js
blobd605699dc088c4e6710c0cbdfaf4d8b8fe7a03bd
1 description("Tests that scripts which have a for-event other than window.onload are not executed.");
3 document.write('<script for="window">testPassed(\'for=window\');</script>');
4 document.write('<script for="anything">testPassed(\'for=anything\');</script>');
5 document.write('<script event="onload">testPassed(\'event=onload\');</script>');
6 document.write('<script event="anything">testPassed(\'event=anything\');</script>');
7 document.write('<script for="window" event="onload">testPassed(\'for=window event=onload\');</script>');
8 document.write('<script for="window" event="onload()">testPassed(\'for=window event=onload()\');</script>');
9 document.write('<script for=" WINDOW " event=" ONLOAD() ">testPassed(\'for=WINDOW event=ONLOAD()\');</script>');
10 document.write('<script for="window" event="onresize">testFailed(\'for=window event=onresize\');</script>');
11 document.write('<script for="document" event="onload">testFailed(\'for=document event=onload\');</script>');
12 document.write('<script for="document" event="onclick">testFailed(\'for=document event=onclick\');</script>');