зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to mozilla-inbound
This commit is contained in:
Коммит
b84117e652
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,23 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
function handleRequest(request, response) {
|
||||
let count = getState("count");
|
||||
if (count === "") {
|
||||
count = "1";
|
||||
}
|
||||
|
||||
// If this is the first request, return the first source.
|
||||
if (count === "1") {
|
||||
response.setHeader("Content-Type", "application/javascript");
|
||||
response.write("// Imported.");
|
||||
setState("count", "2");
|
||||
}
|
||||
// For all subsequent requests, return the second source.
|
||||
else {
|
||||
response.setStatusLine(request.httpVersion, 404, "Not found");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const WORKER_1 = `
|
||||
importScripts("bug1290951_worker_imported.sjs");
|
||||
`;
|
||||
|
||||
const WORKER_2 = `
|
||||
// Remove importScripts(...)" for testing purpose.
|
||||
`;
|
||||
|
||||
function handleRequest(request, response) {
|
||||
let count = getState("count");
|
||||
if (count === "") {
|
||||
count = "1";
|
||||
}
|
||||
|
||||
// This header is necessary for making this script able to be loaded.
|
||||
response.setHeader("Content-Type", "application/javascript");
|
||||
|
||||
// If this is the first request, return the first source.
|
||||
if (count === "1") {
|
||||
response.write(WORKER_1);
|
||||
setState("count", "2");
|
||||
}
|
||||
// For all subsequent requests, return the second source.
|
||||
else {
|
||||
response.write(WORKER_2);
|
||||
}
|
||||
}
|
||||
|
|
@ -215,11 +215,8 @@ support-files =
|
|||
nofetch_handler_worker.js
|
||||
service_worker.js
|
||||
service_worker_client.html
|
||||
bug1290951_worker_main.sjs
|
||||
bug1290951_worker_imported.sjs
|
||||
|
||||
[test_bug1151916.html]
|
||||
[test_bug1290951.html]
|
||||
[test_bug1240436.html]
|
||||
[test_claim.html]
|
||||
[test_claim_oninstall.html]
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1290951 - Test update after a new verion of mainscipt that doesn't need an imported script anymore.</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<!--
|
||||
If the principal is not set, accessing self.caches in the worker will crash.
|
||||
-->
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
<div id="content"></div>
|
||||
<pre id="test"></pre>
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
// We have the iframe register for its own scope so that this page is not
|
||||
// holding any references when we GC.
|
||||
function register() {
|
||||
return Promise.resolve()
|
||||
.then(_ => navigator.serviceWorker.register("http://mochi.test:8888/" +
|
||||
"tests/dom/workers/test/" +
|
||||
"serviceworkers/" +
|
||||
"bug1290951_worker_main.sjs"))
|
||||
.then(r => ok(r, "Should be a registration."));
|
||||
}
|
||||
|
||||
function update() {
|
||||
return Promise.resolve()
|
||||
.then(_ => navigator.serviceWorker.getRegistration())
|
||||
.then(r => {
|
||||
return new Promise(aResolve => {
|
||||
r.addEventListener("updatefound", aResolve);
|
||||
r.update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function unregister() {
|
||||
return Promise.resolve()
|
||||
.then(_ => navigator.serviceWorker.getRegistration())
|
||||
.then(r => r.unregister())
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
register()
|
||||
.then(register)
|
||||
.then(update)
|
||||
.then(unregister)
|
||||
|
||||
.catch(e => ok(false, "Some test failed with error " + e))
|
||||
.then(SimpleTest.finish);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["dom.serviceWorkers.enabled", true],
|
||||
["dom.serviceWorkers.testing.enabled", true]
|
||||
]}, runTest);
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -60612,16 +60612,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker-imported-script.py": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker.py": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/resources/claim-worker.js": [
|
||||
[
|
||||
{}
|
||||
|
@ -120365,12 +120355,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/update-bytecheck.https.html": [
|
||||
[
|
||||
"/service-workers/service-worker/update-bytecheck.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/update-recovery.https.html": [
|
||||
[
|
||||
"/service-workers/service-worker/update-recovery.https.html",
|
||||
|
@ -202336,14 +202320,6 @@
|
|||
"0ddb4f1cf84729ed673295719ec58a3e5d600a12",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker-imported-script.py": [
|
||||
"772d029d4efbe22f62f3473d4afe9e501a792571",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker.py": [
|
||||
"2693790af1dcd812bc3741db7fa355e23eef0e01",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/claim-worker.js": [
|
||||
"e779a28c42928ff10219073171c1216c6623b4d4",
|
||||
"support"
|
||||
|
@ -203004,10 +202980,6 @@
|
|||
"7c8c6c3edca83d54f1838eccf3afb0b1223c7a44",
|
||||
"testharness"
|
||||
],
|
||||
"service-workers/service-worker/update-bytecheck.https.html": [
|
||||
"6562348b198124822297c6b622c3e63870427672",
|
||||
"testharness"
|
||||
],
|
||||
"service-workers/service-worker/update-recovery.https.html": [
|
||||
"aac5705d6844e4a33200418504adb57053a45be2",
|
||||
"testharness"
|
||||
|
@ -207649,11 +207621,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"web-animations/animation-model/animation-types/property-list.js": [
|
||||
"3d7b22ebf950652c8f806fff6aef68685a67ed5d",
|
||||
"4fa529fe470abb7a6fb4582d0174f1696b141f87",
|
||||
"support"
|
||||
],
|
||||
"web-animations/animation-model/animation-types/property-types.js": [
|
||||
"38bdeff00d21201dc65c8e0fd8a337093ab807e5",
|
||||
"7b79c51f6dc5c33aae127406509770159815c290",
|
||||
"support"
|
||||
],
|
||||
"web-animations/animation-model/animation-types/spacing-keyframes-filters.html": [
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
prefs: [layout.css.contain.enabled:true, layout.css.initial-letter.enabled:true, layout.css.overflow-clip-box.enabled:true, layout.css.shape-outside.enabled:true]
|
||||
[addition-per-property.html]
|
||||
type: testharness
|
||||
[column-gap: "normal" onto "200px"]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1356241
|
|
@ -35,14 +35,3 @@ prefs: [layout.css.contain.enabled:true, layout.css.initial-letter.enabled:true,
|
|||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1291187
|
||||
|
||||
[column-gap uses discrete animation when animating between "normal" and "200px" with linear easing]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1356241
|
||||
|
||||
[column-gap uses discrete animation when animating between "normal" and "200px" with effect easing]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1356241
|
||||
|
||||
[column-gap uses discrete animation when animating between "normal" and "200px" with keyframe easing]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1356241
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import time
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=0')]
|
||||
|
||||
imported_content_type = ''
|
||||
if 'imported' in request.GET:
|
||||
imported_content_type = request.GET['imported']
|
||||
|
||||
imported_content = 'default'
|
||||
if imported_content_type == 'time':
|
||||
imported_content = time.time()
|
||||
|
||||
body = '''
|
||||
// %s
|
||||
''' % (imported_content)
|
||||
|
||||
return headers, body
|
|
@ -1,28 +0,0 @@
|
|||
import time
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=0')]
|
||||
|
||||
main_content_type = ''
|
||||
if 'main' in request.GET:
|
||||
main_content_type = request.GET['main']
|
||||
|
||||
main_content = 'default'
|
||||
if main_content_type == 'time':
|
||||
main_content = time.time()
|
||||
|
||||
imported_request_type = ''
|
||||
if 'imported' in request.GET:
|
||||
imported_request_type = request.GET['imported']
|
||||
|
||||
imported_request = ''
|
||||
if imported_request_type == 'time':
|
||||
imported_request = '?imported=time';
|
||||
|
||||
body = '''
|
||||
// %s
|
||||
importScripts('bytecheck-worker-imported-script.py%s');
|
||||
''' % (main_content, imported_request)
|
||||
|
||||
return headers, body
|
|
@ -1,127 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title></title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="resources/testharness-helpers.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/test-helpers.sub.js"></script>
|
||||
<script>
|
||||
|
||||
promise_test(function(t) {
|
||||
var script = 'resources/bytecheck-worker.py' +
|
||||
'?main=default' +
|
||||
'&imported=default';
|
||||
var scope = 'resources/blank.html';
|
||||
|
||||
var swr, sw;
|
||||
return Promise.resolve()
|
||||
.then(() => service_worker_unregister_and_register(t, script, scope))
|
||||
.then(registration => swr = registration)
|
||||
|
||||
.then(() => wait_for_update(t, swr))
|
||||
.then(worker => sw = worker)
|
||||
|
||||
.then(() => wait_for_state(t, sw, 'activated'))
|
||||
.then(() => assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw,
|
||||
null,
|
||||
null]))
|
||||
|
||||
.then(() => swr.update())
|
||||
.then(() => assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw,
|
||||
null,
|
||||
null]))
|
||||
|
||||
.then(() => service_worker_unregister_and_done(t, scope));
|
||||
}, "Test with (main: same, imported: same)");
|
||||
|
||||
promise_test(function(t) {
|
||||
var script = 'resources/bytecheck-worker.py' +
|
||||
'?main=default' +
|
||||
'&imported=time';
|
||||
var scope = 'resources/blank.html';
|
||||
|
||||
var swr, sw;
|
||||
return Promise.resolve()
|
||||
.then(() => service_worker_unregister_and_register(t, script, scope))
|
||||
.then(registration => swr = registration)
|
||||
|
||||
.then(() => wait_for_update(t, swr))
|
||||
.then(worker => sw = worker)
|
||||
|
||||
.then(() => wait_for_state(t, sw, 'activated'))
|
||||
.then(() => assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw,
|
||||
null,
|
||||
null]))
|
||||
|
||||
.then(() => swr.update())
|
||||
.then(() => wait_for_update(t, swr))
|
||||
|
||||
.then(() => service_worker_unregister_and_done(t, scope));
|
||||
}, "Test with (main: same, imported: different)");
|
||||
|
||||
promise_test(function(t) {
|
||||
var script = 'resources/bytecheck-worker.py' +
|
||||
'?main=time' +
|
||||
'&imported=default';
|
||||
var scope = 'resources/blank.html';
|
||||
|
||||
var swr, sw;
|
||||
return Promise.resolve()
|
||||
.then(() => service_worker_unregister_and_register(t, script, scope))
|
||||
.then(registration => swr = registration)
|
||||
|
||||
.then(() => wait_for_update(t, swr))
|
||||
.then(worker => sw = worker)
|
||||
|
||||
.then(() => wait_for_state(t, sw, 'activated'))
|
||||
.then(() => assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw,
|
||||
null,
|
||||
null]))
|
||||
|
||||
.then(() => swr.update())
|
||||
.then(() => wait_for_update(t, swr))
|
||||
|
||||
.then(() => service_worker_unregister_and_done(t, scope));
|
||||
}, "Test with (main: different, imported: same)");
|
||||
|
||||
promise_test(function(t) {
|
||||
var script = 'resources/bytecheck-worker.py' +
|
||||
'?main=time' +
|
||||
'&imported=time';
|
||||
var scope = 'resources/blank.html';
|
||||
|
||||
var swr, sw;
|
||||
return Promise.resolve()
|
||||
.then(() => service_worker_unregister_and_register(t, script, scope))
|
||||
.then(registration => swr = registration)
|
||||
|
||||
.then(() => wait_for_update(t, swr))
|
||||
.then(worker => sw = worker)
|
||||
|
||||
.then(() => wait_for_state(t, sw, 'activated'))
|
||||
.then(() => assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw,
|
||||
null,
|
||||
null]))
|
||||
|
||||
.then(() => swr.update())
|
||||
.then(() => wait_for_update(t, swr))
|
||||
|
||||
.then(() => service_worker_unregister_and_done(t, scope));
|
||||
}, "Test with (main: different, imported: different)");
|
||||
|
||||
</script>
|
|
@ -364,15 +364,12 @@ var gCSSProperties = {
|
|||
},
|
||||
'column-count': {
|
||||
// https://drafts.csswg.org/css-multicol/#propdef-column-count
|
||||
types: [ 'positiveInteger',
|
||||
{ type: 'discrete', options: [ [ 'auto', '10' ] ] }
|
||||
types: [
|
||||
]
|
||||
},
|
||||
'column-gap': {
|
||||
// https://drafts.csswg.org/css-multicol/#propdef-column-gap
|
||||
types: [ 'length',
|
||||
{ type: 'discrete', options: [ [ 'normal', '200px' ] ] }
|
||||
]
|
||||
types: [ 'length' ]
|
||||
},
|
||||
'column-rule-color': {
|
||||
// https://drafts.csswg.org/css-multicol/#propdef-column-rule-color
|
||||
|
@ -1521,6 +1518,7 @@ function propertyToIDL(property) {
|
|||
function (str) {
|
||||
return str.substr(1).toUpperCase(); });
|
||||
}
|
||||
|
||||
function calcFromPercentage(idlName, percentageValue) {
|
||||
var examElem = document.createElement('div');
|
||||
document.body.appendChild(examElem);
|
||||
|
|
|
@ -179,34 +179,6 @@ const integerType = {
|
|||
|
||||
};
|
||||
|
||||
const positiveIntegerType = {
|
||||
testInterpolation: function(property, setup) {
|
||||
test(function(t) {
|
||||
var idlName = propertyToIDL(property);
|
||||
var target = createTestElement(t, setup);
|
||||
var animation = target.animate({ [idlName]: [1, 3] },
|
||||
{ duration: 1000, fill: 'both' });
|
||||
testAnimationSamples(animation, idlName,
|
||||
[{ time: 0, expected: '1' },
|
||||
{ time: 500, expected: '2' },
|
||||
{ time: 1000, expected: '3' }]);
|
||||
}, property + ' supports animating as a positive integer');
|
||||
},
|
||||
|
||||
testAddition: function(property, setup) {
|
||||
test(function(t) {
|
||||
var idlName = propertyToIDL(property);
|
||||
var target = createTestElement(t, setup);
|
||||
target.style[idlName] = 1;
|
||||
var animation = target.animate({ [idlName]: [2, 5] },
|
||||
{ duration: 1000, composite: 'add' });
|
||||
testAnimationSamples(animation, idlName,
|
||||
[{ time: 0, expected: '3' }]);
|
||||
}, property + ': positive integer');
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
const lengthPercentageOrCalcType = {
|
||||
testInterpolation: function(property, setup) {
|
||||
lengthType.testInterpolation(property, setup);
|
||||
|
@ -1057,7 +1029,6 @@ const types = {
|
|||
discrete: discreteType,
|
||||
filterList: filterListType,
|
||||
integer: integerType,
|
||||
positiveInteger: positiveIntegerType,
|
||||
length: lengthType,
|
||||
percentage: percentageType,
|
||||
lengthPercentageOrCalc: lengthPercentageOrCalcType,
|
||||
|
|
Загрузка…
Ссылка в новой задаче