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

Issue 838743 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Long OOO (go/where-is-mgiuca)
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ShelfAppBrowserTest.V1AppNavigation fails to load app

Project Member Reported by nasko@chromium.org, May 1 2018

Issue description

The ShelfAppBrowserTest.V1AppNavigation test is loading the Chrome Web Store in an app window and is later navigating the window to an arbitrary web URL.

The URL of the Chrome Web Store comes from various other layers in the system, so it is the real URL on the web. However, browser tests are not allowed to load documents from the real web and it is prevented by the host resolver used in tests - https://cs.chromium.org/chromium/src/chrome/test/base/in_process_browser_test_browsertest.cc?rcl=6af95cd58309ce678d8e1221c55b7cb90cfe2e48&l=72.

I have confirmed that the OpenApplication(params); line tries to load the CWS, but fails to do so:
[49876:49876:0430/180110.511573:ERROR:navigation_request.cc(1028)] NavigationRequest[0x365d9e0b8400]::OnRequestFailedInternal: url:https://chrome.google.com/webstore net_err:-11

The test needs to be updated to use a different app, which can be loaded from chrome/test/data. An example one could be the one in chrome/test/data/extensions/packaged_app/. To confirm that the navigation has actually succeeded, the code can wait using content::TestNavigationObserver and ensure that the last_navigation_succeeded() observer method returns true or that the WebContents::GetLastCommittedURL returns the expected app URL.

The test goes further to navigate to a web URL - GURL("http://www.foo.com/bar.html"). Instead of this hardcoded URL, it should use embedded_test_server()->GetURL("/some/file") and navigate to it, ensuring the server is started at the beginning of the test case. This will use the built-in test server to navigate and I would suggest wrapping the navigation call again with content::TestNavigationObserver to ensure the navigation was successfully committed.

Since this test is not testing what it is intended to, I will disable it until we have had a chance to fix it properly.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 2 2018

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

commit 180040b568bc14c87a0224f1173d09484ac0b870
Author: Nasko Oskov <nasko@chromium.org>
Date: Wed May 02 00:58:39 2018

Disable ShelfAppBrowserTest.V1AppNavigation.

This test currently isn't testing what it is aiming for, so disable it
until it can be updated correctly.

Bug: 838743
Change-Id: I5fbea2519627d9f7e3524832e2b99b866445eae3
Reviewed-on: https://chromium-review.googlesource.com/1038787
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555266}
[modify] https://crrev.com/180040b568bc14c87a0224f1173d09484ac0b870/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc

Triage nag: This Chrome OS bug has an owner but no component. Please add a component so that this can be tracked by the relevant team.
<UI triage> Bug owners, please add the appropriate component to your bug. Thanks!
Components: Tests>Fails

Sign in to add a comment