Bug 449371 Firefox/Thunderbird crashes at exit [@ gdk_display_x11_finalize], p=Brian...
[wine-gecko.git] / testing / mochitest / tests / test_bug362788.xhtml
blob301aeaa65a76b0fca2de5c3144365e8ca9f82d5d
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=362788
4 -->
5 <head>
6 <title>Test for Bug 362788</title>
7 <script type="text/javascript" src="/MochiKit/packed.js"></script>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=362788">Mozilla Bug 362788</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script class="testbody" type="text/javascript">
19 <![CDATA[
21 /** Test for Bug 362788 **/
22 netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
23 var Cc = Components.classes;
24 var Ci = Components.interfaces;
25 var lib = Cc["@mozilla.org/url-classifier/jslib;1"]
26 .getService().wrappedJSObject;
27 ok(!!lib, "unable to get wrapped js object");
30 // Make sure we strip off the query params from the key url.
31 var tests = [
32 [ "https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0&",
33 "https://sb-ssl.google.com/safebrowsing/getkey" ],
34 [ "https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0.0.1&",
35 "https://sb-ssl.google.com/safebrowsing/getkey" ],
37 // The lack of a ? shouldn't make us explode.
38 [ "https://sb-ssl.google.com/safebrowsing/getkey",
39 "https://sb-ssl.google.com/safebrowsing/getkey" ]
42 for (var i = 0, testCase = null; testCase = tests[i]; ++i) {
43 var url = lib.PROT_UrlCryptoKeyManager.prototype.getPrefName_(testCase[0]);
44 ok(url == testCase[1], "unexpected url: " + url);
47 ]]>
48 </script>
49 </pre>
50 </body>
51 </html>