Bug 1428745 - Remove support for version parameter from script loader - tests, r=jonco
☠☠ backed out by 38614ffd21d1 ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 09 Jan 2018 17:00:49 +0100
changeset 452764 1d5dc7dfd429af246a1d1aa1854485be1ad4b6ab
parent 452763 4e53f251c5b83bbb595e6d91ce14243f9381f9ee
child 452765 1d975770bd9a19208fb84e306729e5ce1ee396fc
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1428745
milestone59.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 1428745 - Remove support for version parameter from script loader - tests, r=jonco
browser/base/content/test/general/file_trackingUI_6.html
devtools/client/shared/components/test/mochitest/test_HSplitBox_01.html
devtools/client/storage/test/storage-cookies-samesite.html
dom/html/test/test_checked.html
dom/tests/mochitest/bugs/test_bug1171215.html
dom/tests/mochitest/bugs/test_no_find_showDialog.html
dom/xbl/test/test_bug389322.xhtml
layout/style/test/bug453896_iframe.html
layout/style/test/chrome/test_moz_document_rules.html
layout/style/test/test_addSheet.html
layout/style/test/test_additional_sheets.html
layout/style/test/test_computed_style_prefs.html
layout/style/test/test_media_queries_dynamic.html
toolkit/components/extensions/test/mochitest/mochitest-common.ini
toolkit/components/extensions/test/mochitest/test_ext_jsversion.html
uriloader/exthandler/tests/mochitest/download_page.html
--- a/browser/base/content/test/general/file_trackingUI_6.html
+++ b/browser/base/content/test/general/file_trackingUI_6.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <html>
 <head>
   <meta charset="UTF-8">
   <title>Testing the shield from fetch and XHR</title>
 </head>
 <body>
   <p>Hello there!</p>
-  <script type="application/javascript; version=1.8">
+  <script type="application/javascript">
     function test_fetch() {
       let url = "http://trackertest.org/browser/browser/base/content/test/general/file_trackingUI_6.js";
       return fetch(url);
     }
   </script>
 </body>
 </html>
--- a/devtools/client/shared/components/test/mochitest/test_HSplitBox_01.html
+++ b/devtools/client/shared/components/test/mochitest/test_HSplitBox_01.html
@@ -5,17 +5,17 @@
 <html>
 <!--
 Basic tests for the HSplitBox component.
 -->
 <head>
   <meta charset="utf-8">
   <title>Tree component test</title>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript "src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
   <link rel="stylesheet" href="resource://devtools/client/themes/splitters.css" type="text/css"/>
   <link rel="stylesheet" href="chrome://devtools/skin/components-h-split-box.css" type="text/css"/>
   <style>
     html {
       --theme-splitter-color: black;
     }
   </style>
--- a/devtools/client/storage/test/storage-cookies-samesite.html
+++ b/devtools/client/storage/test/storage-cookies-samesite.html
@@ -1,16 +1,16 @@
 <!DOCTYPE HTML>
 <html>
   <head>
     <meta charset="utf-8">
     <title>Storage inspector cookie samesite test</title>
   </head>
   <body>
-    <script type="application/javascript;version=1.7">
+    <script type="application/javascript">
     "use strict";
     let expiresIn24Hours = new Date(Date.now() + 60 * 60 * 24 * 1000).toUTCString();
 
     document.cookie = "test1=value1;expires=" + expiresIn24Hours + ";";
     document.cookie = "test2=value2;expires=" + expiresIn24Hours + ";SameSite=lax";
     document.cookie = "test3=value3;expires=" + expiresIn24Hours + ";SameSite=strict";
     </script>
   </body>
--- a/dom/html/test/test_checked.html
+++ b/dom/html/test/test_checked.html
@@ -21,17 +21,17 @@ and
   <form id="f2">
   </form>
   <menu id="m1">
   </menu>
   <menu id="m2">
   </menu>
 </div>
 <pre id="test">
