[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / replaced / object-with-embed-url-param.html
1 <html>
2     <head>
3         <script>
4             if (window.layoutTestController) {
5                 layoutTestController.dumpAsText();
6                 layoutTestController.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" : "does not");
24                 } else if (event.target.id == "embed3") {
25                     embed3Result = (event.url == "embed-attr" ? "does" : "does not");
26                 } else if (event.target.id == "embed4") {
27                     embed4Result = (event.url == "embed-attr" ? "does" : "does not");
28                 } else if (event.target.id == "object5") {
29                     object5Result = (event.url == "object-param" ? "does" : "does not");
30                 }
31
32                 if (!notified && object1Result != "" && object2Result != "" && embed3Result != "" && 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 load 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 of 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 URL from the 'src' &lt;param&gt; and " + object5Result + ".");
38                     notified = true;
39                     if (window.layoutTestController)
40                         layoutTestController.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="object-attr">
53             <param name="src" value="object-param"></param>
54             <embed id="embed1" type="application/x-webkit-test-netscape" src="embed-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="embed-attr">
59         </object>
60         <object id="object3">
61             <embed id="embed3" type="application/x-webkit-test-netscape" src="embed-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="embed-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"></param>
70         </object>
71     </body>
72 </html>