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

Side by Side Diff: LayoutTests/fast/replaced/object-with-embed-url-param.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 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8
9 var object1Result = "";
10 var object2Result = "";
11 var embed3Result = "";
12 var embed4Result = "";
13 var object5Result = "";
14 var notified = false;
15
16 document.addEventListener("beforeload", function(event) {
17 if (event.url == "")
18 return;
19
20 if (event.target.id == "object1") {
21 object1Result = (event.url == "object-attr" ? "does" : "does not");
22 } else if (event.target.id == "object2") {
23 object2Result = (event.url == "object-param" ? "does" : "doe s not");
24 } else if (event.target.id == "embed3") {
25 embed3Result = (event.url == "embed-attr" ? "does" : "does n ot");
26 } else if (event.target.id == "embed4") {
27 embed4Result = (event.url == "embed-attr" ? "does" : "does n ot");
28 } else if (event.target.id == "object5") {
29 object5Result = (event.url == "object-param" ? "does" : "doe s not");
30 }
31
32 if (!notified && object1Result != "" && object2Result != "" && e mbed3Result != "" && embed4Result != "" && object5Result != "") {
33 debug("An &lt;object&gt; with a 'data' @attr and a 'src' &lt ;param&gt; should load the URL from the 'data' @attr and " + object1Result + "." );
34 debug("An &lt;object&gt; with a 'src' &lt;param&gt; should l oad the URL from the 'src' &lt;param&gt; and " + object2Result + ".");
35 debug("An &lt;object&gt; with no URL specified and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
36 debug("An &lt;object&gt; with a URL specified in a 'src' &lt ;param&gt; and a nested &lt;embed&gt; should load the URL from the 'src' @attr o f the &lt;embed&gt; and " + embed3Result + ".");
37 debug("An &lt;object&gt; with a URL specified in a 'src' &lt ;param&gt; and a MIME type specified in a 'type' &lt;param&gt; should load the U RL from the 'src' &lt;param&gt; and " + object5Result + ".");
38 notified = true;
39 if (window.testRunner)
40 testRunner.notifyDone();
41 }
42 }, true);
43
44 function debug(str) {
45 document.getElementById('console').innerHTML += str + "<br>";
46 }
47 </script>
48 </head>
49 <body>
50 <p>This test verifies that the right URL is loaded when there is an &lt; object&gt; with a 'src' &lt;param&gt; and a fallback &lt;embed&gt;.</p>
51 <div id="console"></div>
52 <object id="object1" type="application/x-webkit-test-netscape" data="obj ect-attr">
53 <param name="src" value="object-param"></param>
54 <embed id="embed1" type="application/x-webkit-test-netscape" src="em bed-attr">
55 </object>
56 <object id="object2" type="application/x-webkit-test-netscape">
57 <param name="movie" value="object-param"></param>
58 <embed id="embed2" type="application/x-webkit-test-netscape" src="em bed-attr">
59 </object>
60 <object id="object3">
61 <embed id="embed3" type="application/x-webkit-test-netscape" src="em bed-attr">
62 </object>
63 <object id="object4">
64 <param name="code" value="object-param"></param>
65 <embed id="embed4" type="application/x-webkit-test-netscape" src="em bed-attr">
66 </object>
67 <object id="object5">
68 <param name="url" value="object-param"></param>
69 <param name="type" value="application/x-webkit-test-netscape"></para m>
70 </object>
71 </body>
72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698