New issue
Advanced search Search tips

Issue 703727 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

"WebViewTests/WebViewTest.Shim_TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged/1" is flaky

Project Member Reported by chromium...@appspot.gserviceaccount.com, Mar 21 2017

Issue description

"WebViewTests/WebViewTest.Shim_TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged/1" is flaky.

This issue was created automatically by the chromium-try-flakes app. Please find the right owner to fix the respective test/step and assign this issue to them. If the step/test is infrastructure-related, please add Infra-Troopers label and change issue status to Untriaged. When done, please remove the issue from Sheriff Bug Queue by removing the Sheriff-Chromium label.

We have detected 4 recent flakes. List of all flakes can be found at https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9taXVtLXRyeS1mbGFrZXNyXwsSBUZsYWtlIlRXZWJWaWV3VGVzdHMvV2ViVmlld1Rlc3QuU2hpbV9UZXN0RXhlY3V0ZVNjcmlwdElzQWJvcnRlZFdoZW5XZWJWaWV3U291cmNlSXNDaGFuZ2VkLzEM.

Flaky tests should be disabled within 30 minutes unless culprit CL is found and reverted. Please see more details here: https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs/sheriffing-bug-queues#triaging-auto-filed-flakiness-bugs
 

Comment 1 by flackr@chromium.org, Mar 22 2017

Cc: lfg@chromium.org
Owner: fsam...@chromium.org
Status: Assigned (was: Untriaged)
Looks like Fady last updated this trying to address raciness: https://codereview.chromium.org/843953003.

Comment 2 by flackr@chromium.org, Mar 22 2017

CL to disable on Linux where the flakes have occurred has been created: https://codereview.chromium.org/2765303002/
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 22 2017

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

commit d7f01f3e65c7caa024702a34ad1ffb23d721a31c
Author: flackr <flackr@chromium.org>
Date: Wed Mar 22 19:02:22 2017

Disable Shim_TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged on linux.

Test is flaky on linux. See bug for details.

BUG=703727
TBR=fsamuel

Review-Url: https://codereview.chromium.org/2765303002
Cr-Commit-Position: refs/heads/master@{#458826}

[modify] https://crrev.com/d7f01f3e65c7caa024702a34ad1ffb23d721a31c/chrome/browser/apps/guest_view/web_view_browsertest.cc

Owner: wjmaclean@chromium.org

Comment 5 by flackr@chromium.org, Mar 22 2017

Labels: -Sheriff-Chromium
I'm running into this failure while fixing tests for  bug 594215  (data URL deprecation).

The test asserts "Attempting to inject script into about:blank. This is expected to fail" in step 4 in the JS code, but ProgrammaticScriptInjector::CanExecuteOnFrame() explicitly allows webviews to inject on about:blank. In both the failure and success runs, ProgrammaticScriptInjector::CanExecuteOnFrame() returns ACCESS_ALLOWED. Is that expected? Is the test assertion that about:blank injection should fail correct?
Cc: paulmeyer@chromium.org
 Issue 702918  has been merged into this issue.
Investigated some more.

- In successful runs, I see a loadcommit event happening, which creates a new script context for the newly navigated URL (data:text/html,trigger nav). This causes the script injection to fail expectedly, and the test runs successfully.

- In failed runs, there is no loadcommit event, and effective_document_url in ProgrammaticScriptInjector::CanExecuteOnFrame() is about:blank. This in turn allows the script to be injected (since webviews are allowed to inject to about:blank) and the test to fail.

I think what this test is trying to assert --that execute script should be aborted when webview source changes-- isn't fully correct. When the source changes, it becomes about:blank until the load commits, and the webview can inject into about:blank during that time. It should instead try the injection in the loadcommit event instead of loadstart, and change the "Attempting to inject script into about:blank" comment.

Sign in to add a comment