testing/mochitest/tests/test_bug362788.xhtml
author Gregory Szorc <gps@mozilla.com>
Tue, 15 Jan 2013 22:21:21 -0800
changeset 119046 ec072cee05025335f0637de7e1dab95623fe8a56
parent 74313 f1c41350c548e5f64d206e7559a28d251ddaefff
child 148982 356ba083bb5f8f5e6f76d69d2f5109d37b709039
permissions -rw-r--r--
Bug 784841 - Part 2: Implement sandboxing for Python build files; r=ted,glandium This is the beginning of Mozilla's new build system. In this patch, we have a Python sandbox tailored for execution of Python scripts which will define the build system. We also have a build reader that traverses a linked set of scripts. More details are available in the thorough README.rst files as part of this patch. * * * Bug 784841 - Part 2b: Option to not descend into child moz.build files; r=ted

<html xmlns="http://www.w3.org/1999/xhtml">
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=362788
-->
<head>
  <title>Test for Bug 362788</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=362788">Mozilla Bug 362788</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
<![CDATA[

/** Test for Bug 362788 **/
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var Cc = Components.classes;
var Ci = Components.interfaces;
var lib = Cc["@mozilla.org/url-classifier/jslib;1"]
          .getService().wrappedJSObject;
ok(!!lib, "unable to get wrapped js object");


// Make sure we strip off the query params from the key url.
var tests = [
  [ "https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0&",
    "https://sb-ssl.google.com/safebrowsing/getkey" ],
  [ "https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0.0.1&",
    "https://sb-ssl.google.com/safebrowsing/getkey" ],

  // The lack of a ? shouldn't make us explode.
  [ "https://sb-ssl.google.com/safebrowsing/getkey",
    "https://sb-ssl.google.com/safebrowsing/getkey" ]
];

for (var i = 0, testCase = null; testCase = tests[i]; ++i) {
  var url = lib.PROT_UrlCryptoKeyManager.prototype.getPrefName_(testCase[0]);
  ok(url == testCase[1], "unexpected url: " + url);
}

]]>
</script>
</pre>
</body>
</html>