dom/tests/mochitest/sessionstorage/test_sessionStorageFromChrome.xhtml

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <head>
     3 <title>sessionStorage basic test</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" />
     8 <script type="text/javascript">
    10 function startTest()
    11 {
    12   // Check that we do not crash when we access the sessionStorage object from
    13   // chrome and that we throw.  See bug 404453.
    14   var exceptionCaught = false;
    15   try {
    16     sessionStorage;
    17   }
    18   catch (e) {
    19     is(e.result, Components.results.NS_ERROR_NOT_AVAILABLE,
    20        "Testing that we get the expected exception.");
    21     exceptionCaught = true;
    22   }
    23   is(exceptionCaught, true, "Testing that an exception was thrown.");
    25   SimpleTest.finish();
    26 }
    28 </script>
    30 </head>
    32 <body onload="startTest();">
    33 </body>
    34 </html>

mercurial