4 https://bugzilla.mozilla.org/show_bug.cgi?id=703855
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"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=703855">Mozilla Bug
703855</a>
15 <div id=
"content" style=
"display: none">
16 <iframe id=
"f" src=
"file_bug703855.html"></iframe>
19 <script type=
"application/javascript">
21 /** Test for Bug
703855 **/
23 SimpleTest.waitForExplicitFinish();
25 var timingAttributes = [
29 'domContentLoadedEventEnd',
30 'domContentLoadedEventStart',
47 var originalTiming = {};
50 var timing = $(
"f").contentWindow.performance.timing;
51 for (i in timingAttributes) {
52 originalTiming[timingAttributes[i]] = timing[timingAttributes[i]];
55 var doc = $(
"f").contentDocument;
57 doc.write(
"<!DOCTYPE html>");
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]);
70 addLoadEvent(function() {
71 SimpleTest.executeSoon(runTest);