<html>
<head>
<script>
function test()
{
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
        internals.setShowAllPlugins(false);
    }

    var unexpectedPlugins = [];
    Array.prototype.forEach.call(navigator.plugins, function(plugin) {
        if (plugin.name.match(/Shockwave/i))
            return;
        if (plugin.name.match(/QuickTime/i))
            return;
        if (plugin.name.match(/Java/i))
            return;
        if (plugin.name.match(/WebKit built-in PDF/i))
            return;

        unexpectedPlugins.push(plugin.name);
    });

    if (unexpectedPlugins.length)
        document.getElementById("result").innerText = "FAIL: Unexpected plugins: " + unexpectedPlugins.toString();
    else
        document.getElementById("result").innerText = "PASS: No unexpected plugins were found."
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
</head>
<body onload="test();">
<p>
    Check we only display the valid set of "public" plugins.
</p>
<div id="result">TEST DID NOT RUN</div>
</body>
</html>
