Bug 823120 - Fix templates. r=jmaher
authorBobby Holley <bobbyholley@gmail.com>
Wed, 19 Dec 2012 15:27:49 -0800
changeset 125670 2d2612425e73915d1c8352f61b80cb0137ee3f5c
parent 125669 61c1733d72df964e394aeeda56ef28161e16ceb8
child 125671 7930f7397b4f8be704a1ad31310bd8daaace4465
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs823120
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 823120 - Fix templates. r=jmaher Having <script> tags after the content, rather than before, encourages people to do <iframe onload="go()"> before go is guaranteed to be defined.
testing/mochitest/static/test.template.txt
testing/mochitest/static/xhtml.template.txt
testing/mochitest/static/xul.template.txt
--- a/testing/mochitest/static/test.template.txt
+++ b/testing/mochitest/static/test.template.txt
@@ -3,28 +3,28 @@
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}
 -->
 <head>
   <meta charset="utf-8">
   <title>Test for Bug {BUGNUMBER}</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript">
+
+  /** Test for Bug {BUGNUMBER} **/
+
+
+
+
+
+  </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}">Mozilla Bug {BUGNUMBER}</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug {BUGNUMBER} **/
-
-
-
-
-
-</script>
 </pre>
 </body>
 </html>
--- a/testing/mochitest/static/xhtml.template.txt
+++ b/testing/mochitest/static/xhtml.template.txt
@@ -1,29 +1,29 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}
 -->
 <head>
   <title>Test for Bug {BUGNUMBER}</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript">
+  <![CDATA[
+
+  /** Test for Bug {BUGNUMBER} **/
+
+
+
+
+  ]]>
+</script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}">Mozilla Bug {BUGNUMBER}</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
-<script type="application/javascript">
-<![CDATA[
-
-/** Test for Bug {BUGNUMBER} **/
-
-
-
-
-]]>
-</script>
 </pre>
 </body>
 </html>
--- a/testing/mochitest/static/xul.template.txt
+++ b/testing/mochitest/static/xul.template.txt
@@ -3,25 +3,25 @@
 <?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}
 -->
 <window title="Mozilla Bug {BUGNUMBER}"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
 
-  <!-- test results are displayed in the html:body -->
-  <body xmlns="http://www.w3.org/1999/xhtml">
-  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}"
-     target="_blank">Mozilla Bug {BUGNUMBER}</a>
-  </body>
-
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
 
   /** Test for Bug {BUGNUMBER} **/
 
 
 
   ]]>
   </script>
+
+  <!-- test results are displayed in the html:body -->
+  <body xmlns="http://www.w3.org/1999/xhtml">
+  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id={BUGNUMBER}"
+     target="_blank">Mozilla Bug {BUGNUMBER}</a>
+  </body>
 </window>