Automatic update from web-platform-tests
service worker: Improve WPT tests for async respondWith/waitUntil. (#15852)
See discussion at [1] and [2].
This makes the following changes.
1.
Adds a test for:
self.addEventListener('fetch', e => {
Promise.resolve().then(() => {
e.respondWith(new Response('hi'));
});
});
This should not throw because respondWith() is called while the event
dispatch flag is still set.
The microtask checkpoint is in "Cleanup After Running Scripts" here:
https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script
This is called from step 16.2 here:
https://heycam.github.io/webidl/#call-a-user-objects-operation
Which in turn is called from the DOM spec's "Inner Invoke" to call event
targets:
https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
2.
Changes the expectation for:
addEventListener('message', event => {
Promise.resolve().then(event.waitUntil(p));
});
From throws to not throws, for the same reasoning as above.
3.
Changes the expectation for:
addEventListener('message', event => {
waitPromise = Promise.resolve();
event.waitUntil(waitPromise);
waitPromise.then(() => {
Promise.resolve().then(() => {event.waitUntil();});
});
});
From throws to not throws. This is subtle. Because all the promises
are just Promise.resolve(), the event dispatch flag is still set
by the time the second waitUntil() is called.
4.
To test what 3. originally intended, a new test is
added which makes waitPromise a promise that does not immediately
resolve.
5.
Changes the expectation for:
addEventListener(‘fetch’, event => {
response = Promise.resolve(new Response('RESP'));
event.respondWith(response);
response.then(() => {
Promise.resolve().then(() => {event.waitUntil();});
})
});
Again this is because the promises used resolve immediately,
so the event dispatch flag is still set.
Similarly, a new test is added to cover the original intent.
These WPT changes appear to match the behavior of Safari and Edge while
diverging from Chrome and (partially) Firefox.
[1] https://github.com/w3c/ServiceWorker/issues/1213
[2] https://github.com/w3c/ServiceWorker/issues/1394
Bug: 942414
Change-Id: I9a4a56d71d3919ed614ff78df2bdc6cc0251dadd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524393
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641514}
--
wpt-commits: cecb3eba4dae3d795876f7b4be71bd49afa03356
wpt-pr: 15852
Automatic update from web-platform-tests
[Payment Request] Fix validation order of PaymentCurrencyAmount.
The "check and canonicalize amount" algorithm in the spec requires that
the |currency| field is validated before the |amount| field.
https://w3c.github.io/payment-request/#validity-checkers
Without this patch, Chrome incorrectly throws TypeError instead of
RangeError when both the currency and amount are invalid.
With the patch, Chrome passes the currency validation tests in
https://w3c-test.org/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html
Also fixed a typo in WPT test name.
Bug: 942656
Change-Id: I76b249bc1970740e0c3c9e2309bf2b9ce912450a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526434
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641586}
--
wpt-commits: e8b9fd1d25ee3fffa8de164773951d49fff28298
wpt-pr: 15873
Automatic update from web-platform-tests
Some work on updateWith-method-pmi-handling-manual.https.html (#15891)
--
wpt-commits: 25dbafd3388dcca95d5bf81896b14f1c22e716ce
wpt-pr: 15891
Automatic update from web-platform-tests
Mark event dispatch test as needing long timeout
--
wpt-commits: cf535b2356620b5b0e89b7c981c43b30b9c54a9b
wpt-pr: 15890
Automatic update from web-platform-tests
Upstream shapedetection tests to WPT
Moved shapedetection tests under
third_party/blink/web_tests/shapedetection/,
third_party/blink/web_tests/fast/shapedetection/,
third_party/blink/web_tests/http/tests/shapedetection/,
to third_party/blink/web_tests/external/wpt/shape-detection/, excludes
the Text detection part as which is still a sister informative
specification of Shape Detection.
Copyed third_party/blink/web_tests/shapedetection/resources/big-buffer-helpers.js
to wpt/shape-detection/resources/shapedetection-helpers.js and extended it by
adding a wrapper promise test, detection_test.
Moved third_party/blink/web_tests/shapedetection/resources/mock-barcodedetection.js
and third_party/blink/web_tests/shapedetection/resources/mock-facedetection.js
to wpt/resources/chromium/
Used the testharness from wpt/ and rewrited tests to remove use of
generate_tests as which is discouraged in wpt.
Rewrite detection-on-worker.html as detection-on-worker.worker.js by using
wpt preferred worker test framework.
Rename detection-support.html as detection-getSupportedFormats.html as *-support.html
is treated as support file rather than test file in wpt.
No new tests have been added.
BUG=932382
Change-Id: I321e7b9f986f407b83325bb4c6bdc366c9769264
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510754
Commit-Queue: Wanming Lin <wanming.lin@intel.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641504}
--
wpt-commits: 7183ea12000b9edaac650b1211c35aa6e0abba88
wpt-pr: 15761
This patch creates better code, when compiling Wasm via Ion, for 32-bit
integer selects which are guarded by a 32-bit integer compare. No other type
combinations are optimised at present. Changes:
* LIR-shared.h: Add new LIR node LWasmCompareAndSelect, holding the values to
compare, the values to select over, and the comparison details.
* CanEmitCompareAtUses:
- Rewrite (transform mechanically) remove hard-to-reason-about control flow
(a loop which probably only iterates once, and a boolean control
variable). These are both removed and replaced by obvious straight-line
code.
- Also allow deferred emission when there is a single user and it is a
WasmSelect.
* LIRGenerator::visitWasmSelect for both arm and x86-shared:
- All target specific variants have been removed and replaced by a shared
version.
- If the condition is a compare, marked 'may be emitted at use point', and
has the correct types, bundle up the comparison arguments and values to be
selected-over into a single LWasmCompareAndSelect node.
* CodeGenerator::visitWasmCompareAndSelect for both arm and x86-shared:
- All target specific variants have been removed and replaced by a shared
version.
- From an LWasmCompareAndSelect node, generate the desired optimal sequence:
a compare immediately followed by a conditional move.
* CodeGenerator::generateBody(), ifdef JS_JITSPEW, one liner ridealong: print
"# " before the LIR instruction name, so as to make reading IONFLAGS=codegen
output easier. No (release-) functional change.
* New test case select-int32.js.
Apart from the removal of aarch64-specific lowering and codegen routines, none
of the changes apply to aarch64, because wasm-via-Ion on aarch64 is not
currently supported.
Differential Revision: https://phabricator.services.mozilla.com/D27071
--HG--
extra : amend_source : b78829ee47231cbd35be4844a91a0ed4582e3ecc
These test cases intentionally check only Y-axis scroll position since
horizontal scroll on the root element has been broken, e.g. bug 1102175
or bug 1260054.
Differential Revision: https://phabricator.services.mozilla.com/D27988
--HG--
extra : moz-landing-system : lando
Now scroll-snap-type property on body element doesn't affect scroll position
so that scrollTo-scrollBy-snaps.html is needed to be modified to specify
scroll-snap-type on html.
Differential Revision: https://phabricator.services.mozilla.com/D27987
--HG--
extra : moz-landing-system : lando
The one is for the scroll snap module v1 implementation, the other is for the
old scroll snap implementation. Now both functions have the same pieces of
code to get scroll-snap-type values, but for v1 implemention in the next commit
we will use GetFrameForScrollSnap() to get the value instead.
Differential Revision: https://phabricator.services.mozilla.com/D27986
--HG--
extra : moz-landing-system : lando
In the CSS writing mode spec [1], the writing mode for the document should be
taken from body, GetFrameForDir() is the function to get the corresponding frame
for writing-mode.
A web platform test for this case will be added at the last of this commit
series. Unfortunately as of this commit, we can't introduce proper test cases
since there is another issue on scroll-snap-type which will be fixed in
subsequent commits.
[1] https://drafts.csswg.org/css-writing-modes-4/#principal-flow
Differential Revision: https://phabricator.services.mozilla.com/D27984
--HG--
extra : moz-landing-system : lando
Changes:
- added comments for tests being disabled
- disabled two additional tests in order to green the run
Differential Revision: https://phabricator.services.mozilla.com/D28085
--HG--
extra : moz-landing-system : lando
We were never adjusting `last` in this loop, so we were computing the
wrong addresses for all sections beyond the first. Which in turn meant
that we would compute the wrong size for the section data we needed to
allocate.
Differential Revision: https://phabricator.services.mozilla.com/D28195
--HG--
extra : moz-landing-system : lando
This patch removes the packages which are obviously unnecessary, either
because they're entirely unused (e.g., imake), or because they're built
in-tree (e.g., nss, icu, hunspell) by default.
xorg-server-xvfb is arguably also not necessary, but is probably useful enough
to keep. Some of the others I'm unsure about, so I've left as well.
Differential Revision: https://phabricator.services.mozilla.com/D28140
--HG--
extra : rebase_source : 948a9056091f3004da02fe110de3930ee454f1ac
extra : histedit_source : 44320ee6197a2ca5702021fe21663ad2bc9f15f7%2Ce09f30ffc4d432587fef610d6d219b4151a010f5
This patch should prevent a guest user from putting a non-guest user's (existing) BITS download in a failure state. If, however, the guest user is the first user to try BITS, it will fail and will still put BITS in an error state, falling back to nsIIncrementalDownload.
Differential Revision: https://phabricator.services.mozilla.com/D28258
--HG--
extra : moz-landing-system : lando