dom/tests/mochitest/sessionstorage/test_sessionStorageFromChrome.xhtml

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

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 <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