Revert accidental checkin to NSS.
[wine-gecko.git] / embedding / qa / jstests / plugins.txt
bloba32c697777dccf899c5ff6d9a8037a7881c8a9d1
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <title> Installed Plugins </title>
4 <!-- ***** BEGIN LICENSE BLOCK *****
5    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
6    -
7    - The contents of this file are subject to the Mozilla Public License Version
8    - 1.1 (the "License"); you may not use this file except in compliance with
9    - the License. You may obtain a copy of the License at
10    - http://www.mozilla.org/MPL/
11    -
12    - Software distributed under the License is distributed on an "AS IS" basis,
13    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14    - for the specific language governing rights and limitations under the
15    - License.
16    -
17    - The Original Code is Mozilla Communicator Test Cases.
18    -
19    - The Initial Developer of the Original Code is
20    - Netscape Communications Corporation.
21    - Portions created by the Initial Developer are Copyright (C) 1999
22    - the Initial Developer. All Rights Reserved.
23    -
24    - Contributor(s):
25    -
26    - Alternatively, the contents of this file may be used under the terms of
27    - either the GNU General Public License Version 2 or later (the "GPL"), or
28    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29    - in which case the provisions of the GPL or the LGPL are applicable instead
30    - of those above. If you wish to allow use of your version of this file only
31    - under the terms of either the GPL or the LGPL, and not to allow others to
32    - use your version of this file under the terms of the MPL, indicate your
33    - decision by deleting the provisions above and replace them with the notice
34    - and other provisions required by the LGPL or the GPL. If you do not delete
35    - the provisions above, a recipient may use your version of this file under
36    - the terms of any one of the MPL, the GPL or the LGPL.
37    -
38    - ***** END LICENSE BLOCK ***** -->
39 <!-- Descrpt: This test case is part of Component List Test
40      Author: dsirnapalli@netscape.com
41      Revs: 10.12.01 - Created -->
43 <head>
45 <!-- script below is ngdriverspecific  -->
46 <script TYPE="text/javascript" SRC="testlib.js">
47 </script>
49 <script TYPE="text/javascript">
50 function getPlugins()
52   var res="";
54   //Enumerate all plug-ins
55   //First, refresh plugins in case anything has been changed recently in prefs:                        -->
56   //(The "false" argument tells refresh not to reload or activate any plugins that would       -->
57   //be active otherwise.In contrast,one would use "true" in the case of ASD instead of      -->
58   //restarting)                                                                                                                                                        -->
59   navigator.plugins.refresh(false);
60   numPlugins = navigator.plugins.length;
62   res = res + '<b><h3><font color="#CC6600"> Plugins </font></h3></b>' + '\n';
63   res = res + 'To Go Back to Components Page ';
64   res = res + '<a href="ComponentListTest.html">Click here</a>';
65   res = res + '<br>';
67   if(numPlugins > 0)
68     res = res + "<b><h3> Installed plug-ins </h3></b><br>";
69   else
70     res = res + "<b><font size=+2>No plug-ins are installed.</font></b><br>";
72   for (i = 0;i < numPlugins;i++)
73   {
74     plugin = navigator.plugins[i];
75     res = res + "<center><font size=+1><b>" + plugin.name + "</b></font></center><br>";
76     res = res + "<dl><dd>File name:" + plugin.filename;
77     res = res + "    <dd><br>" + plugin.description;
78     res = res + "</dl><p>";
80     res = res + "<table width=100% border=2 cellpadding=5>";
81     res = res + "<tr><th width=20%><font size=-1>Mime Type</font></th>";
82     res = res + "<th width=50%><font size=-1>Description</font></th>";
83     res = res + "<th width=20%><font size=-1>Suffixes</font></th>";
84     res = res + "<th><font size=-1>Enabled</th></tr>"
86     numTypes = plugin.length;
88     for (j = 0;j < numTypes;j++)
89     {
90       mimetype = plugin[j];
91       if (mimetype)
92       {
93         enabled = "No";
94         enabledPlugin = mimetype.enabledPlugin;
95         if (enabledPlugin && (enabledPlugin.name == plugin.name))
96           enabled = "Yes";
98         res = res + "<tr align=center>";
99         res = res + " <td>" + mimetype.type + "</td>";
100         res = res + " <td>" + mimetype.description + "</td>";
101         res = res + " <td>" + mimetype.suffixes + "</td>";
102         res = res + " <td>" + enabled + "</td>";
103         res = res + "</tr>";
104       }
105     }
106     res = res + "</table><p><hr><p>";
107   }
108   res = res + 'To Go Back to Components Page ';
109   res = res + '<a href="ComponentListTest.html">Click here</a>';
110   res = res + '<br>';
111   return res;
113 </script>
115 <script TYPE="text/javascript">
116 function displayResults(results)
118   document.results.textarea.value = results;
119   if (top.name == "testWindow")
120   {
121         fixSubmit();
122   }
123   else
124   {
125         document.write(document.results.textarea.value);
126   }
128 </script>
130 </head>
131 <body>
133 <!-- form below is ngdriverspecific  -->
134 <form name="results" action="/ngdriver/cgi-bin/writeresults.cgi" method="post">
135 <script TYPE="text/javascript">
136 document.write('<input name="resultsfile" type="hidden" value="' + window.opener.document.resultsform.resultsfile.value + '">');
137 </script>
138 <input type="hidden" name="textarea">
139 </form>
141 <script TYPE="text/javascript">
142 var result = "";
143 pluginres = getPlugins();
144 result = result + pluginres;
145 displayResults(result);
146 </script>
148 </body>
149 </html>