diff options
author | carlosk <carlosk@chromium.org> | 2016-02-02 06:53:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-02 15:00:18 +0000 |
commit | 282c437e03c572e955ef7cf85d2bf5f8f43f1f99 (patch) | |
tree | 2958fe0eeec11ce6acee8e725007479bfa973e6c /content | |
parent | 15f972b06df0017e7a873027e395f1a63f02b09c (diff) | |
download | chromium_src-282c437e03c572e955ef7cf85d2bf5f8f43f1f99.zip chromium_src-282c437e03c572e955ef7cf85d2bf5f8f43f1f99.tar.gz chromium_src-282c437e03c572e955ef7cf85d2bf5f8f43f1f99.tar.bz2 |
Reland #2: Eliminate browser test helpers from unit tests.
This change eliminates dependencies of browser_test_utils.h and
in_process_browser_test.h from unit tests and eliminates the future
possibility of adding them back by changing gn and gyp configurations.
This also renames one test from "unit" to "browser" as it seems more
appropriate for the case.
Revert CL: http://crbug.com/1658733002
Reverted CL: http://crbug.com/1613123002
BUG=514788
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/1659843002
Cr-Commit-Position: refs/heads/master@{#372941}
Diffstat (limited to 'content')
-rw-r--r-- | content/content_tests.gypi | 46 | ||||
-rw-r--r-- | content/test/BUILD.gn | 36 |
2 files changed, 76 insertions, 6 deletions
diff --git a/content/content_tests.gypi b/content/content_tests.gypi index fa0c763..848231a 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -26,11 +26,6 @@ 'public/test/async_file_test_helper.h', 'public/test/background_sync_test_util.cc', 'public/test/background_sync_test_util.h', - 'public/test/browser_test.h', - 'public/test/browser_test_base.cc', - 'public/test/browser_test_base.h', - 'public/test/browser_test_utils.cc', - 'public/test/browser_test_utils.h', 'public/test/content_test_suite_base.cc', 'public/test/content_test_suite_base.h', 'public/test/download_test_observer.cc', @@ -1364,7 +1359,9 @@ ], }, { - # GN version: //content/tests:browsertest_support + # GN version: //content/test:browsertest_support + # content_browser_test_support can be used by targets that run + # content_shell based browser tests. 'target_name': 'content_browser_test_support', 'type': 'static_library', 'dependencies': [ @@ -1404,6 +1401,42 @@ ], }, { + # GN version: //content/test:browsertest_base + # content_browser_test_base can be used by any browser test target. + 'target_name': 'content_browser_test_base', + 'type': 'static_library', + 'dependencies': [ + '../base/base.gyp:base', + '../net/net.gyp:net_test_support', + '../testing/gtest.gyp:gtest', + '../ui/base/ime/ui_base_ime.gyp:ui_base_ime', + '../ui/base/ui_base.gyp:ui_base', + '../ui/base/ui_base.gyp:ui_base_test_support', + '../ui/events/events.gyp:events_test_support', + 'content.gyp:content_browser', + 'content.gyp:content_common', + ], + 'export_dependent_settings': [ + 'content.gyp:content_browser', + ], + 'sources': [ + # Source list duplicated in GN build. + 'public/test/browser_test.h', + 'public/test/browser_test_base.cc', + 'public/test/browser_test_base.h', + 'public/test/browser_test_utils.cc', + 'public/test/browser_test_utils.h', + ], + 'conditions': [ + ['OS != "ios"', { + 'dependencies': [ '../third_party/WebKit/public/blink.gyp:blink' ], + 'export_dependent_settings': [ + '../third_party/WebKit/public/blink.gyp:blink', + ], + }], + ], + }, + { # GN version: //content/test:test_mojo_bindings 'target_name': 'content_test_mojo_bindings', 'type': 'static_library', @@ -1438,6 +1471,7 @@ 'content.gyp:content_plugin', 'content.gyp:content_renderer', 'content.gyp:content_resources', + 'content_browser_test_base', 'content_browser_test_support', 'content_common_mojo_bindings.gyp:content_common_mojo_bindings', 'content_shell_lib', diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index b6f22ab..2c619c8 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -194,6 +194,8 @@ source_set("test_support") { } } +# browsertest_support can be used by targets that run content_shell based +# browser tests. source_set("browsertest_support") { testonly = true @@ -224,6 +226,39 @@ source_set("browsertest_support") { configs += [ "//v8:external_startup_data" ] } +# browsertest_base can be used by any browser test target. +source_set("browsertest_base") { + testonly = true + + sources = [ + "../public/test/browser_test.h", + "../public/test/browser_test_base.cc", + "../public/test/browser_test_base.h", + "../public/test/browser_test_utils.cc", + "../public/test/browser_test_utils.h", + ] + + public_deps = [ + "//content/public/browser", + "//content/public/common", + ] + deps = [ + "//base:base", + "//net:test_support", + "//testing/gtest", + "//ui/base", + "//ui/base:test_support", + "//ui/base/ime", + "//ui/events:dom_keycode_converter", + "//ui/events:events_base", + "//ui/events:gesture_detection", + "//ui/resources", + ] + if (!is_ios) { + public_deps += [ "//third_party/WebKit/public:blink" ] + } +} + mojom("content_test_mojo_bindings") { sources = [ "../public/test/test_mojo_service.mojom", @@ -358,6 +393,7 @@ test("content_browsertests") { ] deps = [ + ":browsertest_base", ":browsertest_support", ":web_ui_test_mojo_bindings", "//base/test:test_support", |