New issue
Advanced search Search tips

Issue 706446 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Transient item should be ignored while access user agent type

Project Member Reported by liaoyuke@chromium.org, Mar 29 2017

Issue description

There are two problems with the current code:

1. When at a transient page, "Request Desktop Site" in the tools menu is visible and enabled.

2. When deciding which user agent type to use for pre-loading next item, the user agent of transient item is also taken into consideration, and because the user agent type of transient item is always MOBILE, this results in the following behavior:

Goto www.facebook.com -> Request Desktop Site -> Goto https://expired.badssl.com -> Goto www.amazon.com.

Now, instead of visiting the desktop version of www.amazon.com, it's visiting the mobile version.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 4 2017

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

commit 0c1d4036c5f4aafb0530816aafce288cc56a691b
Author: liaoyuke <liaoyuke@chromium.org>
Date: Tue Apr 04 21:57:47 2017

Set user agent type of transient item the same as pending item.

In current code, when deciding which user agent type to use for
pre-loading next item, the user agent of transient item is also taken
into  consideration, and because the user agent type of transient item
is always MOBILE, this results in the following behavior:

Goto www.facebook.com -> Request Desktop Site ->
Goto https://expired.badssl.com -> Goto www.amazon.com.

Now, instead of visiting the desktop version of www.amazon.com, it's
visiting the mobile version.

This CL fixes the issue by accurately set the user agent type of
transient item as the user agent type of corresponding pending item.

BUG= 706446 

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

[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/chrome/browser/ssl/ios_ssl_error_handler_unittest.mm
[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/web/interstitials/web_interstitial_impl.mm
[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/web/navigation/navigation_manager_impl.h
[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/web/navigation/navigation_manager_impl.mm
[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/web/navigation/navigation_manager_impl_unittest.mm
[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/0c1d4036c5f4aafb0530816aafce288cc56a691b/ios/web/public/test/web_test_with_web_state.mm

Status: Fixed (was: Started)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 5 2017

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

commit 2b3e817a6ccd91bc68501777d88659d429ca50cd
Author: liaoyuke <liaoyuke@chromium.org>
Date: Wed Apr 05 05:25:41 2017

Revert of Set user agent type of transient item the same as pending item. (patchset #9 id:280001 of https://codereview.chromium.org/2779263002/ )

Reason for revert:
Revert because this CL is breaking downstream tests.

Original issue's description:
> Set user agent type of transient item the same as pending item.
>
> In current code, when deciding which user agent type to use for
> pre-loading next item, the user agent of transient item is also taken
> into  consideration, and because the user agent type of transient item
> is always MOBILE, this results in the following behavior:
>
> Goto www.facebook.com -> Request Desktop Site ->
> Goto https://expired.badssl.com -> Goto www.amazon.com.
>
> Now, instead of visiting the desktop version of www.amazon.com, it's
> visiting the mobile version.
>
> This CL fixes the issue by accurately set the user agent type of
> transient item as the user agent type of corresponding pending item.
>
> BUG= 706446 
>
> Review-Url: https://codereview.chromium.org/2779263002
> Cr-Commit-Position: refs/heads/master@{#461856}
> Committed: https://chromium.googlesource.com/chromium/src/+/0c1d4036c5f4aafb0530816aafce288cc56a691b

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

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

[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/chrome/browser/ssl/ios_ssl_error_handler_unittest.mm
[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/web/interstitials/web_interstitial_impl.mm
[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/web/navigation/navigation_manager_impl.h
[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/web/navigation/navigation_manager_impl.mm
[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/web/navigation/navigation_manager_impl_unittest.mm
[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/web/public/test/web_test_with_web_state.h
[modify] https://crrev.com/2b3e817a6ccd91bc68501777d88659d429ca50cd/ios/web/public/test/web_test_with_web_state.mm

Comment 4 Deleted

Verified on Chrome canary version - 59.0.3067.0 Canary on iPad with iOS 10.3 , iPhone 6, 10.3
Transient item should be ignored while access user agent type


Sign in to add a comment