ShelfAppBrowserTest.V1AppNavigation fails to load app |
||
Issue descriptionThe 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.
,
Sep 28
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.
,
Nov 8
<UI triage> Bug owners, please add the appropriate component to your bug. Thanks!
,
Nov 30
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, May 2 2018