Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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="/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
9 </head>
10 <body>
11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=362788">Mozilla Bug 362788</a>
12 <p id="display"></p>
13 <div id="content" style="display: none">
15 </div>
16 <pre id="test">
17 <script class="testbody" type="text/javascript">
18 <![CDATA[
20 /** Test for Bug 362788 **/
21 var Cc = SpecialPowers.Cc;
22 var Ci = SpecialPowers.Ci;
23 var lib = Cc["@mozilla.org/url-classifier/jslib;1"]
24 .getService().wrappedJSObject;
25 ok(!!lib, "unable to get wrapped js object");
28 // Make sure we strip off the query params from the key url.
29 var tests = [
30 [ "https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0&",
31 "https://sb-ssl.google.com/safebrowsing/getkey" ],
32 [ "https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0.0.1&",
33 "https://sb-ssl.google.com/safebrowsing/getkey" ],
35 // The lack of a ? shouldn't make us explode.
36 [ "https://sb-ssl.google.com/safebrowsing/getkey",
37 "https://sb-ssl.google.com/safebrowsing/getkey" ]
38 ];
40 for (var i = 0, testCase = null; testCase = tests[i]; ++i) {
41 var url = lib.PROT_UrlCryptoKeyManager.prototype.getPrefName_(testCase[0]);
42 ok(url == testCase[1], "unexpected url: " + url);
43 }
45 ]]>
46 </script>
47 </pre>
48 </body>
49 </html>