Commit c395966e authored by Bret Sepulveda's avatar Bret Sepulveda Committed by Commit Bot

Revert "Move url_loader_unittest.cc and network_service_unittest.cc to services/network."

This reverts commit e1c22cc3.

Reason for revert:
Compile failure on Windows https://ci.chromium.org/buildbot/chromium/Win%20x64/18699

Original change's description:
> Move url_loader_unittest.cc and network_service_unittest.cc to services/network.
> 
> Their content dependencies have been removed in previous changes.
> 
> Bug: 753658
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
> Change-Id: Ic632759ef35cfef4e707d29acdc361ae836e9b62
> Reviewed-on: https://chromium-review.googlesource.com/893651
> Commit-Queue: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Ken Rockot <rockot@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#533113}

TBR=jam@chromium.org,rockot@chromium.org,tsepez@chromium.org

Change-Id: Id179d007751f72c0813162ed0995232b033e74a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 753658
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/894710Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533140}
parent ffe3c1da
......@@ -23,6 +23,9 @@ jumbo_source_set("network_sources") {
visibility = [
":network",
"//content", # For the component build.
"//content/app:*",
"//content/utility:utility",
"//services/network/public/cpp/*",
# For use by StoragePartition.
# TODO(mmenke): Remove when network service ships.
......@@ -44,8 +47,11 @@ jumbo_source_set("network_sources") {
"//base",
"//content:export",
"//content/common",
"//content/common:mojo_bindings",
"//content/public/common:common_sources",
"//net",
"//services/network:network_service",
"//services/network/public/cpp",
"//services/proxy_resolver/public/interfaces",
]
}
......@@ -7,6 +7,14 @@ include_rules = [
"+content/public/common/request_context_type.h",
"+content/public/common/resource_type.h",
"+content/public/common/service_worker_modes.h",
"+content/public/network",
"+services/network",
"+services/service_manager/public",
]
specific_include_rules = {
'.*_[a-z]*test.*': [
"+content/public/common/content_paths.h",
"+content/public/common/service_names.mojom.h",
],
}
......@@ -1523,7 +1523,9 @@ test("content_unittests") {
# TODO(jam): move these network/ tests to services/network.
"../network/cors/cors_url_loader_unittest.cc",
"../network/network_service_unittest.cc",
"../network/resource_scheduler_unittest.cc",
"../network/url_loader_unittest.cc",
"../public/common/drop_data_unittest.cc",
"../public/common/network_connection_tracker_unittest.cc",
"../public/common/simple_url_loader_unittest.cc",
......@@ -2045,7 +2047,10 @@ test("content_unittests") {
service_manifest("content_unittests_manifest") {
name = "content_unittests"
source = "unittests_manifest.json"
packaged_services = [ "//services/file:manifest" ]
packaged_services = [
"//services/file:manifest",
"//services/network:manifest",
]
}
catalog("content_unittests_catalog") {
......
......@@ -9,7 +9,8 @@
]
},
"requires": {
"file": [ "file:filesystem", "file:leveldb" ]
"file": [ "file:filesystem", "file:leveldb" ],
"network": [ "network_service" ]
}
}
}
......
......@@ -32,6 +32,7 @@ jumbo_source_set("utility") {
"//base",
"//content:export",
"//content/child",
"//content/network:network_sources",
"//content/public/child:child_sources",
"//content/public/common:common_sources",
"//media:media_features",
......
......@@ -65,9 +65,6 @@ service_test("services_unittests") {
"//services/data_decoder/public/cpp/android:safe_json_java",
"//services/device:java",
# Some tests make network requests.
"//net/android:net_java",
# Some tests need to initialize V8.
"//v8:v8_external_startup_data_assets",
]
......@@ -94,10 +91,7 @@ catalog("services_unittests_catalog") {
# The division between "all platforms" and "!iOS" here needs to match that
# for the main deps list in the services_unittests target above.
catalog_deps = [
"//services/identity:tests_catalog",
"//services/network:tests_catalog",
]
catalog_deps = [ "//services/identity:tests_catalog" ]
if (!is_ios) {
catalog_deps += [
......
......@@ -3,10 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
import("//services/catalog/public/tools/catalog.gni")
import("//services/service_manager/public/cpp/service.gni")
import("//services/service_manager/public/service_manifest.gni")
import("//services/service_manager/public/tools/test/service_test.gni")
static_library("network_service") {
sources = [
......@@ -109,13 +106,7 @@ source_set("tests") {
]
if (!is_ios) {
sources += [
# TODO(sdefresne): get these working on iOS. They currently hang.
# http://crbug.com/803149
"network_service_unittest.cc",
"proxy_resolver_factory_mojo_unittest.cc",
"url_loader_unittest.cc",
]
sources += [ "proxy_resolver_factory_mojo_unittest.cc" ]
}
deps = [
......@@ -129,8 +120,6 @@ source_set("tests") {
"//net:test_support",
"//services/network/public/cpp",
"//services/network/public/interfaces",
"//services/service_manager/public/cpp",
"//services/service_manager/public/cpp:service_test_support",
"//testing/gtest",
]
}
......@@ -162,14 +151,3 @@ service_manifest("manifest") {
name = "network"
source = "manifest.json"
}
service_manifest("unittest_manifest") {
name = "network_unittests"
source = "test/service_unittest_manifest.json"
packaged_services = [ ":manifest" ]
}
catalog("tests_catalog") {
testonly = true
embedded_services = [ ":unittest_manifest" ]
}
per-file service_unittest_manifest.json=set noparent
per-file service_unittest_manifest.json=file://ipc/SECURITY_OWNERS
{
"name": "network_unittests",
"display_name": "Network Unittests",
"interface_provider_specs": {
"service_manager:connector": {
"provides": {
"service_manager:service_factory": [
"service_manager::mojom::ServiceFactory"
]
},
"requires": {
"network": [ "network_service" ]
}
}
}
}
......@@ -22,10 +22,6 @@ source_set("run_all_service_tests") {
"//ui/base",
]
data = [
"data/",
]
data_deps = [
"//ui/resources:ui_test_pak_data",
]
......
<html>
<head><title>Content Sniffer Test 0</title></head>
<body>We should sniff this content as HTML.</body>
</html>
<html>
<head><title>Content Sniffer Test 1</title></head>
<body>We should not sniff this content as HTML.</body>
</html>
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
<html>
<head><title>Content Sniffer Test 2</title></head>
<body>We should not sniff this as HTML as server says its a GIF.</body>
</html>
<!doctype html>
<p>hello</p>
HTTP/1.1 200 OK
content-type: text/html
\ No newline at end of file
<html>
<head><title>nosniff Test</title></head>
<body>We should NOT sniff this content as HTML.</body>
</html>
HTTP/1.1 200 OK
Content-Length: 111
X-Content-Type-Options: nosniff
<html>
<head><title>OK</title></head>
<body>
Basic html test.
</body>
</html>
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