New issue
Advanced search Search tips

Issue 765752 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Layout tests ignore testRunner.notifyDone() and time out with both PlzNavigate and --site-per-process

Project Member Reported by lukasza@chromium.org, Sep 15 2017

Issue description

After r502251 (enabling of PlzNavigate on trunk) some layout tests started to fail on the Site Isolation Linux bot.

Example build with the failures: https://build.chromium.org/p/chromium.fyi/builders/Site%20Isolation%20Linux/builds/20859

Text diff:
* http/tests/loading/bad-server-subframe.html

Timeouts:
* http/tests/cookies/set-cookie-on-redirect.html
* http/tests/misc/selectionAsMarkup.html
* http/tests/security/cookies/third-party-cookie-blocking-main-frame.html
* http/tests/security/cookies/third-party-cookie-blocking-user-action.html
* http/tests/security/cookies/third-party-cookie-blocking.html
* http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags.html
* http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html
* http/tests/security/referrer-on-client-redirect.html
* http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
* http/tests/security/referrer-policy-conflicting-policies.html
* http/tests/security/referrer-policy-https-always.html
* http/tests/security/referrer-policy-https-default.html
* http/tests/security/referrer-policy-https-never.html
* http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
* http/tests/security/referrer-policy-https-no-referrer.html
* http/tests/security/referrer-policy-https-origin-when-crossorigin.html
* http/tests/security/referrer-policy-https-origin.html
* http/tests/security/referrer-policy-https-unsafe-url.html
* http/tests/security/referrer-policy-origin-when-crossorigin-is-crossorigin.html
* http/tests/security/xssAuditor/get-from-iframe.html
* http/tests/security/xssAuditor/post-from-iframe.html
* http/tests/security/xssAuditor/script-tag-post-control-char.html
* http/tests/security/xssAuditor/script-tag-post-null-char.html
* http/tests/security/xssAuditor/script-tag-post-redirect.html
* http/tests/security/xssAuditor/script-tag-post.html
* http/tests/security/xssAuditor/xss-filter-bypass-long-string.html
 
 
I've looked at the timeout in http/tests/security/cookies/third-party-cookie-blocking.html and it seems that testRunner.notifyDone() is ignored because TestRunner::NotifyDone sees that |will_navigate_| is true.
I've tried (as a smoke test) to delete the |!will_navigate_| part of the condition used by TestRunner::NotifyDone.  After doing this, all the 26 timing out tests started to pass.  This seems to indicate that all these 26 tests are impacted by the *same* issue.

TestRunner::NotifyDone is a test-only code, so right now it seems that the timeouts are a test-only-issue and do not indicate any sort of a real-world problem.
Summary: Layout tests ignore testRunner.notifyDone() and time out with both PlzNavigate and --site-per-process (was: Some layout tests fail when run with both PlzNavigate and --site-per-process)
Let's focus this bug only on the timeouts - I've opened a separate issue 765779 to tackle the text diff failure.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95a033cae7c9e807af8a43f63e59bd5456472796

commit 95a033cae7c9e807af8a43f63e59bd5456472796
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Fri Sep 15 20:46:30 2017

Disable tests that fail with *both* PlzNavigate and --site-per-process.

NOTRY=true

Bug: 765779
Bug:  765752 
Change-Id: Ic87167872a8d1ff24de902174bcca99bd6385194
Reviewed-on: https://chromium-review.googlesource.com/669499
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502358}
[modify] https://crrev.com/95a033cae7c9e807af8a43f63e59bd5456472796/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process

Comment 5 by clamy@chromium.org, Sep 18 2017

We added |will_navigate_| as a way to track that we were waiting for the browser process to complete a navigation for us. Otherwise the layout_tests would return too early and would fail. However, we've also changed the behavior of the provisional DocumentLoader since we made this chnage. In particular, we now create a dummy provisional DocumentLoader when we start a renderer-initiated navigation. IRC, the presence of a provisional DocumentLoader is taken into account when computing when to stop the layout test. I think we might be able to remove |will_navigate_| entirely and rely on the dummy provisional DocumentLoader.
Cc: blundell@chromium.org
Owner: lukasza@chromium.org
Status: Started (was: Untriaged)
CQ dry-run is green for a CL that stops inspecting |TestRunner::will_navigate_| - https://chromium-review.googlesource.com/c/chromium/src/+/669602/1.

Since this approach seems promising (trybot results + clamy@'s comment above), let me try to 1) complete removing |TestRunner::will_navigate_| (i.e. making this CL a revert of r412572) and 2) double-checking that linux_site_isolation bot is also happy.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9aeb4697f790c845beb9656c348f1b39137ae050

commit 9aeb4697f790c845beb9656c348f1b39137ae050
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Tue Sep 19 15:28:24 2017

Remove |TestRunner::will_navigate_| - no longer needed by PlzNavigate.

This CL reverts r412572 - |TestRunner::will_navigate_| is no longer
needed, because right now PlzNavigate creates a dummy provisional
DocumentLoader at the start of a renderer-initiated navigation - the
presence of a provisional DocumentLoader is taken into account when
computing when to stop the layout TestRunner.

Bug:  765752 
Change-Id: Ia50aabbba25937777c6c966ec8e056d4014bd971
Reviewed-on: https://chromium-review.googlesource.com/669602
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502855}
[modify] https://crrev.com/9aeb4697f790c845beb9656c348f1b39137ae050/content/shell/test_runner/test_runner.cc
[modify] https://crrev.com/9aeb4697f790c845beb9656c348f1b39137ae050/content/shell/test_runner/test_runner.h
[modify] https://crrev.com/9aeb4697f790c845beb9656c348f1b39137ae050/content/shell/test_runner/web_frame_test_client.cc
[modify] https://crrev.com/9aeb4697f790c845beb9656c348f1b39137ae050/content/shell/test_runner/web_frame_test_client.h
[modify] https://crrev.com/9aeb4697f790c845beb9656c348f1b39137ae050/content/shell/test_runner/web_frame_test_proxy.h
[modify] https://crrev.com/9aeb4697f790c845beb9656c348f1b39137ae050/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process

Status: Fixed (was: Started)
https://build.chromium.org/p/chromium.fyi/builders/Site%20Isolation%20Linux/builds/20953 includes the change from #c7 and is green.

Sign in to add a comment