1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=362788
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" />
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=362788">Mozilla Bug
362788</a>
14 <div id=
"content" style=
"display: none">
18 <script class=
"testbody" type=
"text/javascript">
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.
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);