summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-25 16:01:52 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-25 16:01:52 +0000
commit19720e72464c2981b54ace4000cc4fc05e99f082 (patch)
treed444ba55625f9ae43745e741b7bd5f90d839d604
parent7061f74d55901a430ba1a016c6335b54e0882716 (diff)
downloadchromium_src-19720e72464c2981b54ace4000cc4fc05e99f082.zip
chromium_src-19720e72464c2981b54ace4000cc4fc05e99f082.tar.gz
chromium_src-19720e72464c2981b54ace4000cc4fc05e99f082.tar.bz2
[chromedriver] Rename chromedriver2 target names to remove '2'.
Some test targets are kept because infra needs to be updated. BUG=none R=craigdh@chromium.org Review URL: https://codereview.chromium.org/24162008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225192 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/all.gyp9
-rw-r--r--chrome/chrome_tests.gypi147
-rw-r--r--chrome/test/chromedriver/README.txt15
-rwxr-xr-xchrome/test/chromedriver/run_buildbot_steps.py15
-rwxr-xr-xchrome/test/chromedriver/test/run_all_tests.py6
5 files changed, 111 insertions, 81 deletions
diff --git a/build/all.gyp b/build/all.gyp
index b53bfcc..16215a6 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -217,6 +217,9 @@
'dependencies': [
'../cc/cc_tests.gyp:cc_unittests',
'../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:chromedriver_tests',
+ '../chrome/chrome.gyp:chromedriver_unittests',
+ # TODO(kkania): Remove these after infra no longer depends on them.
'../chrome/chrome.gyp:chromedriver2_tests',
'../chrome/chrome.gyp:chromedriver2_unittests',
'../chrome/chrome.gyp:interactive_ui_tests',
@@ -467,9 +470,9 @@
'target_name': 'chromium_builder_chromedriver',
'type': 'none',
'dependencies': [
- '../chrome/chrome.gyp:chromedriver2_server',
- '../chrome/chrome.gyp:chromedriver2_tests',
- '../chrome/chrome.gyp:chromedriver2_unittests',
+ '../chrome/chrome.gyp:chromedriver',
+ '../chrome/chrome.gyp:chromedriver_tests',
+ '../chrome/chrome.gyp:chromedriver_unittests',
],
}, # target_name: chromium_builder_chromedriver
{
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index c295db5..2a3d208 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -3,6 +3,47 @@
# found in the LICENSE file.
{
'variables' : {
+ 'chromedriver_unittest_sources': [
+ 'test/chromedriver/capabilities_unittest.cc',
+ 'test/chromedriver/chrome/chrome_finder_unittest.cc',
+ 'test/chromedriver/chrome/console_logger_unittest.cc',
+ 'test/chromedriver/chrome/device_manager_unittest.cc',
+ 'test/chromedriver/chrome/devtools_client_impl_unittest.cc',
+ 'test/chromedriver/chrome/devtools_http_client_unittest.cc',
+ 'test/chromedriver/chrome/dom_tracker_unittest.cc',
+ 'test/chromedriver/chrome/frame_tracker_unittest.cc',
+ 'test/chromedriver/chrome/geolocation_override_manager_unittest.cc',
+ 'test/chromedriver/chrome/heap_snapshot_taker_unittest.cc',
+ 'test/chromedriver/chrome/javascript_dialog_manager_unittest.cc',
+ 'test/chromedriver/chrome/navigation_tracker_unittest.cc',
+ 'test/chromedriver/chrome/performance_logger_unittest.cc',
+ 'test/chromedriver/chrome/status_unittest.cc',
+ 'test/chromedriver/chrome/stub_chrome.cc',
+ 'test/chromedriver/chrome/stub_chrome.h',
+ 'test/chromedriver/chrome/stub_devtools_client.cc',
+ 'test/chromedriver/chrome/stub_devtools_client.h',
+ 'test/chromedriver/chrome/stub_web_view.cc',
+ 'test/chromedriver/chrome/stub_web_view.h',
+ 'test/chromedriver/chrome/web_view_impl_unittest.cc',
+ 'test/chromedriver/chrome_launcher_unittest.cc',
+ 'test/chromedriver/commands_unittest.cc',
+ 'test/chromedriver/logging_unittest.cc',
+ 'test/chromedriver/server/http_handler_unittest.cc',
+ 'test/chromedriver/session_commands_unittest.cc',
+ 'test/chromedriver/session_unittest.cc',
+ 'test/chromedriver/util_unittest.cc',
+ ],
+ 'chromedriver_test_sources': [
+ 'test/chromedriver/key_converter_unittest.cc',
+ 'test/chromedriver/keycode_text_conversion_unittest.cc',
+ 'test/chromedriver/net/net_util_unittest.cc',
+ 'test/chromedriver/net/sync_websocket_impl_unittest.cc',
+ 'test/chromedriver/net/test_http_server.cc',
+ 'test/chromedriver/net/test_http_server.h',
+ 'test/chromedriver/net/websocket_unittest.cc',
+ 'test/chromedriver/test_util.cc',
+ 'test/chromedriver/test_util.h',
+ ],
'pyautolib_sources': [
'app/chrome_command_ids.h',
'app/chrome_dll_resource.h',
@@ -438,7 +479,7 @@
], # conditions
},
{
- 'target_name': 'chrome_devtools_lib',
+ 'target_name': 'automation_client_lib',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
@@ -620,13 +661,12 @@
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
- # This is the new ChromeDriver based on DevTools.
{
- 'target_name': 'chromedriver2_lib',
+ 'target_name': 'chromedriver_lib',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
- 'chrome_devtools_lib',
+ 'automation_client_lib',
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../crypto/crypto.gyp:crypto',
@@ -707,12 +747,11 @@
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
- # TODO(kkania): Remove this in favor of 'chromedriver' target right below.
{
- 'target_name': 'chromedriver2_server',
+ 'target_name': 'chromedriver',
'type': 'executable',
'dependencies': [
- 'chromedriver2_lib',
+ 'chromedriver_lib',
],
'include_dirs': [
'..',
@@ -724,25 +763,32 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
- 'target_name': 'chromedriver',
+ 'target_name': 'chromedriver_unittests',
'type': 'executable',
'dependencies': [
- 'chromedriver2_lib',
+ 'chromedriver_lib',
+ '../base/base.gyp:base',
+ '../base/base.gyp:run_all_unittests',
+ '../net/net.gyp:http_server',
+ '../net/net.gyp:net',
+ '../testing/gtest.gyp:gtest',
+ '../ui/ui.gyp:ui',
],
'include_dirs': [
- '..',
+ '..,'
],
'sources': [
- 'test/chromedriver/server/chromedriver_server.cc',
+ '<@(chromedriver_unittest_sources)',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
+ # TODO(kkania): Remove when infra no longer references this.
{
'target_name': 'chromedriver2_unittests',
'type': 'executable',
'dependencies': [
- 'chromedriver2_lib',
+ 'chromedriver_lib',
'../base/base.gyp:base',
'../base/base.gyp:run_all_unittests',
'../net/net.gyp:http_server',
@@ -750,51 +796,45 @@
'../testing/gtest.gyp:gtest',
'../ui/ui.gyp:ui',
],
- 'sources': [
- 'test/chromedriver/capabilities_unittest.cc',
- 'test/chromedriver/chrome/chrome_finder_unittest.cc',
- 'test/chromedriver/chrome/console_logger_unittest.cc',
- 'test/chromedriver/chrome/device_manager_unittest.cc',
- 'test/chromedriver/chrome/devtools_client_impl_unittest.cc',
- 'test/chromedriver/chrome/devtools_http_client_unittest.cc',
- 'test/chromedriver/chrome/dom_tracker_unittest.cc',
- 'test/chromedriver/chrome/frame_tracker_unittest.cc',
- 'test/chromedriver/chrome/geolocation_override_manager_unittest.cc',
- 'test/chromedriver/chrome/heap_snapshot_taker_unittest.cc',
- 'test/chromedriver/chrome/javascript_dialog_manager_unittest.cc',
- 'test/chromedriver/chrome/navigation_tracker_unittest.cc',
- 'test/chromedriver/chrome/performance_logger_unittest.cc',
- 'test/chromedriver/chrome/status_unittest.cc',
- 'test/chromedriver/chrome/stub_chrome.cc',
- 'test/chromedriver/chrome/stub_chrome.h',
- 'test/chromedriver/chrome/stub_devtools_client.cc',
- 'test/chromedriver/chrome/stub_devtools_client.h',
- 'test/chromedriver/chrome/stub_web_view.cc',
- 'test/chromedriver/chrome/stub_web_view.h',
- 'test/chromedriver/chrome/web_view_impl_unittest.cc',
- 'test/chromedriver/chrome_launcher_unittest.cc',
- 'test/chromedriver/commands_unittest.cc',
- 'test/chromedriver/logging_unittest.cc',
- 'test/chromedriver/server/http_handler_unittest.cc',
- 'test/chromedriver/session_commands_unittest.cc',
- 'test/chromedriver/session_unittest.cc',
- 'test/chromedriver/util_unittest.cc',
+ 'include_dirs': [
+ '..,'
],
- 'conditions': [
- # See http://crbug.com/162998#c4 for why this is needed.
- ['OS=="linux" and linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
+ 'sources': [
+ '<@(chromedriver_unittest_sources)',
],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [ 4267, ],
},
# ChromeDriver2 tests that aren't run on the main buildbot. Available
# as an optional test type on trybots.
{
+ 'target_name': 'chromedriver_tests',
+ 'type': 'executable',
+ 'dependencies': [
+ 'chromedriver_lib',
+ '../base/base.gyp:base',
+ '../base/base.gyp:run_all_unittests',
+ '../net/net.gyp:http_server',
+ '../net/net.gyp:net',
+ '../net/net.gyp:net_test_support',
+ '../testing/gtest.gyp:gtest',
+ '../url/url.gyp:url_lib',
+ ],
+ 'include_dirs': [
+ '..,'
+ ],
+ 'sources': [
+ '<@(chromedriver_test_sources)',
+ ],
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [ 4267, ],
+ },
+ # TODO(kkania): Remove when infra no longer references this.
+ {
'target_name': 'chromedriver2_tests',
'type': 'executable',
'dependencies': [
+ 'chromedriver_lib',
'../base/base.gyp:base',
'../base/base.gyp:run_all_unittests',
'../net/net.gyp:http_server',
@@ -802,21 +842,12 @@
'../net/net.gyp:net_test_support',
'../testing/gtest.gyp:gtest',
'../url/url.gyp:url_lib',
- 'chromedriver2_lib',
],
'include_dirs': [
'..,'
],
'sources': [
- 'test/chromedriver/key_converter_unittest.cc',
- 'test/chromedriver/keycode_text_conversion_unittest.cc',
- 'test/chromedriver/net/net_util_unittest.cc',
- 'test/chromedriver/net/sync_websocket_impl_unittest.cc',
- 'test/chromedriver/net/test_http_server.cc',
- 'test/chromedriver/net/test_http_server.h',
- 'test/chromedriver/net/websocket_unittest.cc',
- 'test/chromedriver/test_util.cc',
- 'test/chromedriver/test_util.h',
+ '<@(chromedriver_test_sources)',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
diff --git a/chrome/test/chromedriver/README.txt b/chrome/test/chromedriver/README.txt
index 43126c4..eaddce6 100644
--- a/chrome/test/chromedriver/README.txt
+++ b/chrome/test/chromedriver/README.txt
@@ -4,12 +4,12 @@ contribute.
ChromeDriver is an implementation of the WebDriver standard,
which allows users to automate testing of their website across browsers.
-See the user site at http://code.google.com/p/chromedriver.
+See the user site at https://sites.google.com/a/chromium.org/chromedriver/
=====Getting started=====
-Build ChromeDriver by building the 'chromedriver2_server' target. This will
+Build ChromeDriver by building the 'chromedriver' target. This will
create an executable binary in the build folder named
-'chromedriver2_server[.exe]'.
+'chromedriver[.exe]'.
Once built, ChromeDriver can be used interactively with python.
@@ -17,7 +17,7 @@ $ export PYTHONPATH=<THIS_DIR>/server:<THIS_DIR>/client
$ python
>>> import server
>>> import chromedriver
->>> cd_server = server.Server('/path/to/chromedriver2_server/executable')
+>>> cd_server = server.Server('/path/to/chromedriver/executable')
>>> driver = chromedriver.ChromeDriver(cd_server.GetUrl())
>>> driver.Load('http://www.google.com')
>>> driver.Quit()
@@ -28,8 +28,7 @@ ChromeDriver will use the system installed Chrome by default.
To use ChromeDriver2 with Chrome on Android pass the Android package name in the
chromeOptions.androidPackage capability when creating the driver. The path to
adb_commands.py and the adb tool from the Android SDK must be set in PATH. For
-more detailed instructions see the wiki:
- https://code.google.com/p/chromedriver/wiki/ChromeDriver2forAndroid
+more detailed instructions see the user site.
=====Architecture=====
ChromeDriver is shipped separately from Chrome. It controls Chrome out of
@@ -84,12 +83,12 @@ See the ChromeDriver waterfall at:
http://build.chromium.org/p/chromium.chromedriver/waterfall
There are 4 test suites for verifying ChromeDriver's correctness:
-1) chromedriver2_unittests (chrome/chrome_tests.gypi)
+1) chromedriver_unittests (chrome/chrome_tests.gypi)
This is the unittest target, which runs on the main waterfall on win/mac/linux
and can close the tree. It is also run on the commit queue and try bots by
default. Tests should take a few milliseconds and be very stable.
-2) chromedriver2_tests (chrome/chrome_tests.gypi)
+2) chromedriver_tests (chrome/chrome_tests.gypi)
This is a collection of C++ medium sized tests which can be run optionally
on the trybots.
diff --git a/chrome/test/chromedriver/run_buildbot_steps.py b/chrome/test/chromedriver/run_buildbot_steps.py
index be74a23..03cf8fc 100755
--- a/chrome/test/chromedriver/run_buildbot_steps.py
+++ b/chrome/test/chromedriver/run_buildbot_steps.py
@@ -28,7 +28,7 @@ import util
_THIS_DIR = os.path.abspath(os.path.dirname(__file__))
GS_ARCHIVE_BUCKET = 'gs://chromedriver-prebuilts'
-GS_ZIP_PREFIX = 'chromedriver2_prebuilts'
+GS_ZIP_PREFIX = 'chromedriver_prebuilts'
GS_RC_BUCKET = 'gs://chromedriver-rc'
GS_RELEASE_PATH = GS_RC_BUCKET + '/releases'
RC_LOG_FORMAT = '%s_log.json'
@@ -50,8 +50,8 @@ from slave import slave_utils
def ArchivePrebuilts(revision):
"""Uploads the prebuilts to google storage."""
util.MarkBuildStepStart('archive')
- prebuilts = ['chromedriver2_server',
- 'chromedriver2_unittests', 'chromedriver2_tests']
+ prebuilts = ['chromedriver',
+ 'chromedriver_unittests', 'chromedriver_tests']
build_dir = chrome_paths.GetBuildDir(prebuilts[0:1])
zip_name = '%s_r%s.zip' % (GS_ZIP_PREFIX, revision)
temp_dir = util.MakeTempDir()
@@ -70,7 +70,7 @@ def DownloadPrebuilts():
util.MarkBuildStepStart('Download chromedriver prebuilts')
temp_dir = util.MakeTempDir()
- zip_path = os.path.join(temp_dir, 'chromedriver2_prebuilts.zip')
+ zip_path = os.path.join(temp_dir, 'chromedriver_prebuilts.zip')
if gsutil_download.DownloadLatestFile(GS_ARCHIVE_BUCKET, GS_ZIP_PREFIX,
zip_path):
util.MarkBuildStepError()
@@ -81,7 +81,7 @@ def DownloadPrebuilts():
f.extractall(build_dir)
f.close()
# Workaround for Python bug: http://bugs.python.org/issue15795
- os.chmod(os.path.join(build_dir, 'chromedriver2_server'), 0700)
+ os.chmod(os.path.join(build_dir, 'chromedriver'), 0700)
def GetDownloads():
@@ -275,13 +275,10 @@ def _ConstructReleaseCandidate(platform, revision):
"""Constructs a release candidate zip from the current build."""
zip_name = RC_ZIP_FORMAT % (platform, GetVersion(), revision)
if util.IsWindows():
- server_orig_name = 'chromedriver2_server.exe'
server_name = 'chromedriver.exe'
else:
- server_orig_name = 'chromedriver2_server'
server_name = 'chromedriver'
- server = os.path.join(chrome_paths.GetBuildDir([server_orig_name]),
- server_orig_name)
+ server = os.path.join(chrome_paths.GetBuildDir([server_name]), server_name)
print 'Zipping ChromeDriver server', server
temp_dir = util.MakeTempDir()
diff --git a/chrome/test/chromedriver/test/run_all_tests.py b/chrome/test/chromedriver/test/run_all_tests.py
index cd0255e..4267731 100755
--- a/chrome/test/chromedriver/test/run_all_tests.py
+++ b/chrome/test/chromedriver/test/run_all_tests.py
@@ -107,7 +107,7 @@ def RunJavaTests(chromedriver, chrome=None, chrome_version=None,
def RunCppTests(cpp_tests):
- util.MarkBuildStepStart('chromedriver2_tests')
+ util.MarkBuildStepStart('chromedriver_tests')
code = util.RunCommand([cpp_tests])
if code:
util.MarkBuildStepError()
@@ -136,8 +136,8 @@ def main():
exe_postfix = ''
if util.IsWindows():
exe_postfix = '.exe'
- cpp_tests_name = 'chromedriver2_tests' + exe_postfix
- server_name = 'chromedriver2_server' + exe_postfix
+ cpp_tests_name = 'chromedriver_tests' + exe_postfix
+ server_name = 'chromedriver' + exe_postfix
required_build_outputs = [server_name]
if not options.android_packages: