New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 673806 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-Servicification


Sign in to add a comment

Fix Android specific failures with PlzNavigate

Project Member Reported by jam@chromium.org, Dec 13 2016

Issue description

Parent bug to fix all the Android specific failures with PlzNavigate enabled. See this try run from yesterday for a list of failing tests:
https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/197236

For many areas, fixing one issue fixes a lot of tests at the same time. See the top of https://docs.google.com/document/d/14qFLwALk78M8crevB_vHsjFX5cwBl0oLbGrztGIRVaM/edit for sample fixes.
 

Comment 1 by jam@chromium.org, Dec 14 2016

btw I'm looking at the failures in the unit_tests target. most of these are the same issue.

Comment 2 by jam@chromium.org, Dec 14 2016

Blockedon: 645983

Comment 3 by jam@chromium.org, Dec 14 2016

Blockedon: 674303

Comment 4 by jam@chromium.org, Dec 14 2016

Blockedon: 674304
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 15 2016

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

commit 0265e75fa260668610c0b708b91aff6dfcdbfc00
Author: jam <jam@chromium.org>
Date: Thu Dec 15 17:17:43 2016

Fix Android unit_tests failures with PlzNavigate.

The test failures all are because on Android ChromeContentBrowserClient::CreateThrottlesForNavigation returns a throttle that defers a request. The test harness assumed they're always synchronous. Fix by waiting on the callback to be run asynchronously.

The other minor fix is to Android specific NetErrorTabHelperTest tests. The RenderFrameHost test harness fakes navigations but doesn't handle multiple loads per RenderFrameHost very well (specifically, if a pending or speculative RFH is used). Fixing this would necessitate moving a bunch of methods from RenderFrameHostTester to WebContentsTester and updating all the tests. Additionally, the specific test harness code in NetErrorTabHelperTest has issues in that it doesn't use the pending/speculative RFH. The easiest solution here is to split the one unit test into three.

This fixes the 225 failing unit_tests on Android.

BUG= 673806 

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

[modify] https://crrev.com/0265e75fa260668610c0b708b91aff6dfcdbfc00/chrome/browser/net/net_error_tab_helper_unittest.cc
[modify] https://crrev.com/0265e75fa260668610c0b708b91aff6dfcdbfc00/content/browser/frame_host/navigation_request.cc
[modify] https://crrev.com/0265e75fa260668610c0b708b91aff6dfcdbfc00/content/browser/frame_host/navigation_request.h
[modify] https://crrev.com/0265e75fa260668610c0b708b91aff6dfcdbfc00/content/test/test_render_frame_host.cc

Blockedon: 676139
Blockedon: 681029
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 6 2017

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

commit 4ff77a6cf88f3a5d793eabb02bd62d61f8dd4b1f
Author: jam <jam@chromium.org>
Date: Mon Mar 06 17:46:56 2017

Fix bug with data:urls and PlzNavigate on Android.

data urls always go to the browser on Android so that the application has a chance to handle them (see rr143228). With PlzNavigate, this has already happened for navigation requests so there's no need to send them again to the browser (and it triggers unhandled codepaths if that happens).

This fixes:
org.chromium.content.browser.InterstitialPageTest#testCloseInterstitial
InterstitialPageImplTest.Paste
InterstitialPageImplTest.Cut
DevToolsProtocolTest.InterstitialShownOnAttach
InterstitialPageImplTest.SelectAll
DevToolsProtocolTest.ShowCertificateViewer
InterstitialPageImplTest.Copy
SitePerProcessBrowserTest.NavigateOpenerWithInterstitial
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingBackToSafetyShowsNetworkErrorForMaliciousSubresource with {--webview-sandboxed-renderer}
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingBackToSafetyShowsNetworkErrorForMaliciousSubresource
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingMaliciousSubresourceShowsInterstitial
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingBackToSafetyShowsNetworkError with {--webview-sandboxed-renderer}
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingShowsInterstitialForMalware with {--webview-sandboxed-renderer}
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingCanProceedThroughInterstitial
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingShowsInterstitialForMalware
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingMaliciousSubresourceShowsInterstitial with {--webview-sandboxed-renderer}
org.chromium.android_webview.test.SafeBrowsingTest#testSafeBrowsingBackToSafetyShowsNetworkError
org.chromium.android_webview.test.LoadDataWithBaseUrlTest#testloadDataWithBaseUrlCallsOnPageStarted
org.chromium.android_webview.test.AwContentsClientShouldInterceptRequestTest#testNotCalledForExistingContentUrl with {--webview-sandboxed-renderer}

BUG= 673806 

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

