New issue
Advanced search Search tips

Issue 797793 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

When opening off scope PDF from WebAPK, CCT is launched

Project Member Reported by pkotw...@chromium.org, Dec 27 2017

Issue description

Repro steps:
1) In Chrome for Android, navigate to https://webapk-test.appspot.com/static/navigator.html
2) Tap "Add to Home screen" in the app menu
3) Tap the "ADD" button in the add-to-homescreen dialog
4) After a few seconds a notification should show with the message "Navigator WebAPK - Added to Home screen".
5) Launch "Navigator WebAPK" from the app list
6) Enter "rhodeshouse.ox.ac.uk/media/1002/sample-pdf-file.pdf" in the text field on the web page. This is easiest via chrome://inspect

Expected:
A CCT is not launched. Chrome downloads pDF
Actual
A CCT with no content is launched. Chrome downloads PDF
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 28 2018

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

commit 6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Wed Feb 28 04:06:31 2018

[Android Webapps]: Use minimal-UI CCT fallback more often

This CL fixes several bugs:
Bug #1: We currently launch a blank CCT when a user navigates from a page which
  is in the WebAPK's scope to a PDF which is outside of the WebAPK's scope.
 Bug #2 : We currently launch a CCT when a navigation occurs via JavaScript when
  the WebAPK is in the background. Launching the CCT causes the WebAPK to
  move back to the foreground (and is annoying to the user).

This CL:
 - Deletes WebappInterceptNavigationDelegate in favor to moving the logic to
   ExternalNavigationHandler. (This enables deleting the POST hack logic in
   WebappInterceptNavigationDelegate#shouldOpenInCustomTab()).
 - This CL changes the CCT to launch only as result of PageTransition#LINK

BUG= 797793 

Change-Id: I25cde15b588d9ce5dcac9d4cd107ee9af584465b
Reviewed-on: https://chromium-review.googlesource.com/844956
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Piotr Swigon <piotrs@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539700}
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/tab/InterceptNavigationDelegateImpl.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[add] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappCustomTabTimeSpentLogger.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
[delete] https://crrev.com/df8a43ce8e32a77d676a4a2c1326a51559819c06/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInterceptNavigationDelegate.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappScopePolicy.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/java_sources.gni
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
[modify] https://crrev.com/6f4d1915dbc5f2bb56e29e0a3a1dc13407c884f5/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java

Status: Fixed (was: Started)

Sign in to add a comment