| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <p id="description"></p> |
| <div id="console"></div> |
| <script> |
| description("Check that navigator.plugins contains only the expected items"); |
| |
| shouldBeTrue("navigator.plugins.length == 5"); |
| |
| var validPluginNames = [ 'PDF Viewer', 'Chrome PDF Viewer', 'Chromium PDF Viewer', 'Microsoft Edge PDF Viewer', 'WebKit built-in PDF' ]; |
| |
| var hasInvalidPlugin = false; |
| |
| for (var i = 0; i < navigator.plugins.length; ++i) { |
| var plugin = navigator.plugins[i]; |
| if (!plugin.description || !plugin.name || !plugin.filename) { |
| hasInvalidPlugin = true; |
| break; |
| } |
| shouldBeTrue("plugin.name == validPluginNames[i]"); |
| shouldBeTrue("plugin.description == 'Portable Document Format'"); |
| } |
| |
| shouldBeFalse("hasInvalidPlugin"); |
| |
| successfullyParsed = true; |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |