Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 2964183002: Fixes stuck navigation when opening PWA in-scope page in CCT. (Closed)

Created:
3 years, 5 months ago by piotrs
Modified:
3 years, 5 months ago
Reviewers:
dominickn, Yusuf
CC:
chromium-reviews, dominickn+watch_chromium.org, lizeb+watch-custom-tabs_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes stuck navigation when opening PWA in-scope page in CCT. The issues was happening because CustomTabActivity was requesting to load the URL on the WebContents it received. URL loading was already happening at this point, as navigation was initiated in the renderer earlier. It worked for URLs with different origin, as re-requesting the URL load was causing creating new RenderFrame in a new Renderer process. For the URL with the same origin however the new request somehow clashed with the previous request in a way I cannot fully explain and navigation never finished. The fix is to ask the WebContents to resume loading instead of re-requesting it. This is also what happens in a ChromeTabbedActivity on clicking _blank links and is much faster than what I did in previous patch. BUG=736995 Review-Url: https://codereview.chromium.org/2964183002 Cr-Commit-Position: refs/heads/master@{#484407} Committed: https://chromium.googlesource.com/chromium/src/+/7bf1a0ba5782af6e950604667ecf1882b189c858

Patch Set 1 #

Total comments: 2

Patch Set 2 : Field rename for clarity in WebappNavigationTest #

Total comments: 2

Patch Set 3 : Merge #

Patch Set 4 : Using "isLoading" instead of a new variable #

Patch Set 5 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -5 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java View 1 4 chunks +20 lines, -4 lines 0 comments Download

Messages

Total messages: 26 (18 generated)
piotrs
Hey folks, can you take a look? Yusuf as the owner of CustomTabActivity and Dominick ...
3 years, 5 months ago (2017-06-30 03:38:05 UTC) #5
dominickn
test lgtm % nit https://codereview.chromium.org/2964183002/diff/1/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java (right): https://codereview.chromium.org/2964183002/diff/1/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java#newcode42 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java:42: private static final String OTHER_PAGE_PATH ...
3 years, 5 months ago (2017-06-30 03:49:30 UTC) #8
piotrs
Thanks Dom! https://codereview.chromium.org/2964183002/diff/1/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java (right): https://codereview.chromium.org/2964183002/diff/1/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java#newcode42 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java:42: private static final String OTHER_PAGE_PATH = Good ...
3 years, 5 months ago (2017-06-30 04:09:53 UTC) #9
Yusuf
https://codereview.chromium.org/2964183002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java File chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java (right): https://codereview.chromium.org/2964183002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java#newcode616 chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java:616: mReceivedLoadingWebContents = true; webcontents.isLoading not working here?
3 years, 5 months ago (2017-06-30 17:49:13 UTC) #10
piotrs
Thanks Yusuf https://codereview.chromium.org/2964183002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java File chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java (right): https://codereview.chromium.org/2964183002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java#newcode616 chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java:616: mReceivedLoadingWebContents = true; Works, done.
3 years, 5 months ago (2017-07-03 03:56:04 UTC) #15
Yusuf
lgtm
3 years, 5 months ago (2017-07-05 19:22:01 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2964183002/80001
3 years, 5 months ago (2017-07-06 00:16:00 UTC) #23
commit-bot: I haz the power
3 years, 5 months ago (2017-07-06 00:22:31 UTC) #26
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/7bf1a0ba5782af6e950604667ecf...

Powered by Google App Engine
This is Rietveld 408576698