docshell/test/test_bug551225.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=551225
     5 -->
     6 <head>
     7   <title>Test for Bug 551225</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=551225">Mozilla Bug 551225</a>
    15 <script type="application/javascript;version=1.7">
    17 /** Test for Bug 551225 **/
    19 obj = {
    20   a: new Date('1/1/2000'),
    21   b: /^foo$/,
    22   c: 'bar'
    23 };
    25 history.replaceState(obj, '', '');
    26 is(history.state.a.toString(), new Date('1/1/2000').toString(), 'Date object.');
    27 is(history.state.b.toString(), '/^foo$/', 'Regex');
    28 is(history.state.c, 'bar', 'Other state');
    30 </script>
    31 </body>
    32 </html>

mercurial