Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / plugins / plugin-javascript-access.html
blobe83fc66547a7a5ef036472e67ea9de6ae1ff30cb
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
4 <title>Installed Plugins</title>
5 </head>
6 <body>
7 <script type="application/x-javascript">
8 if (window.testRunner)
9 testRunner.dumpAsText()
11 navigator.plugins.refresh(false); // Supposedly helps if new plugins were added.
13 var foundTestPlugin = false;
15 for (var i = 0; i < navigator.plugins.length; i++) {
16 var plugin = navigator.plugins[i];
18 // We can only guarantee that the Test PlugIn is installed.
19 if (plugin.name != "WebKit Test PlugIn")
20 continue;
21 else
22 foundTestPlugin = true;
24 document.writeln("<p>Name: " + plugin.name + "<\/p>");
25 document.writeln("<p>Description: " + plugin.description + "<\/p>");
26 document.writeln("<p>Filename: " + plugin.filename + "<\/p>");
28 document.writeln("<p>Mime Types:<\/p>");
29 for (var mi = 0; mi != plugin.length; ++mi) {
30 document.writeln("<p>Type: " + plugin[mi].type + "<\/p>");
31 document.writeln("<p>Description: " + plugin[mi].description + "<\/p>");
32 document.writeln("<p>Suffixes: " + plugin[mi].suffixes + "<\/p>");
33 document.writeln("<br>");
35 if (plugin.item(mi).type == plugin[mi].type) {
36 document.writeln("<p>Plugin.item() works.<\/p>");
37 } else {
38 document.writeln("<p>FAIL. Plugin.item() does not work.<\/p>");
41 if (plugin.namedItem(plugin[mi].type).type == plugin[mi].type) {
42 document.writeln("<p>Plugin.namedItem() works.<\/p>");
43 } else {
44 document.writeln("<p>FAIL. Plugin.namedItem() does not work.<\/p>");
48 if (navigator.plugins.item(i).name == plugin.name) {
49 document.writeln("<p>PluginArray.item() works.<\/p>");
50 } else {
51 document.writeln("<p>FAIL. PluginArray.item() does not work.<\/p>");
54 if (navigator.plugins.namedItem(plugin.name).name == plugin.name) {
55 document.writeln("<p>PluginArray.namedItem() works.<\/p>");
56 } else {
57 document.writeln("<p>FAIL. PluginArray.namedItem() does not work.<\/p>");
61 for (var i = 0; i < navigator.mimeTypes.length; i++) {
62 var mimeType = navigator.mimeTypes[i];
64 // We can only guarantee that the Test PlugIn is installed.
65 if (mimeType.type != "application/x-webkit-test-netscape")
66 continue;
68 document.writeln("<p>Type: " + mimeType.type + "<\/p>");
69 document.writeln("<p>Description: " + mimeType.description + "<\/p>");
70 document.writeln("<p>Suffixes: " + mimeType.suffixes + "<\/p>");
72 if (navigator.mimeTypes.item(i).type == mimeType.type) {
73 document.writeln("<p>MimeTypeArray.item() works.<\/p>");
74 } else {
75 document.writeln("<p>FAIL. MimeTypeArray.item() does not work.<\/p>");
78 if (navigator.mimeTypes.namedItem(mimeType.type).type == mimeType.type) {
79 document.writeln("<p>MimeTypeArray.namedItem() works.<\/p>");
80 } else {
81 document.writeln("<p>FAIL. MimeTypeArray.namedItem() does not work.<\/p>");
85 if (!foundTestPlugin)
86 document.writeln("<p>FAILURE! (Failed to find netscape test plugin)<\/p>");
87 </script>
88 </body>
89 </html>