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

Side by Side Diff: LayoutTests/fast/replaced/object-with-embed-url-param.html

Issue 3551010: Merge 66992 - 2010-09-08 Andy Estes <aestes@apple.com>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 2 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.layoutTestController) { 4 if (window.layoutTestController) {
5 layoutTestController.dumpAsText(); 5 layoutTestController.dumpAsText();
6 layoutTestController.waitUntilDone(); 6 layoutTestController.waitUntilDone();
7 } 7 }
8 8
9 var object1Result = ""; 9 var object1Result = "";
10 var object2Result = ""; 10 var object2Result = "";
11 var embed3Result = ""; 11 var embed3Result = "";
12 var embed4Result = "";
13 var object5Result = "";
14 var notified = false;
12 15
13 document.addEventListener("beforeload", function(event) { 16 document.addEventListener("beforeload", function(event) {
14
15 if (event.url == "") 17 if (event.url == "")
16 return; 18 return;
17 19
18 if (event.target.id == "object1") { 20 if (event.target.id == "object1") {
19 object1Result = (event.url == "object-attr" ? "does" : "does not"); 21 object1Result = (event.url == "object-attr" ? "does" : "does not");
20 } else if (event.target.id == "object2") { 22 } else if (event.target.id == "object2") {
21 object2Result = (event.url == "object-param" ? "does" : "doe s not"); 23 object2Result = (event.url == "object-param" ? "does" : "doe s not");
22 } else if (event.target.id == "embed3") { 24 } else if (event.target.id == "embed3") {
23 embed3Result = (event.url == "embed-attr" ? "does" : "does n ot"); 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");
24 } 30 }
25 31
26 if (object1Result != "" && object2Result != "" && embed3Result ! = "") { 32 if (!notified && object1Result != "" && object2Result != "" && e mbed3Result != "" && embed4Result != "" && object5Result != "") {
27 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 + "." ); 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 + "." );
28 debug("An &lt;object&gt; with a 'src' &lt;param&gt; should l oad the URL from the 'src' &lt;param&gt; and " + object2Result + "."); 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 + ".");
29 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 + "."); 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;
30 if (window.layoutTestController) 39 if (window.layoutTestController)
31 layoutTestController.notifyDone(); 40 layoutTestController.notifyDone();
32 } 41 }
33 }, true); 42 }, true);
34 43
35 function debug(str) { 44 function debug(str) {
36 document.getElementById('console').innerHTML += str + "<br>"; 45 document.getElementById('console').innerHTML += str + "<br>";
37 } 46 }
38 </script> 47 </script>
39 </head> 48 </head>
40 <body> 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>
41 <object id="object1" type="application/x-webkit-test-netscape" data="obj ect-attr"> 52 <object id="object1" type="application/x-webkit-test-netscape" data="obj ect-attr">
42 <param id="param1" name="src" value="object-param"></param> 53 <param name="src" value="object-param"></param>
43 <embed id="embed1" type="application/x-webkit-test-netscape" src="em bed-attr"> 54 <embed id="embed1" type="application/x-webkit-test-netscape" src="em bed-attr">
44 </object> 55 </object>
45 <object id="object2" type="application/x-webkit-test-netscape"> 56 <object id="object2" type="application/x-webkit-test-netscape">
46 <param id="param2" name="movie" value="object-param"></param> 57 <param name="movie" value="object-param"></param>
47 <embed id="embed2" type="application/x-webkit-test-netscape" src="em bed-attr"> 58 <embed id="embed2" type="application/x-webkit-test-netscape" src="em bed-attr">
48 </object> 59 </object>
49 <object id="object3"> 60 <object id="object3">
50 <embed id="embed3" type="application/x-webkit-test-netscape" src="em bed-attr"> 61 <embed id="embed3" type="application/x-webkit-test-netscape" src="em bed-attr">
51 </object> 62 </object>
52 <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> 63 <object id="object4">
53 <div id="console"></div> 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>
54 </body> 71 </body>
55 </html> 72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698