• Ken Rockot's avatar
    [Reland] Re-enable WebRequestApiTest.WebRequestClientsGoogleComProtection · f0b9230d
    Ken Rockot authored
    This is a reland of r548137 which now includes a whitelist to allow
    print preview WebUI to fetch cloud print device information directly
    from the network. See https://crbug.com/829218 for additional context.
    Original CL description follows.
    
    ==
    
    Re-enables this test with the Network Service enabled.
    
    
    This test did some things which the Network Service does not support and
    does not need to support, or which otherwise made testing with the
    Network Service more complex than necessary. The following changes have
    been made:
    
      * We no longer attempt to load a network resource from a WebUI
        renderer. This will not be supported with Network Service and is no
        longer desirable to have working in production anyway. There should
        no longer be any WebUI pages making network requests.
    
      * Use http instead of https for the clients1.google.com requests. This
        allows such requests to be handled by the EmbeddedTestServer which
        already exists in BrowserTestBase, which is itself not configured to
        handle HTTPS requests. Since these requests are filtered by
        hostname, the scheme doesn't matter.
    
      * Switch the test to use a SimpleURLLoader instead of a
        FakeURLFetcher. This allows the test code to exercise the same
        behavior with or without the Network Service enabled.
    
    TBR=karandeepb@chromium.org
    
    Bug: 721414
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
    Change-Id: I57bf66dfd7e7e0726ac98c9571f7fa031243e328
    Reviewed-on: https://chromium-review.googlesource.com/998449Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
    Commit-Queue: Ken Rockot <rockot@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548673}
    f0b9230d
web_request_permissions.cc 11.9 KB