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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/onload-body-replace.html

Issue 2492793002: Support fetching attribute listeners from outside v8 context scopes. (Closed)
Patch Set: try to tidy up logic Created 4 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
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
7
8 function windowHandler() {
9 var result = document.getElementById('result');
10 result.innerHTML='FAIL: window.onload event handler did run.';
11 }
12
13 function bodyHandler() {
14 var result = document.getElementById('result');
15 if (result.textContent.startsWith('PASS:'))
16 result.textContent += ", but the document body onload did.";
17 }
18
19 window.onload = windowHandler;
20 </script>
21 </head>
22 <body onload="bodyHandler()">
23 This tests that a <body> onload handler clears and replaces the attribute listen er on the window.
24 You should see "PASS" below.
25
26 <div id='result'>PASS: window.onload event handler did not run<div>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698