[modify] https://crrev.com/4ff77a6cf88f3a5d793eabb02bd62d61f8dd4b1f/content/child/web_url_loader_impl.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 7 2017

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

commit 7e8bbb8e437db0b5cb65a6a84f1f3b0b67ca3a3e
Author: jam <jam@chromium.org>
Date: Tue Mar 07 00:47:24 2017

Fix DevToolsProtocolTest.DoubleCrash with PlzNavigate on Android.

This also fixes the test on Windows with and without PlzNavigate.

BUG= 673806 

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

[modify] https://crrev.com/7e8bbb8e437db0b5cb65a6a84f1f3b0b67ca3a3e/content/browser/devtools/protocol/devtools_protocol_browsertest.cc

Comment 10 by jam@chromium.org, Mar 20 2017

Blockedon: 699394
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 20 2017

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

commit 18bf53b4ccb6351759ca4a0bdc30a814aeb61137
Author: jam <jam@chromium.org>
Date: Mon Mar 20 22:55:16 2017

Fix race condition in content_shell which could lead to an assert on shutdown with PlzNavigate.

The problem is that URLRequestContext's destructor checks that there are no more outstanding requests, while ResourceContext's destructor is what removes outstanding requests. In Chrome's profile implementation, the order is correct, but content_shell had a bug. This only mattered with PlzNavigate because renderer requests are deleted earlier through other codepaths.

This should fix the flakiness seen on the Marshmallow 64 bit Tester with PlzNavigate.

BUG= 673806 

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

[modify] https://crrev.com/18bf53b4ccb6351759ca4a0bdc30a814aeb61137/content/shell/browser/shell_browser_context.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 21 2017

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

commit 6a787e3a33d497008aab7661b3adab4fc4feed7b
Author: horo <horo@chromium.org>
Date: Tue Mar 21 04:01:52 2017

Revert of Fix race condition in content_shell which could lead to an assert on shutdown with PlzNavigate. (patchset #1 id:1 of https://codereview.chromium.org/2764613002/ )

Reason for revert:
Introduced ServiceWorkerNavigationPreloadTest.NetworkError crashes on Debug build.

BUG= 703439 

Original issue's description:
> Fix race condition in content_shell which could lead to an assert on shutdown with PlzNavigate.
>
> The problem is that URLRequestContext's destructor checks that there are no more outstanding requests, while ResourceContext's destructor is what removes outstanding requests. In Chrome's profile implementation, the order is correct, but content_shell had a bug. This only mattered with PlzNavigate because renderer requests are deleted earlier through other codepaths.
>
> This should fix the flakiness seen on the Marshmallow 64 bit Tester with PlzNavigate.
>
> BUG= 673806 
>
> Review-Url: https://codereview.chromium.org/2764613002
> Cr-Commit-Position: refs/heads/master@{#458216}
> Committed: https://chromium.googlesource.com/chromium/src/+/18bf53b4ccb6351759ca4a0bdc30a814aeb61137

TBR=avi@chromium.org,jam@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 673806 

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

[modify] https://crrev.com/6a787e3a33d497008aab7661b3adab4fc4feed7b/content/shell/browser/shell_browser_context.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 21 2017

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

commit 21e62ae7504024888b56ae4e42d810d94812e0ae
Author: jam <jam@chromium.org>
Date: Tue Mar 21 19:57:48 2017

Fix race condition in content_shell which could lead to an assert on shutdown with PlzNavigate.

The problem is that URLRequestContext's destructor checks that there are no more outstanding requests, while ResourceContext's destructor is what removes outstanding requests. In Chrome's profile implementation, the order is correct, but content_shell had a bug. This only mattered with PlzNavigate because renderer requests are deleted earlier through other codepaths.

This should fix the flakiness seen on the Marshmallow 64 bit Tester with PlzNavigate.

BUG= 673806 

Review-Url: https://codereview.chromium.org/2764613002
Cr-Original-Commit-Position: refs/heads/master@{#458216}
Committed: https://chromium.googlesource.com/chromium/src/+/18bf53b4ccb6351759ca4a0bdc30a814aeb61137
Review-Url: https://codereview.chromium.org/2764613002
Cr-Commit-Position: refs/heads/master@{#458523}

[modify] https://crrev.com/21e62ae7504024888b56ae4e42d810d94812e0ae/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/21e62ae7504024888b56ae4e42d810d94812e0ae/content/shell/browser/shell_browser_context.cc

Comment 14 by jam@chromium.org, Mar 24 2017

Status: Fixed (was: Untriaged)
Components: Internals>Network>Service
Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.

Sign in to add a comment