зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1428745 - Remove support for version parameter from script loader - tests, r=jonco
This commit is contained in:
Родитель
9d1d1b1ff3
Коммит
174498ca29
|
@ -6,7 +6,7 @@
|
|||
</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);
|
||||
|
|
|
@ -10,7 +10,7 @@ Basic tests for the HSplitBox component.
|
|||
<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"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<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();
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ and
|
|||
</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;
|
||||
|
|
|
@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1022869
|
|||
<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];
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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(_ => {
|
||||
|
@ -89,4 +89,4 @@
|
|||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -105,21 +105,13 @@ function report(testName, success) {
|
|||
}
|
||||
]]>
|
||||
</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>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<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)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<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 [
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<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);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
</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 **/
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=473400
|
|||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript; version=1.7">
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
||||
/** Test for Bug 473400 **/
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ 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]
|
||||
|
|
|
@ -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>
|
|
@ -5,7 +5,7 @@
|
|||
<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");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче