Bumping manifests a=b2g-bump
[gecko.git] / docshell / test / test_bug703855.html
blob0804f70bc3bd90e402bfc9e74dae30e1f532698a
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=703855
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 703855</title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=703855">Mozilla Bug 703855</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
16 <iframe id="f" src="file_bug703855.html"></iframe>
17 </div>
18 <pre id="test">
19 <script type="application/javascript">
21 /** Test for Bug 703855 **/
23 SimpleTest.waitForExplicitFinish();
25 var timingAttributes = [
26 'connectEnd',
27 'connectStart',
28 'domComplete',
29 'domContentLoadedEventEnd',
30 'domContentLoadedEventStart',
31 'domInteractive',
32 'domLoading',
33 'domainLookupEnd',
34 'domainLookupStart',
35 'fetchStart',
36 'loadEventEnd',
37 'loadEventStart',
38 'navigationStart',
39 'redirectEnd',
40 'redirectStart',
41 'requestStart',
42 'responseEnd',
43 'responseStart',
44 'unloadEventEnd',
45 'unloadEventStart'
47 var originalTiming = {};
49 function runTest() {
50 var timing = $("f").contentWindow.performance.timing;
51 for (i in timingAttributes) {
52 originalTiming[timingAttributes[i]] = timing[timingAttributes[i]];
55 var doc = $("f").contentDocument;
56 doc.open();
57 doc.write("<!DOCTYPE html>");
58 doc.close();
60 SimpleTest.executeSoon(function() {
61 var newTiming = $("f").contentWindow.performance.timing;
62 for (var i in timingAttributes) {
63 is(timing[timingAttributes[i]], originalTiming[timingAttributes[i]],
64 "document.open should not affect value of " + timingAttributes[i]);
66 SimpleTest.finish();
67 });
70 addLoadEvent(function() {
71 SimpleTest.executeSoon(runTest);
72 });
76 </script>
77 </pre>
78 </body>
79 </html>