<html>

    <head>
    	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>Installed Plug-ins</title>
	<style type="text/css">
            body { color: #555; }
            div#margins { margin: 5%; }
            
            div.plugin-name {
                margin-top: 2em;
                margin-bottom: 1en;
                font-size: large;
                font-weight: bold;
                color: black;
            }
            
            table {
                background-color: #F5F5F5;
                color: #222;
                font: message-box;
                width: 100%;
                border: 1px solid #222;
                border-spacing: 0px;
            }
            
            th {
                text-align: center;
                font-weight: bold;
                background-color: #CCC;
            }
            
            th + th, td + td { border-left: 1px solid #AAA; }
            td               { border-top: 1px solid #AAA;  }
            th, td           { padding: 3px; }
            
            td.extensions    { text-align: center; }
            
            th.MIME-type     { width: 30%; }
            th.description   { width: 50%; }
            th.extensions    { width: 20%; }
        </style>
    </head>

    <body>
        <div id="margins">
            <script type="application/x-javascript">
            
                if (window.layoutTestController)
                    layoutTestController.dumpAsText();

                // Localizers: Translate the title above, and these six strings, and leave the rest of the file intact.

                var InstalledPlugIns = "Installed Plug-ins";
                var BetweenDescriptionAndFilename = " &mdash; from file &ldquo;";
                var AfterFilename = "&rdquo;.";
                var MIMETypeColumnHeader = "MIME Type";
                var DescriptionColumnHeader = "Description";
                var ExtensionsColumnHeader = "Extensions";

                // Now the code.

                navigator.plugins.refresh(false); // Supposedly helps if new plug-ins were added.

                var plugin = new Array();
                plugin.name = "testname";
                plugin.description = "testdescription";
                plugin.filename = "testfilename";
                if (navigator.plugins.length > 0) // should catch navigator.plugins being undefined
                     plugin[0] = { type: "testtype", description: "testdescription", suffixes: "testsuffixes" };

                document.writeln("<div class=\"plugin-name\">" + plugin.name + "<\/div>");

                document.writeln("<blockquote>" + plugin.description + BetweenDescriptionAndFilename + plugin.filename + AfterFilename + "<\/blockquote>");

                document.writeln("<table class=\"types-table\">");

                document.writeln("<thead><tr>");
                document.writeln("<th class=\"MIME-type\">" + MIMETypeColumnHeader + "<\/th>");
                document.writeln("<th class=\"description\">" + DescriptionColumnHeader + "<\/th>");
                document.writeln("<th class=\"extensions\">" + ExtensionsColumnHeader + "<\/th>");
                document.writeln("<\/tr><\/thead>");

                document.writeln("<tbody>");
                for (var mi = 0; mi != plugin.length; ++mi) {
                    document.writeln("<tr>");
                    document.writeln("<td class=\"MIME-type\">" + plugin[mi].type + "<\/td>");
                    document.writeln("<td class=\"description\">" + plugin[mi].description + "<\/td>");
                    document.writeln("<td class=\"extensions\">" + plugin[mi].suffixes + "<\/td>");
                    document.writeln("<\/tr>");
                }
                
                document.writeln("<\/tbody>");

                document.writeln("<\/table>");

            </script>
        </div>
    </body>

</html>