-<script class="testbody" type="text/javascript; version=1.7">
+<script class="testbody" type="text/javascript">
 
 /** Test for Bug 418756 and 617528 **/
 var group1;
 var group2;
 var group3;
 
 var tags = ["input", "menuitem"];
 for (let tag of tags) {
--- a/dom/tests/mochitest/bugs/test_bug1171215.html
+++ b/dom/tests/mochitest/bugs/test_bug1171215.html
@@ -5,17 +5,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 1022869</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <iframe src="about:blank"></iframe>
-  <script type="text/javascript; version=1.8">
+  <script type="text/javascript">
 
   var f = document.getElementsByTagName("iframe")[0];
 
   SimpleTest.waitForExplicitFinish();
 
   /** Test for Bug 1022869 **/
   function startTest() {
     // Initialize our cookie.
--- a/dom/tests/mochitest/bugs/test_no_find_showDialog.html
+++ b/dom/tests/mochitest/bugs/test_no_find_showDialog.html
@@ -2,17 +2,17 @@
 <html>
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 1348409</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <iframe src="about:blank"></iframe>
-  <script type="text/javascript; version=1.8">
+  <script type="text/javascript">
 
   function checkForFindDialog() {
     let chromeScript = SpecialPowers.loadChromeScript(_ => {
       addMessageListener("test:check", () => {
         const { utils: Cu } = Components;
 
         Cu.import("resource://gre/modules/Services.jsm");
 
@@ -84,9 +84,9 @@
 </p>
 
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 </pre>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/dom/xbl/test/test_bug389322.xhtml
+++ b/dom/xbl/test/test_bug389322.xhtml
@@ -100,27 +100,19 @@ addLoadEvent(function() {
 });
 addLoadEvent(SimpleTest.finish);
 
 function report(testName, success) {
   is(success, true, "JS 1.7 should work in " + testName);
 }
 ]]>
 </script>
-<script type="text/javascript; version=1.7"><![CDATA[
-  try {
-    eval("let x = 1;");
-    var success = true;
-  }
-  catch (e) { success = false; }
-  report("HTML script tags with explicit version", success)
-]]></script>
 <script type="text/javascript"><![CDATA[
   try {
     eval("let x = 1;");
     var success = true;
   }
   catch (e) { success = false; }
-  is(success, true, "let should work in versionless HTML script tags");
+  is(success, true, "let should work in HTML script tags");
 ]]></script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/bug453896_iframe.html
+++ b/layout/style/test/bug453896_iframe.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
 <html lang="en-US">
 <head>
   <title>Bug 453896 Test middle frame</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
-  <script type="application/javascript; version=1.7">
+  <script type="application/javascript">
 
 function run(test_window)
 {
   var subdoc = document.getElementById("subdoc").contentDocument;
   var subwin = document.getElementById("subdoc").contentWindow;
   var style = subdoc.getElementById("style");
   var iframe_style = document.getElementById("subdoc").style;
   var body_cs = subdoc.defaultView.getComputedStyle(subdoc.body);
--- a/layout/style/test/chrome/test_moz_document_rules.html
+++ b/layout/style/test/chrome/test_moz_document_rules.html
@@ -5,17 +5,17 @@
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body onload="run()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=398962">Mozilla Bug 398962</a>
 <iframe id="iframe" src="http://mochi.test:8888/tests/layout/style/test/chrome/moz_document_helper.html"></iframe>
 <pre id="test">
-<script type="application/javascript; version=1.8">
+<script type="application/javascript">
 
 var [gStyleSheetService, gIOService] = (function() {
     return [
             Components.classes["@mozilla.org/content/style-sheet-service;1"]
                 .getService(Components.interfaces.nsIStyleSheetService),
             Components.classes["@mozilla.org/network/io-service;1"]
                 .getService(Components.interfaces.nsIIOService)
            ];
--- a/layout/style/test/test_addSheet.html
+++ b/layout/style/test/test_addSheet.html
@@ -7,17 +7,17 @@
 </head>
 <body onload="run()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1024707">Mozilla Bug 1024707</a>
 
 <iframe id="iframe1" src="additional_sheets_helper.html"></iframe>
 <iframe id="iframe2" src="additional_sheets_helper.html"></iframe>
 
 <pre id="test">
-<script type="application/javascript; version=1.8">
+<script type="application/javascript">
 
 let gIOService = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
   .getService(SpecialPowers.Ci.nsIIOService);
 
 let gSSService = SpecialPowers.Cc["@mozilla.org/content/style-sheet-service;1"]
   .getService(SpecialPowers.Ci.nsIStyleSheetService);
 
 function test(win, sheet) {
--- a/layout/style/test/test_additional_sheets.html
+++ b/layout/style/test/test_additional_sheets.html
@@ -4,17 +4,17 @@
   <title>Test for additional sheets</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body onload="run()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=737003">Mozilla Bug 737003</a>
 <iframe id="iframe" src="additional_sheets_helper.html"></iframe>
 <pre id="test">
-<script type="application/javascript; version=1.8">
+<script type="application/javascript">
 
 var gIOService = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
   .getService(SpecialPowers.Ci.nsIIOService)
 
 var gSSService = SpecialPowers.Cc["@mozilla.org/content/style-sheet-service;1"]
   .getService(SpecialPowers.Ci.nsIStyleSheetService);
 
 function getUri(style)
--- a/layout/style/test/test_computed_style_prefs.html
+++ b/layout/style/test/test_computed_style_prefs.html
@@ -7,17 +7,17 @@
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=919594">Mozilla Bug 919594</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
-<script type="application/javascript; version=1.7">
+<script type="application/javascript">
 
 /** Test that preffed off properties do not appear in computed style **/
 
 function testWithAllPrefsDisabled() {
   let exposedProperties = Object.keys(gCS).map(i => gCS[i]);
 
   // Store the number of properties for later tests to use.
   gLengthWithAllPrefsDisabled = gCS.length;
--- a/layout/style/test/test_media_queries_dynamic.html
+++ b/layout/style/test/test_media_queries_dynamic.html
@@ -10,17 +10,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body onload="run()">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=473400">Mozilla Bug 473400</a>
 <iframe id="subdoc" src="about:blank"></iframe>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
-<script class="testbody" type="application/javascript; version=1.7">
+<script class="testbody" type="application/javascript">
 
 /** Test for Bug 473400 **/
 
 SimpleTest.waitForExplicitFinish();
 
 function run() {
   var subdoc = document.getElementById("subdoc").contentDocument;
   var subwin = document.getElementById("subdoc").contentWindow;
--- a/toolkit/components/extensions/test/mochitest/mochitest-common.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest-common.ini
@@ -104,17 +104,16 @@ skip-if = os == 'android' # Android does
 [test_ext_geolocation.html]
 skip-if = os == 'android' # Android support Bug 1336194
 [test_ext_geturl.html]
 [test_ext_identity.html]
 skip-if = os == 'android' # unsupported.
 [test_ext_idle.html]
 [test_ext_inIncognitoContext_window.html]
 skip-if = os == 'android' # Android does not support multiple windows.
-[test_ext_jsversion.html]
 [test_ext_listener_proxies.html]
 [test_ext_new_tab_processType.html]
 [test_ext_notifications.html]
 skip-if = os == "win" # Bug 1398518
 [test_ext_permission_xhr.html]
 [test_ext_protocolHandlers.html]
 skip-if = (toolkit == 'android') # bug 1342577
 [test_ext_redirect_jar.html]
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/test_ext_jsversion.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for simple WebExtension</title>
-  <meta charset="utf-8">
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
-  <script type="text/javascript" src="head.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<script type="text/javascript">
-"use strict";
-
-add_task(async function test_versioned_js() {
-  // We need to deal with escaping the close script tags.
-  // May as well consolidate it into one place.
-  let script = attrs => `<script ${attrs}><\/script>`;
-
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      "background": {"page": "background.html"},
-    },
-
-    files: {
-      "background.html": `
-        <meta charset="utf-8">
-        ${script('src="background.js" type="application/javascript"')}
-        ${script('src="background-1.js" type="application/javascript;version=1.8"')}
-        ${script('src="background-2.js" type="application/javascript;version=latest"')}
-        ${script('src="background-3.js" type="application/javascript"')}
-      `,
-
-      "background.js": function() {
-        window.reportResult = msg => {
-          browser.test.assertEq(
-            msg, "background-script-3",
-            "Expected a message only from the unversioned background script.");
-
-          browser.test.sendMessage("finished");
-        };
-      },
-
-      "background-1.js": function() {
-        window.reportResult("background-script-1");
-      },
-      "background-2.js": function() {
-        window.reportResult("background-script-2");
-      },
-      "background-3.js": function() {
-        window.reportResult("background-script-3");
-      },
-    },
-  });
-
-  consoleMonitor.start([{message: /Versioned JavaScript.*not supported in WebExtension.*developer\.mozilla\.org/},
-                        {message: /Versioned JavaScript.*not supported in WebExtension.*developer\.mozilla\.org/}]);
-
-  await Promise.all([extension.startup(),
-                     extension.awaitMessage("finished")]);
-
-  await consoleMonitor.finished();
-  await extension.unload();
-});
-
-</script>
-
-</body>
-</html>
--- a/uriloader/exthandler/tests/mochitest/download_page.html
+++ b/uriloader/exthandler/tests/mochitest/download_page.html
@@ -1,16 +1,16 @@
 <!-- Any copyright is dedicated to the Public Domain.
    - http://creativecommons.org/publicdomain/zero/1.0/ -->
 <!DOCTYPE html>
 <html>
 <head>
   <meta charset=UTF-8>
   <title>Test page for link clicking</title>
-  <script type="text/javascript; version=1.8">
+  <script type="text/javascript">
     function launch_download() {
       window.open("download.bin", "_blank", "height=100,width=100");
     }
   </script>
 </head>
 <body>
   <a href="download.bin" id="regular_load">regular load</a>
   <a href="download.bin" id="target_blank" target="_blank">target blank</a>