Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: components/test/run_all_unittests.cc

Issue 1301563003: Revert of Allow url::SchemeHostPort to hold non-file scheme without port (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/metrics/statistics_recorder.h" 8 #include "base/metrics/statistics_recorder.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/test/launcher/unit_test_launcher.h" 10 #include "base/test/launcher/unit_test_launcher.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 base::FilePath ui_test_pak_path; 71 base::FilePath ui_test_pak_path;
72 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 72 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
73 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); 73 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
74 74
75 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( 75 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
76 pak_path.AppendASCII("components_tests_resources.pak"), 76 pak_path.AppendASCII("components_tests_resources.pak"),
77 ui::SCALE_FACTOR_NONE); 77 ui::SCALE_FACTOR_NONE);
78 78
79 // These schemes need to be added globally to pass tests of 79 // These schemes need to be added globally to pass tests of
80 // autocomplete_input_unittest.cc and content_settings_pattern* 80 // autocomplete_input_unittest.cc and content_settings_pattern*
81 url::AddStandardScheme("chrome", url::SCHEME_WITHOUT_PORT); 81 url::AddStandardScheme("chrome");
82 url::AddStandardScheme("chrome-extension", url::SCHEME_WITHOUT_PORT); 82 url::AddStandardScheme("chrome-extension");
83 url::AddStandardScheme("chrome-devtools", url::SCHEME_WITHOUT_PORT); 83 url::AddStandardScheme("chrome-devtools");
84 url::AddStandardScheme("chrome-search", url::SCHEME_WITHOUT_PORT); 84 url::AddStandardScheme("chrome-search");
85 85
86 // Not using kExtensionScheme to avoid the dependency to extensions. 86 // Not using kExtensionScheme to avoid the dependency to extensions.
87 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( 87 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
88 "chrome-extension"); 88 "chrome-extension");
89 } 89 }
90 90
91 void Shutdown() override { 91 void Shutdown() override {
92 ui::ResourceBundle::CleanupSharedInstance(); 92 ui::ResourceBundle::CleanupSharedInstance();
93 93
94 base::TestSuite::Shutdown(); 94 base::TestSuite::Shutdown();
(...skipping 29 matching lines...) Expand all
124 // The listener will set up common test environment for all components unit 124 // The listener will set up common test environment for all components unit
125 // tests. 125 // tests.
126 testing::TestEventListeners& listeners = 126 testing::TestEventListeners& listeners =
127 testing::UnitTest::GetInstance()->listeners(); 127 testing::UnitTest::GetInstance()->listeners();
128 listeners.Append(new ComponentsUnitTestEventListener()); 128 listeners.Append(new ComponentsUnitTestEventListener());
129 129
130 return base::LaunchUnitTests( 130 return base::LaunchUnitTests(
131 argc, argv, base::Bind(&base::TestSuite::Run, 131 argc, argv, base::Bind(&base::TestSuite::Run,
132 base::Unretained(&test_suite))); 132 base::Unretained(&test_suite)));
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client_unittest.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698