diff options
author | jochen <jochen@chromium.org> | 2016-02-23 09:20:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-23 17:23:00 +0000 |
commit | e9ba6dd99f0ef6ea928af7caab687400daca4d8d (patch) | |
tree | 3876169bc7afaf270aac90a8e3f18d44c8a0871a | |
parent | 2ac5d1f168f935be73cb6425a97fe5bae8fe081c (diff) | |
download | chromium_src-e9ba6dd99f0ef6ea928af7caab687400daca4d8d.zip chromium_src-e9ba6dd99f0ef6ea928af7caab687400daca4d8d.tar.gz chromium_src-e9ba6dd99f0ef6ea928af7caab687400daca4d8d.tar.bz2 |
Move TestInfoExtractor to content_shell
it's only used from layout_test_browser_main.cc and has no other
dependencies on the test_runner
BUG=none
R=avi@chromium.org
Review URL: https://codereview.chromium.org/1724663003
Cr-Commit-Position: refs/heads/master@{#377011}
-rw-r--r-- | PRESUBMIT.py | 2 | ||||
-rw-r--r-- | components/test_runner/BUILD.gn | 2 | ||||
-rw-r--r-- | components/test_runner/test_runner.gyp | 6 | ||||
-rw-r--r-- | content/content_shell.gypi | 2 | ||||
-rw-r--r-- | content/shell/BUILD.gn | 2 | ||||
-rw-r--r-- | content/shell/browser/layout_test/layout_test_browser_main.cc | 8 | ||||
-rw-r--r-- | content/shell/browser/layout_test/test_info_extractor.cc (renamed from components/test_runner/test_info_extractor.cc) | 6 | ||||
-rw-r--r-- | content/shell/browser/layout_test/test_info_extractor.h (renamed from components/test_runner/test_info_extractor.h) | 15 |
8 files changed, 22 insertions, 21 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 81b3710..223f154 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -171,6 +171,8 @@ _BANNED_CPP_FUNCTIONS = ( r"^chrome[\\\/]browser[\\\/]chromeos[\\\/]" "customization_document_browsertest\.cc$", r"^components[\\\/]crash[\\\/]app[\\\/]breakpad_mac\.mm$", + r"^content[\\\/]shell[\\\/]browser[\\\/]layout_test[\\\/]" + + r"test_info_extractor\.cc$", r"^content[\\\/]shell[\\\/]browser[\\\/]shell_browser_main\.cc$", r"^content[\\\/]shell[\\\/]browser[\\\/]shell_message_filter\.cc$", r"^mojo[\\\/]edk[\\\/]embedder[\\\/]" + diff --git a/components/test_runner/BUILD.gn b/components/test_runner/BUILD.gn index 577c04e..ebeef6a 100644 --- a/components/test_runner/BUILD.gn +++ b/components/test_runner/BUILD.gn @@ -64,8 +64,6 @@ component("test_runner") { "spell_check_client.h", "test_common.cc", "test_common.h", - "test_info_extractor.cc", - "test_info_extractor.h", "test_interfaces.cc", "test_interfaces.h", "test_plugin.cc", diff --git a/components/test_runner/test_runner.gyp b/components/test_runner/test_runner.gyp index ee4829e..4b67c3d 100644 --- a/components/test_runner/test_runner.gyp +++ b/components/test_runner/test_runner.gyp @@ -91,17 +91,15 @@ 'spell_check_client.h', 'test_common.cc', 'test_common.h', - 'test_info_extractor.cc', - 'test_info_extractor.h', 'test_interfaces.cc', 'test_interfaces.h', 'test_plugin.cc', 'test_plugin.h', + 'test_preferences.cc', + 'test_preferences.h', 'test_runner.cc', 'test_runner.h', 'test_runner_export.h', - 'test_preferences.cc', - 'test_preferences.h', 'text_input_controller.cc', 'text_input_controller.h', 'web_ax_object_proxy.cc', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index 43b456d..1ce43443 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -128,6 +128,8 @@ 'shell/browser/layout_test/layout_test_url_request_context_getter.h', 'shell/browser/layout_test/notify_done_forwarder.cc', 'shell/browser/layout_test/notify_done_forwarder.h', + 'shell/browser/layout_test/test_info_extractor.cc', + 'shell/browser/layout_test/test_info_extractor.h', 'shell/browser/shell.cc', 'shell/browser/shell.h', 'shell/browser/shell_access_token_store.cc', diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index 57538e9..4ed444a 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn @@ -80,6 +80,8 @@ static_library("content_shell_lib") { "browser/layout_test/layout_test_url_request_context_getter.h", "browser/layout_test/notify_done_forwarder.cc", "browser/layout_test/notify_done_forwarder.h", + "browser/layout_test/test_info_extractor.cc", + "browser/layout_test/test_info_extractor.h", "browser/shell.cc", "browser/shell.h", "browser/shell_access_token_store.cc", diff --git a/content/shell/browser/layout_test/layout_test_browser_main.cc b/content/shell/browser/layout_test/layout_test_browser_main.cc index 90285c1..2984a09 100644 --- a/content/shell/browser/layout_test/layout_test_browser_main.cc +++ b/content/shell/browser/layout_test/layout_test_browser_main.cc @@ -19,10 +19,10 @@ #include "base/thread_task_runner_handle.h" #include "base/threading/thread_restrictions.h" #include "build/build_config.h" -#include "components/test_runner/test_info_extractor.h" #include "content/public/browser/browser_main_runner.h" #include "content/public/common/url_constants.h" #include "content/shell/browser/layout_test/blink_test_controller.h" +#include "content/shell/browser/layout_test/test_info_extractor.h" #include "content/shell/browser/shell.h" #include "content/shell/common/shell_switches.h" #include "content/shell/renderer/layout_test/blink_test_helpers.h" @@ -35,7 +35,7 @@ namespace { -bool RunOneTest(const test_runner::TestInfo& test_info, +bool RunOneTest(const content::TestInfo& test_info, bool* ran_at_least_once, const scoped_ptr<content::BrowserMainRunner>& main_runner) { if (!content::BlinkTestController::Get()->PrepareForLayoutTest( @@ -81,9 +81,9 @@ int RunTests(const scoped_ptr<content::BrowserMainRunner>& main_runner) { base::CommandLine::StringVector args = base::CommandLine::ForCurrentProcess()->GetArgs(); - test_runner::TestInfoExtractor test_extractor(args); + content::TestInfoExtractor test_extractor(args); bool ran_at_least_once = false; - scoped_ptr<test_runner::TestInfo> test_info; + scoped_ptr<content::TestInfo> test_info; while ((test_info = test_extractor.GetNextTest())) { if (!RunOneTest(*test_info, &ran_at_least_once, main_runner)) break; diff --git a/components/test_runner/test_info_extractor.cc b/content/shell/browser/layout_test/test_info_extractor.cc index 42e0e48..a375940 100644 --- a/components/test_runner/test_info_extractor.cc +++ b/content/shell/browser/layout_test/test_info_extractor.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/test_runner/test_info_extractor.h" +#include "content/shell/browser/layout_test/test_info_extractor.h" #include <iostream> @@ -15,7 +15,7 @@ #include "build/build_config.h" #include "net/base/filename_util.h" -namespace test_runner { +namespace content { namespace { @@ -146,4 +146,4 @@ scoped_ptr<TestInfo> TestInfoExtractor::GetNextTest() { return GetTestInfoFromLayoutTestName(test_string); } -} // namespace test_runner +} // namespace content diff --git a/components/test_runner/test_info_extractor.h b/content/shell/browser/layout_test/test_info_extractor.h index 4f4a11c..1988eac 100644 --- a/components/test_runner/test_info_extractor.h +++ b/content/shell/browser/layout_test/test_info_extractor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_TEST_RUNNER_TEST_INFO_EXTRACTOR_H_ -#define COMPONENTS_TEST_RUNNER_TEST_INFO_EXTRACTOR_H_ +#ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_TEST_INFO_EXTRACTOR_H_ +#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_TEST_INFO_EXTRACTOR_H_ #include <stddef.h> @@ -12,12 +12,11 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/macros.h" -#include "components/test_runner/test_runner_export.h" #include "url/gurl.h" -namespace test_runner { +namespace content { -struct TEST_RUNNER_EXPORT TestInfo { +struct TestInfo { TestInfo(const GURL& url, bool enable_pixel_dumping, const std::string& expected_pixel_hash, @@ -30,7 +29,7 @@ struct TEST_RUNNER_EXPORT TestInfo { base::FilePath current_working_directory; }; -class TEST_RUNNER_EXPORT TestInfoExtractor { +class TestInfoExtractor { public: explicit TestInfoExtractor(const base::CommandLine::StringVector& cmd_args); ~TestInfoExtractor(); @@ -44,6 +43,6 @@ class TEST_RUNNER_EXPORT TestInfoExtractor { DISALLOW_COPY_AND_ASSIGN(TestInfoExtractor); }; -} // namespace test_runner +} // namespace content -#endif // COMPONENTS_TEST_RUNNER_TEST_INFO_EXTRACTOR_H_ +#endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_TEST_INFO_EXTRACTOR_H_ |