Most tests are now custom layout tests or integration tests. We should make sure that all spec defined behaviour has WPT test coverage, and that Chromium can run them.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/289443f134cc33ac12645667e7aa9b303e7a96d9 commit 289443f134cc33ac12645667e7aa9b303e7a96d9 Author: Peter Beverloo <peter@chromium.org> Date: Wed Jul 18 03:04:11 2018 [Background Fetch] Support layout tests for the feature An implementation of BackgroundFetchDelegate has been provided to content shell which enables Background Fetches, without UI, to finish. It uses the Download Service through a new dependency. This dependency will be removed once the Download Service has been servicified, as //content can depend on it directly from that point forward. In context of the WPT tests, additional machinery has been added to enable communication with the Service Worker, required for it to tell the test about the result of the various Background Fetch events. The "fetch.https.window.js" file now verifies the behaviour and results of a single fetched file. Bug: 864561 Change-Id: If53e6755ae8ea924712f5bdace4df4f658bc53d7 Reviewed-on: https://chromium-review.googlesource.com/1135536 Commit-Queue: Peter Beverloo <peter@chromium.org> Reviewed-by: Xing Liu <xingliu@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#575919} [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/chrome/browser/background_fetch/background_fetch_delegate_impl.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/components/download/internal/background_service/in_memory_download.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/components/download/internal/background_service/in_memory_download.h [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/components/download/internal/background_service/in_memory_download_driver.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/components/download/internal/background_service/in_memory_download_driver_unittest.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/browser/background_fetch/background_fetch_data_manager_unittest.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/browser/background_fetch/background_fetch_delegate_proxy_unittest.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/browser/background_fetch/background_fetch_request_info.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/browser/background_fetch/background_fetch_request_info.h [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/browser/background_fetch/mock_background_fetch_delegate.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/browser/background_fetch/storage/mark_request_complete_task.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/public/browser/background_fetch_response.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/public/browser/background_fetch_response.h [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/shell/BUILD.gn [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/shell/DEPS [add] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/shell/browser/layout_test/layout_test_background_fetch_delegate.cc [add] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/shell/browser/layout_test/layout_test_background_fetch_delegate.h [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/shell/browser/layout_test/layout_test_browser_context.cc [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/content/shell/browser/layout_test/layout_test_browser_context.h [add] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/third_party/WebKit/LayoutTests/external/wpt/background-fetch/fetch.https.window.js [add] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/third_party/WebKit/LayoutTests/external/wpt/background-fetch/get-ids.https.js [add] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/third_party/WebKit/LayoutTests/external/wpt/background-fetch/resources/feature-name.txt [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/third_party/WebKit/LayoutTests/external/wpt/background-fetch/resources/sw.js [modify] https://crrev.com/289443f134cc33ac12645667e7aa9b303e7a96d9/third_party/WebKit/LayoutTests/external/wpt/background-fetch/resources/utils.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bef4d94c01e67a6a9c9083a201e7a5d74b338592 commit bef4d94c01e67a6a9c9083a201e7a5d74b338592 Author: Peter Beverloo <peter@chromium.org> Date: Tue Jul 31 11:44:35 2018 Migrate Background Fetch layout tests to WPT This CL migrates our Background Fetch layout tests to our WPT suite, and adds coverage in various new areas, together with a few minor bug fixes. Tests related to initializing the Service Worker events haven't been included as the event model has just been updated. New tests will be added based on that soon. One file which was removed without being migrated was "credentials-in-url.https.window.js". This was testing the Fetch API as opposed to Background Fetch. Instead, the requirement to propagate exceptions thrown by the Fetch API is tested in fetch.https.window.js. Bug: 864561 Change-Id: I077be6c5bf8c379e3108f4ec3207011582028477 Reviewed-on: https://chromium-review.googlesource.com/1155118 Commit-Queue: Peter Beverloo <peter@chromium.org> Reviewed-by: Rayan Kanso <rayankans@chromium.org> Cr-Commit-Position: refs/heads/master@{#579370} [modify] https://crrev.com/bef4d94c01e67a6a9c9083a201e7a5d74b338592/content/browser/background_fetch/background_fetch_context.cc [modify] https://crrev.com/bef4d94c01e67a6a9c9083a201e7a5d74b338592/content/browser/background_fetch/background_fetch_delegate_proxy.cc [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/credentials-in-url.https.window.js [modify] https://crrev.com/bef4d94c01e67a6a9c9083a201e7a5d74b338592/third_party/WebKit/LayoutTests/external/wpt/background-fetch/fetch.https.window.js [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/get-ids.https.js [add] https://crrev.com/bef4d94c01e67a6a9c9083a201e7a5d74b338592/third_party/WebKit/LayoutTests/external/wpt/background-fetch/get-ids.https.window.js [add] https://crrev.com/bef4d94c01e67a6a9c9083a201e7a5d74b338592/third_party/WebKit/LayoutTests/external/wpt/background-fetch/get.https.window.js [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces-worker.https-expected.txt [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https-expected.txt [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https.any-expected.txt [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https.any.worker-expected.txt [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https.worker-expected.txt [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-click-event.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-event.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-fail-event.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-fetch.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-get.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-getTags.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-registration-abort.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-update-event.https.html [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetch-click-event-worker.js [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetch-event-worker.js [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetch-fail-event-worker.js [delete] https://crrev.com/645f34ee1107a35a022c536c6b73581586f50a1b/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetch-update-event-worker.js [modify] https://crrev.com/bef4d94c01e67a6a9c9083a201e7a5d74b338592/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
Comment 1 by bugdroid1@chromium.org
, Jul 18