Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / plugins / embed-attributes-setting.html
blobe86af51bd150e557721d2fcd44cc68d44075e371
1 <html>
2 <head>
3 <script>
4 function print(message, color)
6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace";
9 if (color)
10 paragraph.style.color = color;
11 document.getElementById("console").appendChild(paragraph);
14 function write(s)
16 document.getElementById('pre').appendChild(document.createTextNode(s));
19 function shouldBe(a, b)
21 var evalA = eval(a);
22 if (evalA == b)
23 print("PASS: " + a + " should be " + b + " and is.", "green");
24 else
25 print("FAIL: " + a + " should be " + b + " but instead is " + evalA + ".", "red");
28 var embed;
30 function test()
32 if (window.testRunner)
33 testRunner.dumpAsText();
35 embed = document.getElementById('embed');
36 print("[Embed is element specified in markup]");
38 embed.align = 1;
39 embed.height = 1;
40 embed.name = 1;
41 embed.width = 1;
42 embed.type = 1; // setting the type attribute should not effect the plugin once loaded
43 embed.src = 1; // setting the source attribute should not effect the plugin once loaded
45 shouldBe("embed.getAttribute('align')", 1);
46 shouldBe("embed.getAttribute('height')", 1);
47 shouldBe("embed.getAttribute('name')", 1);
48 shouldBe("embed.getAttribute('width')", 1);
49 shouldBe("embed.getAttribute('type')", 1);
50 shouldBe("embed.getAttribute('src')", 1);
51 shouldBe("typeof embed.testCallback", "function");
53 print("----------");
55 embed = document.createElement('embed');
56 print("[Embed is dynamically created element with only type specified]");
58 embed.style.visibility = "hidden";
59 embed.type = "application/x-webkit-test-netscape";
60 document.body.appendChild(embed);
61 shouldBe("typeof embed.testCallback", "function");
63 print("----------");
65 embed = document.createElement('embed');
66 print("[Embed is dynamically created element with only src specified]");
68 embed.style.visibility = "hidden";
69 embed.src = "resources/test.testnetscape";
70 document.body.appendChild(embed);
71 shouldBe("typeof embed.testCallback", "function");
73 </script>
74 </head>
76 <body onload="test();">
78 <hr>
79 <div id='console'></div>
81 <embed style="visibility: hidden" type="application/x-webkit-test-netscape" id='embed'></embed>
83 </body>
84 </html>