Commit 9350d9dc authored by John Abd-El-Malek's avatar John Abd-El-Malek

Run extensions_browsertests with network service along with the other network_service gtests.

There is one test failing which is because we don't handle external protocols with the network service.

Bug: 819248,706030
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I3ff98b61b2fa19fa3bfd54373cd920d4777f04c9
Reviewed-on: https://chromium-review.googlesource.com/951883
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541246}
parent 939c4419
...@@ -250,6 +250,7 @@ test("extensions_browsertests") { ...@@ -250,6 +250,7 @@ test("extensions_browsertests") {
] ]
data_deps = [ data_deps = [
"//testing/buildbot/filters:extensions_browsertests_filters",
"//third_party/mesa:osmesa", "//third_party/mesa:osmesa",
] ]
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "components/nacl/common/buildflags.h" #include "components/nacl/common/buildflags.h"
#include "content/public/browser/browser_main_runner.h" #include "content/public/browser/browser_main_runner.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "content/public/browser/site_instance.h" #include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
#include "content/shell/browser/shell_browser_context.h" #include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_devtools_manager_delegate.h" #include "content/shell/browser/shell_devtools_manager_delegate.h"
#include "extensions/browser/api/web_request/web_request_api.h"
#include "extensions/browser/extension_message_filter.h" #include "extensions/browser/extension_message_filter.h"
#include "extensions/browser/extension_navigation_throttle.h" #include "extensions/browser/extension_navigation_throttle.h"
#include "extensions/browser/extension_navigation_ui_data.h" #include "extensions/browser/extension_navigation_ui_data.h"
...@@ -262,6 +264,42 @@ ShellContentBrowserClient::GetNavigationUIData( ...@@ -262,6 +264,42 @@ ShellContentBrowserClient::GetNavigationUIData(
return std::make_unique<ShellNavigationUIData>(navigation_handle); return std::make_unique<ShellNavigationUIData>(navigation_handle);
} }
void ShellContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
content::RenderFrameHost* frame_host,
NonNetworkURLLoaderFactoryMap* factories) {
content::BrowserContext* browser_context =
frame_host->GetProcess()->GetBrowserContext();
factories->emplace(
extensions::kExtensionScheme,
extensions::CreateExtensionNavigationURLLoaderFactory(
frame_host,
extensions::ExtensionSystem::Get(browser_context)->info_map()));
}
void ShellContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
content::RenderFrameHost* frame_host,
const GURL& frame_url,
NonNetworkURLLoaderFactoryMap* factories) {
content::BrowserContext* browser_context =
frame_host->GetProcess()->GetBrowserContext();
auto factory = extensions::MaybeCreateExtensionSubresourceURLLoaderFactory(
frame_host, frame_url,
extensions::ExtensionSystem::Get(browser_context)->info_map());
if (factory)
factories->emplace(extensions::kExtensionScheme, std::move(factory));
}
bool ShellContentBrowserClient::WillCreateURLLoaderFactory(
content::RenderFrameHost* frame,
bool is_navigation,
network::mojom::URLLoaderFactoryRequest* factory_request) {
auto* web_request_api =
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
frame->GetProcess()->GetBrowserContext());
return web_request_api->MaybeProxyURLLoaderFactory(frame, is_navigation,
factory_request);
}
ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts( ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts(
const content::MainFunctionParams& parameters, const content::MainFunctionParams& parameters,
ShellBrowserMainDelegate* browser_main_delegate) { ShellBrowserMainDelegate* browser_main_delegate) {
......
...@@ -66,6 +66,17 @@ class ShellContentBrowserClient : public content::ContentBrowserClient { ...@@ -66,6 +66,17 @@ class ShellContentBrowserClient : public content::ContentBrowserClient {
content::NavigationHandle* navigation_handle) override; content::NavigationHandle* navigation_handle) override;
std::unique_ptr<content::NavigationUIData> GetNavigationUIData( std::unique_ptr<content::NavigationUIData> GetNavigationUIData(
content::NavigationHandle* navigation_handle) override; content::NavigationHandle* navigation_handle) override;
void RegisterNonNetworkNavigationURLLoaderFactories(
content::RenderFrameHost* frame_host,
NonNetworkURLLoaderFactoryMap* factories) override;
void RegisterNonNetworkSubresourceURLLoaderFactories(
content::RenderFrameHost* frame_host,
const GURL& frame_url,
NonNetworkURLLoaderFactoryMap* factories) override;
bool WillCreateURLLoaderFactory(
content::RenderFrameHost* frame_host,
bool is_navigation,
network::mojom::URLLoaderFactoryRequest* factory_request) override;
protected: protected:
// Subclasses may wish to provide their own ShellBrowserMainParts. // Subclasses may wish to provide their own ShellBrowserMainParts.
......
...@@ -4923,6 +4923,22 @@ ...@@ -4923,6 +4923,22 @@
}, },
"test": "extensions_browsertests" "test": "extensions_browsertests"
}, },
{
"args": [
"--enable-features=NetworkService",
"--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter"
],
"name": "network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true,
"dimension_sets": [
{
"os": "Ubuntu-16.04"
}
]
},
"test": "extensions_browsertests"
},
{ {
"args": [ "args": [
"--site-per-process" "--site-per-process"
...@@ -6217,6 +6233,17 @@ ...@@ -6217,6 +6233,17 @@
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "content_browsertests" "test": "content_browsertests"
},
{
"args": [
"--enable-features=NetworkService",
"--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter"
],
"name": "network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "extensions_browsertests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
......
...@@ -892,6 +892,17 @@ ...@@ -892,6 +892,17 @@
}, },
"test": "extensions_browsertests" "test": "extensions_browsertests"
}, },
{
"args": [
"--enable-features=NetworkService",
"--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter"
],
"name": "network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "extensions_browsertests"
},
{ {
"args": [ "args": [
"--site-per-process" "--site-per-process"
...@@ -1659,6 +1670,17 @@ ...@@ -1659,6 +1670,17 @@
}, },
"test": "extensions_browsertests" "test": "extensions_browsertests"
}, },
{
"args": [
"--enable-features=NetworkService",
"--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter"
],
"name": "network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "extensions_browsertests"
},
{ {
"args": [ "args": [
"--site-per-process" "--site-per-process"
...@@ -2266,6 +2288,17 @@ ...@@ -2266,6 +2288,17 @@
}, },
"test": "extensions_browsertests" "test": "extensions_browsertests"
}, },
{
"args": [
"--enable-features=NetworkService",
"--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter"
],
"name": "network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "extensions_browsertests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
......
...@@ -56,6 +56,14 @@ source_set("content_unittests_filters") { ...@@ -56,6 +56,14 @@ source_set("content_unittests_filters") {
] ]
} }
source_set("extensions_browsertests_filters") {
testonly = true
data = [
"//testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter",
]
}
source_set("interactive_ui_tests_filters") { source_set("interactive_ui_tests_filters") {
testonly = true testonly = true
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
-BackgroundXhrTest.TlsClientAuth -BackgroundXhrTest.TlsClientAuth
-BrowsingDataRemoverBrowserTest.CookieDeletion -BrowsingDataRemoverBrowserTest.CookieDeletion
-ChromeSecurityExploitBrowserTest.CreateFilesystemURLInExtensionOrigin -ChromeSecurityExploitBrowserTest.CreateFilesystemURLInExtensionOrigin
-ChromeSitePerProcessTest.LaunchExternalProtocolFromSubframe
-DevToolsSanityTest.TestRawHeadersWithRedirectAndHSTS -DevToolsSanityTest.TestRawHeadersWithRedirectAndHSTS
-DisabledSignInIsolationBrowserTest.SyntheticTrial -DisabledSignInIsolationBrowserTest.SyntheticTrial
-DomainReliabilityBrowserTest.Upload -DomainReliabilityBrowserTest.Upload
...@@ -82,13 +81,16 @@ ...@@ -82,13 +81,16 @@
-WebViewTests/WebViewTest.DownloadCookieIsolation/1 -WebViewTests/WebViewTest.DownloadCookieIsolation/1
-WebViewTests/WebViewTest.DownloadCookieIsolation_CrossSession/0 -WebViewTests/WebViewTest.DownloadCookieIsolation_CrossSession/0
-WebViewTests/WebViewTest.DownloadCookieIsolation_CrossSession/1 -WebViewTests/WebViewTest.DownloadCookieIsolation_CrossSession/1
-WebViewTests/WebViewTest.Shim_TestNavigationToExternalProtocol/0
-WebViewTests/WebViewTest.Shim_TestNavigationToExternalProtocol/1
-WebViewTests/WebViewTest.StoragePersistence/0 -WebViewTests/WebViewTest.StoragePersistence/0
-WebViewTests/WebViewTest.StoragePersistence/1 -WebViewTests/WebViewTest.StoragePersistence/1
-WebViewTests/WebViewTest.WebViewInBackgroundPage/0 -WebViewTests/WebViewTest.WebViewInBackgroundPage/0
-WebViewTests/WebViewTest.WebViewInBackgroundPage/1 -WebViewTests/WebViewTest.WebViewInBackgroundPage/1
# http://crbug.com/706030 handle external protocols
-ChromeSitePerProcessTest.LaunchExternalProtocolFromSubframe
-WebViewTests/WebViewTest.Shim_TestNavigationToExternalProtocol/0
-WebViewTests/WebViewTest.Shim_TestNavigationToExternalProtocol/1
# Need support for DoNotTrack: # Need support for DoNotTrack:
# https://crbug.com/808948 # https://crbug.com/808948
-DoNotTrackTest.Redirect -DoNotTrackTest.Redirect
......
# These tests currently fail when run with enablefeatures=NetworkService
# See https://crbug.com/819248
# http://crbug.com/706030
-WebViewAPITest.TestNavigationToExternalProtocol
...@@ -1142,6 +1142,12 @@ ...@@ -1142,6 +1142,12 @@
}, },
'test': 'browser_tests', 'test': 'browser_tests',
}, },
'network_service_components_browsertests': {
'args': [
'--enable-features=NetworkService',
],
'test': 'components_browsertests',
},
'network_service_content_browsertests': { 'network_service_content_browsertests': {
'args': [ 'args': [
'--enable-features=NetworkService', '--enable-features=NetworkService',
...@@ -1149,11 +1155,12 @@ ...@@ -1149,11 +1155,12 @@
], ],
'test': 'content_browsertests', 'test': 'content_browsertests',
}, },
'network_service_components_browsertests': { 'network_service_extensions_browsertests': {
'args': [ 'args': [
'--enable-features=NetworkService', '--enable-features=NetworkService',
], '--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_extensions_browsertests.filter',
'test': 'components_browsertests', ],
'test': 'extensions_browsertests',
}, },
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment