1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
3 <title> Installed Plugins </title>
4 <!-- ***** BEGIN LICENSE BLOCK *****
5 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
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/
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
17 - The Original Code is Mozilla Communicator Test Cases.
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.
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.
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 -->
45 <!-- script below is ngdriverspecific -->
46 <script TYPE="text/javascript" SRC="testlib.js">
49 <script TYPE="text/javascript">
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 -->
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>';
68 res = res + "<b><h3> Installed plug-ins </h3></b><br>";
70 res = res + "<b><font size=+2>No plug-ins are installed.</font></b><br>";
72 for (i = 0;i < numPlugins;i++)
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++)
94 enabledPlugin = mimetype.enabledPlugin;
95 if (enabledPlugin && (enabledPlugin.name == plugin.name))
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>";
106 res = res + "</table><p><hr><p>";
108 res = res + 'To Go Back to Components Page ';
109 res = res + '<a href="ComponentListTest.html">Click here</a>';
115 <script TYPE="text/javascript">
116 function displayResults(results)
118 document.results.textarea.value = results;
119 if (top.name == "testWindow")
125 document.write(document.results.textarea.value);
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 + '">');
138 <input type="hidden" name="textarea">
141 <script TYPE="text/javascript">
143 pluginres = getPlugins();
144 result = result + pluginres;
145 displayResults(result);