|
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> |
|
14 |
|
15 <script type="application/javascript;version=1.7"> |
|
16 |
|
17 /** Test for Bug 551225 **/ |
|
18 |
|
19 obj = { |
|
20 a: new Date('1/1/2000'), |
|
21 b: /^foo$/, |
|
22 c: 'bar' |
|
23 }; |
|
24 |
|
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'); |
|
29 |
|
30 </script> |
|
31 </body> |
|
32 </html> |