Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Blink WPT Bot 43a34a8adf Bug 1536619 [wpt PR 15852] - service worker: Improve WPT tests for async respondWith/waitUntil., a=testonly
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
2019-04-23 15:05:50 +01:00
.cargo Bug 1539406: Bump Cranelift to revision 542d799dd7a3b2cc; r=lth 2019-04-15 10:39:28 +00:00
.vscode Bug 1543529 - Stop recommending VSCode plugin "Babel ES6/ES7" r=jya 2019-04-11 03:31:54 +00:00
accessible Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-22 16:35:03 +00:00
browser Backed out changeset 6fea732af766 (bug 1539984) for browser_PanelMultiView_keyboard.js failures CLOSED TREE 2019-04-23 06:41:42 +03:00
build Bug 1542958 - fix code section adjustments in elfhack; r=glandium 2019-04-22 23:44:28 +00:00
caps Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-22 16:35:03 +00:00
chrome Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug 2019-04-01 22:42:34 +00:00
config Bug 1541068 - add Rust compilation directories to GARBAGE_DIRS; r=nalexander 2019-04-09 18:59:19 +00:00
db Bug 1530749 - Upgrade to SQLite 3.27.2. r=mak 2019-02-26 23:21:05 +00:00
devtools Bug 1545697 - Fixes right breakpoint pane toggle button r=davidwalsh 2019-04-22 15:55:28 +00:00
docshell Backed out 4 changesets (bug 1493225) for browser-chrome failures with application terminated with exit code 2147483651 on a CLOSED TREE 2019-04-19 23:55:50 +03:00
dom Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
editor Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki 2019-04-21 20:13:34 +00:00
extensions Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj 2019-04-21 01:47:00 +00:00
gfx Bug 1544183 - If WebRender didn't qualify also disable OpenGL on Tier3 as well. r=kats 2019-04-23 09:51:31 -04:00
gradle/wrapper
hal Bug 1523969 part 9 - Move method definition inline comments to new line in 'hal/'. r=gsvelto 2019-02-25 16:07:35 -06:00
image Bug 1544961 - comment on gtests that are disabled, disable ThreadUtils.IdleRunnableMethod and Timers.FindExpirationTime for windows10-aarch64 r=jmaher,gbrown,dmajor 2019-04-23 00:21:37 +00:00
intl Bug 1544961 - comment on gtests that are disabled, disable ThreadUtils.IdleRunnableMethod and Timers.FindExpirationTime for windows10-aarch64 r=jmaher,gbrown,dmajor 2019-04-23 00:21:37 +00:00
ipc Bug 1535704: Part 1 - Move IsWin32kLockedDown into mozglue; r=bobowen 2019-04-22 19:13:23 +00:00
js Bug 1532286 - Wasm/Ion: generate better code for wasmSelect in some cases. r=jandem. 2019-03-15 17:11:06 +01:00
layout Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
media Bug 1546070 - Update dav1d from upstream to f8cac8c. r=TD-Linux 2019-04-22 19:48:05 +00:00
memory Bug 1544961 - comment on gtests that are disabled, disable ThreadUtils.IdleRunnableMethod and Timers.FindExpirationTime for windows10-aarch64 r=jmaher,gbrown,dmajor 2019-04-23 00:21:37 +00:00
mfbt Bug 1544170 Part 1 - Notify record/replay system about parsed style sheets, r=heycam. 2019-04-12 16:33:00 -10:00
mobile Merge inbound to mozilla-central. a=merge 2019-04-23 00:48:20 +03:00
modules Merge autoland to mozilla-central. a=merge 2019-04-23 00:45:58 +03:00
mozglue Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-22 16:35:03 +00:00
netwerk Merge autoland to mozilla-central. a=merge 2019-04-23 00:45:58 +03:00
nsprpub Bug 1526010, NSPR 4.21 RTM, r=me 2019-03-07 11:16:36 +01:00
other-licenses Bug 1538249 - Support pinning to the taskbar on Windows 10. r=agashlin 2018-10-15 08:13:12 -07:00
parser Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky 2019-04-16 03:50:44 +00:00
python Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-04-23 01:18:37 +03:00
remote Backed out 4 changesets (bug 1533831) for failing at /browser/browser_target.js on a CLOSED TREE. 2019-04-18 05:35:54 +03:00
security Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-22 16:35:03 +00:00
services Bug 1483077 - Replaced reference to getBrowser with gBrowser r=robwu,dao 2019-04-17 00:04:54 +00:00
servo Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
startupcache Bug 1543970 - give up removing the startup cache file from the previous profile location after 6 years, r=froydnj 2019-04-12 14:07:40 +00:00
storage Bug 1545200 - Squelch spurious synchronous operation warnings in `Connection::operationSupported`. r=mak 2019-04-17 19:10:28 +00:00
taskcluster Bug 1546100 - Turn off e10s for mochitest-a11y/chrome in task configuration (Backs out effa55bd84bb and 2f12958d4e8c), r=jmaher 2019-04-22 18:52:24 +00:00
testing Bug 1536619 [wpt PR 15852] - service worker: Improve WPT tests for async respondWith/waitUntil., a=testonly 2019-04-23 15:05:50 +01:00
third_party Bug 1546070 - Update dav1d from upstream to f8cac8c. r=TD-Linux 2019-04-22 19:48:05 +00:00
toolkit Merge mozilla-central to mozilla-inbound. a=merge 2019-04-23 12:57:35 +03:00
tools Bug 1546100 - [tryselect] Fix tools/tryselect/test/test_fuzzy.py, r=jmaher 2019-04-22 18:38:58 +00:00
uriloader Bug 1544051 - Part 3 - Scripted change to remove references to AddTask.js r=ahal 2019-04-18 16:51:01 +00:00
view Bug 1543315 - part 4: Mark ResizeReflow() as MOZ_CAN_RUN_SCRIPT r=smaug 2019-04-13 12:39:47 +00:00
widget Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki 2019-04-21 20:13:34 +00:00
xpcom Bug 1544961 - comment on gtests that are disabled, disable ThreadUtils.IdleRunnableMethod and Timers.FindExpirationTime for windows10-aarch64 r=jmaher,gbrown,dmajor 2019-04-23 00:21:37 +00:00
xpfe/appshell Bug 1460811 - migrate XULStore to rkv r=bgrins,lina 2019-04-22 02:59:51 +00:00
.arcconfig
.clang-format Bug 1542146 - Use the new option StatementMacros from clang-format-8 r=andi 2019-04-05 21:41:57 +00:00
.clang-format-ignore Bug 1533481 - Part 9: Update Gecko to Unicode 12. r=jfkthame! 2019-04-04 12:46:18 +03:00
.cron.yml Bug 1538560 - disable cron job to run mochitest valgrind tasks because they permafail r=gbrown 2019-04-01 15:08:44 +00:00
.eslintignore Bug 1527075 - stop linting intl/l10n/ in m-c given it's linted in github r=Gijs,jaws 2019-04-15 16:43:02 +00:00
.eslintrc.js Bug 1544286 - xpcom/ manual ESLint no-throw-literal fixes. r=erahm 2019-04-16 15:02:10 +00:00
.flake8 Bug 1541086: Remove the embedding code and update the bug components for widget::headless. r=myk r=bdahl 2019-04-02 09:07:54 -07:00
.gdbinit
.gdbinit_python
.git-blame-ignore-revs No bug - Ignore bug 1016240 in blame/annotate. r=MattN 2019-04-04 14:56:20 -04:00
.gitignore Bug 1500987 - Elevate the new debugger one directory. r=jlast 2019-04-09 13:16:00 -04:00
.hg-annotate-ignore-revs No bug - Ignore bug 1016240 in blame/annotate. r=MattN 2019-04-04 14:56:20 -04:00
.hg-format-source
.hgignore Bug 1516337 - Part 1: Dedupe sha2 and related dependencies r=froydnj 2019-04-08 23:17:50 +03:00
.hgtags No bug - Tagging mozilla-central 9421b477d67cfc4c9e03350cd554a9e6acc7f435 with FIREFOX_NIGHTLY_67_END a=release DONTBUILD CLOSED TREE 2019-03-18 10:56:58 +00:00
.lldbinit
.mailmap
.taskcluster.yml Bug 1488313: [taskgraph] Don't notify sherrifs on cron decision task failures on try; r=dustin 2019-03-27 19:38:05 +00:00
.trackerignore
.yamllint
.ycm_extra_conf.py Bug 1522135 - Make .ycm_extra_conf.py work with python3. r=jgraham 2019-01-24 13:51:28 +01:00
AUTHORS
CLOBBER Bug 1533481 - Part 10: Updating ICU requires a clobber. r=jwalden! 2019-04-04 12:46:32 +03:00
Cargo.lock Bug 1546048 - Use std::ffi::CStr and the cstr crate instead of custom stuff in xpcom. r=lina 2019-04-22 05:09:23 +00:00
Cargo.toml Bug 1539406: Bump Cranelift to revision 542d799dd7a3b2cc; r=lth 2019-04-15 10:39:28 +00:00
GNUmakefile
LEGAL
LICENSE
Makefile.in Bug 1537574 - Use mozbuild's backend-out-of-date logic for RecursiveMake; r=firefox-build-system-reviewers,chmanchester 2019-04-10 22:14:27 +00:00
README.txt
aclocal.m4
build.gradle Bug 1543396 - Simplify GeckoView's api.txt file. r=esawin 2019-04-10 17:46:09 +00:00
client.mk
client.py
configure.in
configure.py Bug 1528241 - Add a trace mode to python configure that logs internal values. r=chmanchester 2019-02-20 07:46:22 +09:00
gradle.properties Bug 1527896 - Increase Gradle heaps to handle large assets. r=nalexander 2019-02-14 18:21:13 +00:00
gradlew
gradlew.bat Bug 1527796 - Part 3. Use gradlew.bat on Windows. r=nalexander 2019-02-26 11:06:12 +09:00
mach
moz.build
moz.configure Bug 1543323 - On Android, only build gtest tests archive on x86_64 builds; r=glandium 2019-04-12 00:17:45 +00:00
mozilla-config.h.in
old-configure.in Bug 1433685 - Remove nsGConfService, r=glandium 2019-04-10 10:18:14 +00:00
package-lock.json Bug 1536589 - Update ESLint and associated modules. r=mossop 2019-04-08 20:06:38 +00:00
package.json Bug 1536589 - Update ESLint and associated modules. r=mossop 2019-04-08 20:06:38 +00:00
settings.gradle Bug 1527796 - Part 5. Add python.exe path of mozilla-build to call mach command from gradle. r=nalexander 2019-03-29 18:11:09 +09:00
test.mozbuild

README.txt

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    https://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    https://developer.mozilla.org/en/docs/Creating_a_patch
    https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy.