docshell/test/test_bug551225.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/test_bug551225.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=551225
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 551225</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.14 +</head>
    1.15 +<body>
    1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=551225">Mozilla Bug 551225</a>
    1.17 +
    1.18 +<script type="application/javascript;version=1.7">
    1.19 +
    1.20 +/** Test for Bug 551225 **/
    1.21 +
    1.22 +obj = {
    1.23 +  a: new Date('1/1/2000'),
    1.24 +  b: /^foo$/,
    1.25 +  c: 'bar'
    1.26 +};
    1.27 +
    1.28 +history.replaceState(obj, '', '');
    1.29 +is(history.state.a.toString(), new Date('1/1/2000').toString(), 'Date object.');
    1.30 +is(history.state.b.toString(), '/^foo$/', 'Regex');
    1.31 +is(history.state.c, 'bar', 'Other state');
    1.32 +
    1.33 +</script>
    1.34 +</body>
    1.35 +</html>

mercurial