Skip to content

Commit

Permalink
Revert "Enable the Network Service by default on ChromeOS."
Browse files Browse the repository at this point in the history
This reverts commit 7112246.

Reason for revert: Possibly caused crbug.com/921814

Original change's description:
> Enable the Network Service by default on ChromeOS.
> 
> This enables the network service by default, and disables it at the
> beginning of unit tests, since they don't currently work with the
> network service enabled.
> 
> This will be reverted after a few days, or earlier if it causes
> problems. We're only enabling it by default to make sure all test
> suites (in particular the hardware autotests) have a chance to run
> with it enabled, and to get bug reports from developers.
> 
> Bug: 920038
> Change-Id: Iff9a2ab08b82d4446e327b685be1bca8cf61917b
> Reviewed-on: https://chromium-review.googlesource.com/c/1399297
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#622606}

TBR=jam@chromium.org,rmcelrath@chromium.org

Change-Id: I0403f965966a8d658c94cfbc8856424179b0b0d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 920038
Reviewed-on: https://chromium-review.googlesource.com/c/1411072
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622740}
  • Loading branch information
robbiemc authored and Commit Bot committed Jan 15, 2019
1 parent e05fa0a commit 4dfaf6c
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 324 deletions.
1 change: 0 additions & 1 deletion components/test/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ include_rules = [
specific_include_rules = {
"components_test_suite\.cc": [
"+mojo/core/embedder",
"+services/network/public/cpp/features.h",
],
"ios_components_test_initializer\.cc": [
"+services/network/test",
Expand Down
8 changes: 0 additions & 8 deletions components/test/components_test_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
#include "base/path_service.h"
#include "base/stl_util.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_suite.h"
#include "build/build_config.h"
#include "build/buildflag.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "mojo/core/embedder/embedder.h"
#include "services/network/public/cpp/features.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/buildflags.h"
#include "ui/base/resource/resource_bundle.h"
Expand Down Expand Up @@ -60,11 +58,6 @@ class ComponentsTestSuite : public base::TestSuite {

mojo::core::Init();

// Disable the network service since a lot of unit tests don't work with it.
scoped_feature_list_ = std::make_unique<base::test::ScopedFeatureList>();
scoped_feature_list_->InitAndDisableFeature(
network::features::kNetworkService);

// Before registering any schemes, clear GURL's internal state.
url::Shutdown();

Expand Down Expand Up @@ -112,7 +105,6 @@ class ComponentsTestSuite : public base::TestSuite {
base::TestSuite::Shutdown();
}

std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_;
#if defined(OS_WIN)
base::win::ScopedCOMInitializer com_initializer_;
#endif
Expand Down
9 changes: 0 additions & 9 deletions content/public/test/content_test_suite_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <memory>

#include "base/compiler_specific.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_suite.h"
#include "build/build_config.h"
#include "content/browser/gpu/gpu_main_thread_factory.h"
Expand All @@ -19,7 +18,6 @@
#include "content/renderer/in_process_renderer_thread.h"
#include "content/utility/in_process_utility_thread.h"
#include "net/base/network_change_notifier.h"
#include "services/network/public/cpp/features.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/ui_base_paths.h"
Expand Down Expand Up @@ -76,20 +74,13 @@ ContentTestSuiteBase::ContentTestSuiteBase(int argc, char** argv)
: base::TestSuite(argc, argv) {
}

ContentTestSuiteBase::~ContentTestSuiteBase() = default;

void ContentTestSuiteBase::Initialize() {
base::TestSuite::Initialize();

testing::TestEventListeners& listeners =
testing::UnitTest::GetInstance()->listeners();
listeners.Append(new NetworkChangeNotifierDisabler());

// Disable the network service since a lot of unit tests don't work with it.
scoped_feature_list_ = std::make_unique<base::test::ScopedFeatureList>();
scoped_feature_list_->InitAndDisableFeature(
network::features::kNetworkService);

#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
gin::V8Initializer::LoadV8Snapshot(kSnapshotType);
gin::V8Initializer::LoadV8Natives();
Expand Down
9 changes: 0 additions & 9 deletions content/public/test/content_test_suite_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
#include "base/macros.h"
#include "base/test/test_suite.h"

namespace base {
namespace test {
class ScopedFeatureList;
}
} // namespace base

namespace content {
class ContentClient;

Expand All @@ -29,16 +23,13 @@ class ContentTestSuiteBase : public base::TestSuite {

protected:
ContentTestSuiteBase(int argc, char** argv);
~ContentTestSuiteBase() override;

void Initialize() override;

// Registers renderer/utility/gpu processes to run in-thread.
void RegisterInProcessThreads();

private:
std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_;

DISALLOW_COPY_AND_ASSIGN(ContentTestSuiteBase);
};

Expand Down
11 changes: 2 additions & 9 deletions services/network/public/cpp/features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@ const base::Feature kExpectCTReporting{"ExpectCTReporting",
const base::Feature kNetworkErrorLogging{"NetworkErrorLogging",
base::FEATURE_ENABLED_BY_DEFAULT};
// Enables the network service.
const base::Feature kNetworkService {
"NetworkService",
#if defined(OS_CHROMEOS)
base::FEATURE_ENABLED_BY_DEFAULT
};
#else
base::FEATURE_DISABLED_BY_DEFAULT
};
#endif
const base::Feature kNetworkService{"NetworkService",
base::FEATURE_DISABLED_BY_DEFAULT};

// Out of Blink CORS
const base::Feature kOutOfBlinkCors{"OutOfBlinkCors",
Expand Down
104 changes: 0 additions & 104 deletions testing/buildbot/chromium.chromiumos.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,17 +508,6 @@
},
"test": "browser_tests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_browser_tests",
"swarming": {
"can_use_on_swarming_builders": true,
"shards": 10
},
"test": "browser_tests"
},
{
"args": [
"--enable-features=SingleProcessMash",
Expand Down Expand Up @@ -611,16 +600,6 @@
},
"test": "components_browsertests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_components_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "components_browsertests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand All @@ -640,16 +619,6 @@
},
"test": "content_browsertests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_content_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "content_browsertests"
},
{
"args": [
"--enable-features=TracingPerfettoBackend",
Expand Down Expand Up @@ -762,16 +731,6 @@
},
"test": "extensions_browsertests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "extensions_browsertests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down Expand Up @@ -827,17 +786,6 @@
},
"test": "interactive_ui_tests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_interactive_ui_tests",
"swarming": {
"can_use_on_swarming_builders": true,
"shards": 3
},
"test": "interactive_ui_tests"
},
{
"args": [
"--enable-features=SingleProcessMash"
Expand Down Expand Up @@ -1254,17 +1202,6 @@
},
"test": "browser_tests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_browser_tests",
"swarming": {
"can_use_on_swarming_builders": true,
"shards": 10
},
"test": "browser_tests"
},
{
"args": [
"--enable-features=SingleProcessMash",
Expand Down Expand Up @@ -1357,16 +1294,6 @@
},
"test": "components_browsertests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_components_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "components_browsertests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand All @@ -1386,16 +1313,6 @@
},
"test": "content_browsertests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_content_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "content_browsertests"
},
{
"args": [
"--enable-features=TracingPerfettoBackend",
Expand Down Expand Up @@ -1508,16 +1425,6 @@
},
"test": "extensions_browsertests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_extensions_browsertests",
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "extensions_browsertests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
Expand Down Expand Up @@ -1573,17 +1480,6 @@
},
"test": "interactive_ui_tests"
},
{
"args": [
"--disable-features=NetworkService"
],
"name": "non_network_service_interactive_ui_tests",
"swarming": {
"can_use_on_swarming_builders": true,
"shards": 3
},
"test": "interactive_ui_tests"
},
{
"args": [
"--enable-features=SingleProcessMash"
Expand Down
Loading

0 comments on commit 4dfaf6c

Please sign in to comment.