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

Side by Side Diff: LayoutTests/plugins/layout-in-beforeload-listener-affects-plugin-loading.html

Issue 205523003: Remove beforeload events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove more tests Created 6 years, 9 months 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
8 }
9
10 window._beforeloadReceivedForEmbed = false;
11
12 document.addEventListener("beforeload", function(event) {
13 if (document.getElementsByTagName("object")[0] == event.target) {
14 // trigger a layout
15 event.target.offsetWidth;
16 return;
17 }
18
19 _beforeloadReceivedForEmbed = document.getElementsByTagName("embed") [0] == event.target;
20 }, true);
21
22 function test() {
23 // The <embed> should load as a post-layout task that executes in
24 // the current run loop iteration. Queue a task to check if the
25 // <embed>'s beforeload event fired.
26 window.setTimeout(function() {
27 console.log(_beforeloadReceivedForEmbed ? "PASS" : "FAIL");
28 if (window.testRunner)
29 testRunner.notifyDone();
30 }, 0);
31 }
32 </script>
33 </head>
34 <body onload="test();">
35 <!-- Test that performing layout in a beforeload listener does not affect
36 plug-in loading. See http://webkit.org/b/77167 for details. This test
37 requires TestNetscapePlugIn so it must be run in DumpRenderTree. -->
38 <object>
39 <embed type="application/x-webkit-test-netscape">
40 </object>
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698