toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <title>Test that lookup() on a system principal doesn't crash</title>
     5   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     6   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
     7 </head>
     9 <body>
    10 <div id="content" style="display: none">
    11 </div>
    12 <pre id="test">
    14 <script type="text/javascript">
    16 var Cc = Components.classes;
    17 var Ci = Components.interfaces;
    19 var dbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
    20                 .getService(Ci.nsIUrlClassifierDBService);
    22 dbService.lookup(document.nodePrincipal, "", function(arg) {});
    24 ok(true, "lookup() didn't crash");
    26 </script>
    27 </pre>
    28 </body>
    29 </html>

mercurial