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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/onload-body-replace.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/onload-body-replace.html b/third_party/WebKit/LayoutTests/fast/events/onload-body-replace.html
new file mode 100644
index 0000000000000000000000000000000000000000..156e5a99e10e3e37471c0c7af60790a806fb22ee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/onload-body-replace.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function windowHandler() {
+ var result = document.getElementById('result');
+ result.innerHTML='FAIL: window.onload event handler did run.';
+}
+
+function bodyHandler() {
+ var result = document.getElementById('result');
+ if (result.textContent.startsWith('PASS:'))
+ result.textContent += ", but the document body onload did.";
+}
+
+window.onload = windowHandler;
+</script>
+</head>
+<body onload="bodyHandler()">
+This tests that a <body> onload handler clears and replaces the attribute listener on the window.
+You should see "PASS" below.
+
+<div id='result'>PASS: window.onload event handler did not run<div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698