New issue
Advanced search Search tips

Issue 892791 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Incorrect error page is shown for chrome://bookmarks

Project Member Reported by eugene...@chromium.org, Oct 5

Issue description

App Version (from "Chrome Settings > About Chrome"): M69
iOS Version: All
Device: All

Steps to reproduce: 
1.) Load chrome:bookmarks

Observed behavior: 
WebUI error page is rendered

Expected behavior: 
ERR_INVALID_URL error page should be rendered

Additional comments: 
Currently WebState assumes that all chrome:// URLs are either NativeContent or WebUI. We want to stop using NativeContent for NTP and Reading Lists's Offline Page, so loading invalid chrome:// url should fail with ERR_INVALID_URL error code.
 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 8

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

commit 96e39da37d1fcd6cfa479c64d838d971011d773d
Author: Eugene But <eugenebut@google.com>
Date: Mon Oct 08 21:31:01 2018

Improve CFNetwork error translation.

CFNetwork uses kCFURLErrorUnsupportedURL error code
if URL scheme is not supported. For chrome this should be
interpreted as net::ERR_INVALID_URL if URL is app specific
or as net::ERR_UNKNOWN_URL_SCHEME otherwise.

Bug:  892791 

Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I51a41b5adc00d5386b4c6a702ebbafe6e130abfd
Reviewed-on: https://chromium-review.googlesource.com/c/1262717
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597685}
[modify] https://crrev.com/96e39da37d1fcd6cfa479c64d838d971011d773d/ios/web/download/download_task_impl.mm
[modify] https://crrev.com/96e39da37d1fcd6cfa479c64d838d971011d773d/ios/web/web_state/BUILD.gn
[modify] https://crrev.com/96e39da37d1fcd6cfa479c64d838d971011d773d/ios/web/web_state/error_translation_util.h
[modify] https://crrev.com/96e39da37d1fcd6cfa479c64d838d971011d773d/ios/web/web_state/error_translation_util.mm
[modify] https://crrev.com/96e39da37d1fcd6cfa479c64d838d971011d773d/ios/web/web_state/error_translation_util_unittest.mm

Labels: -Type-Task Type-Bug
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 23

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

commit d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95
Author: Eugene But <eugenebut@google.com>
Date: Tue Oct 23 15:06:44 2018

Fail the navigation to chrome: URLs which are not WebUI or NativeContent

Previously all chrome: URLs were either NativeContent or WebUI (if
there was no NativeContent for url in question). This CL allows chrome:
URLs, which are neither NativeContent nor WebUI.

The change should allow supporting NTP pages without using Native Content.
In addition to that Chrome for iOS will have consistent behavior with
other platforms, which allow chrome: URLs that are not WebUI.

Notable changes:
1.) shouldAllowLoadWithNavigationAction was cleaned up from side effects.
The method was renamed to shouldAllowAppSpecificURLNavigationAction and
side effects were moved to calling method.

2.) shouldLoadURLInNativeView returns NO, if there is no NativeContent
for the given URL.

Bug:  892791 ,  895689 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Ia2ef25ee4d10168c6435b798478908e37c657032
Reviewed-on: https://chromium-review.googlesource.com/c/1255611
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601951}
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/chrome/browser/ui/webui/web_ui_egtest.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/navigation/error_retry_state_machine.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/public/test/fakes/test_web_client.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/test/test_url_constants.cc
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/test/test_url_constants.h
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/web_state/web_state_observer_inttest.mm
[modify] https://crrev.com/d19ddb64b69ecf94a8b7cd6e0b43c5ebbbfdac95/ios/web/webui/web_ui_mojo_inttest.mm

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified in:

App Version: 72.0.3595.0 canary
Devices: iPad Air, iPhone 8 Plus, iPhone 7
iOS Versions: 11.4.1, 12.0.1

Shows appropriate error page i.e.'ERR_INVALID_URL', navigating to chrome://bookmarks
With reference to comment#5, uploading the screenshot.
chromebookmarks_ERR.PNG
182 KB View Download

Sign in to add a comment