Several service worker layout tests fail with Mojo changes |
|||
Issue descriptionThe failing tests are: external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html http/tests/serviceworker/navigation_preload/navigation-preload-resource-timing.html virtual/outofblink-cors-ns/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html virtual/outofblink-cors/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html virtual/service-worker-servicification/external/wpt/service-workers/service-worker/navigation-preload/resource-timing.https.html See blocked bug for details and motivation regarding what's changing in Mojo. Likely the failures are caused by incorrect task ordering assumptions.
,
Aug 8
Cool thanks. I'll try to look this week. Looks like the failure is: FAIL Navigation Preload Resource Timing. assert_equals: performance.getEntriesByName() must returns one PerformanceResourceTiming entry for the navigation preload. expected 1 but got 0
,
Aug 10
I investigated this a bit. It seems that SWContextClient::RespondToFetchEvent() is called before SWContextClient::OnNavigationPreloadComplete when we apply the patch mentioned in Comment 1. w/o patch: SWContextClient::OnNavigationPreloadResponse -> SWContextClient::OnNavigationPreloadComplete -> SWContextClient::RespondToFetchEvent w/ patch: SWContextClient::OnNavigationPreloadResponse -> SWContextClient::RespondToFetchEvent -> SWContextClient::OnNavigationPreloadComplete Attaching trace files and screenshots.
,
Aug 10
Interesting. In theory we should be able to handle both patterns. OnNavigationPreloadResponse is called when the headers arrive at the browser, OnNavigationPreloadComplete is when the body finished, and RespondToFetchEvent is called when the promise passed to respondWith() resolves (if it's event.preloadResponse, then it's when the headers arrive). But maybe there is brittleness here.
,
Aug 10
Thanks for the info! I think I have a fix for the test. https://chromium-review.googlesource.com/c/chromium/src/+/1170679
,
Aug 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/028965323141e0562a1066ab892c150334ee0db0 commit 028965323141e0562a1066ab892c150334ee0db0 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Thu Aug 16 01:24:01 2018 service worker: Fix navigation-preload/resource-timing.https.html test Before this CL, this test tried to get performance entries right after Response#text() is resolved, but Chrome doesn't guarantee that there will be a performance entry for the response at that point. This CL changes the test to use PerformanceObserver so that we can make sure that there will be a performance entry for the response. Bug: 872078 Change-Id: I6ecfcb8e0721df541d5a32f56ec4c062efbffdae Reviewed-on: https://chromium-review.googlesource.com/1170679 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#583483} [modify] https://crrev.com/028965323141e0562a1066ab892c150334ee0db0/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/navigation-preload/resources/resource-timing-worker.js
,
Aug 17
I think the test was fixed. Let me know if you still see failures. |
|||
►
Sign in to add a comment |
|||
Comment 1 by roc...@chromium.org
, Aug 8Labels: -Pri-3 Pri-1