Move test to src/test.

- Refer to top-level directories by <(DEPTH), e.g. <(DEPTH)/testing.
- Remove now unneeded third_party_root.

TBR=henrike@webrtc.org
BUG=none
TEST=trybots

Review URL: https://webrtc-codereview.appspot.com/669007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2446 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/build/common.gypi b/src/build/common.gypi
index 3a906ae..1369505 100644
--- a/src/build/common.gypi
+++ b/src/build/common.gypi
@@ -70,7 +70,6 @@
         'include_tests%': 0,
 
         'webrtc_root%': '<(DEPTH)/third_party/webrtc',
-        'third_party_root%': '<(DEPTH)/third_party',
       }, {
         # Settings for the standalone (not-in-Chromium) build.
 
@@ -87,7 +86,6 @@
         'include_tests%': 1,
 
         'webrtc_root%': '<(DEPTH)/src',
-        'third_party_root%': '<(DEPTH)',
 
         # TODO(andrew): For now, disable the Chrome plugins, which causes a
         # flood of chromium-style warnings. Investigate enabling them:
diff --git a/src/common_audio/resampler/resampler.gypi b/src/common_audio/resampler/resampler.gypi
index 96fd34a..75997fd 100644
--- a/src/common_audio/resampler/resampler.gypi
+++ b/src/common_audio/resampler/resampler.gypi
@@ -36,8 +36,8 @@
           'type': 'executable',
           'dependencies': [
             'resampler',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'resampler_unittest.cc',
diff --git a/src/common_audio/signal_processing/signal_processing.gypi b/src/common_audio/signal_processing/signal_processing.gypi
index 98f0973..89c3ac2 100644
--- a/src/common_audio/signal_processing/signal_processing.gypi
+++ b/src/common_audio/signal_processing/signal_processing.gypi
@@ -66,8 +66,8 @@
           'type': 'executable',
           'dependencies': [
             'signal_processing',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'signal_processing_unittest.cc',
diff --git a/src/common_audio/vad/vad.gypi b/src/common_audio/vad/vad.gypi
index 1b1ded8..5a9466c 100644
--- a/src/common_audio/vad/vad.gypi
+++ b/src/common_audio/vad/vad.gypi
@@ -44,8 +44,8 @@
           'type': 'executable',
           'dependencies': [
             'vad',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'vad_core_unittest.cc',
diff --git a/src/common_video/jpeg/jpeg.gypi b/src/common_video/jpeg/jpeg.gypi
index cff7736..dec5969 100644
--- a/src/common_video/jpeg/jpeg.gypi
+++ b/src/common_video/jpeg/jpeg.gypi
@@ -61,8 +61,8 @@
           'type': 'executable',
           'dependencies': [
              'webrtc_jpeg',
-             '<(third_party_root)/testing/gtest.gyp:gtest',
-             '<(third_party_root)/test/test.gyp:test_support_main',
+             '<(DEPTH)/testing/gtest.gyp:gtest',
+             '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'jpeg_unittest.cc',
diff --git a/src/common_video/libyuv/libyuv.gypi b/src/common_video/libyuv/libyuv.gypi
index 1f9dddf..11b24b4 100644
--- a/src/common_video/libyuv/libyuv.gypi
+++ b/src/common_video/libyuv/libyuv.gypi
@@ -40,9 +40,9 @@
           'type': 'executable',
           'dependencies': [
             'webrtc_libyuv',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'libyuv_unittest.cc',
diff --git a/src/modules/audio_coding/codecs/cng/cng.gypi b/src/modules/audio_coding/codecs/cng/cng.gypi
index e62a4cf..ce83e29 100644
--- a/src/modules/audio_coding/codecs/cng/cng.gypi
+++ b/src/modules/audio_coding/codecs/cng/cng.gypi
@@ -38,8 +38,8 @@
           'type': 'executable',
           'dependencies': [
             'CNG',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'cng_unittest.cc',
diff --git a/src/modules/audio_coding/codecs/g711/g711.gypi b/src/modules/audio_coding/codecs/g711/g711.gypi
index dd183ec..66aa17a 100644
--- a/src/modules/audio_coding/codecs/g711/g711.gypi
+++ b/src/modules/audio_coding/codecs/g711/g711.gypi
@@ -35,8 +35,8 @@
           'type': 'executable',
           'dependencies': [
             'G711',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'g711_unittest.cc',
diff --git a/src/modules/audio_coding/codecs/g722/g722.gypi b/src/modules/audio_coding/codecs/g722/g722.gypi
index df4f2db..311b5a0 100644
--- a/src/modules/audio_coding/codecs/g722/g722.gypi
+++ b/src/modules/audio_coding/codecs/g722/g722.gypi
@@ -35,8 +35,8 @@
           'type': 'executable',
           'dependencies': [
             'G722',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'g722_unittest.cc',
diff --git a/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi b/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi
index 8962b8f..9e196b8 100644
--- a/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi
+++ b/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi
@@ -33,8 +33,8 @@
           'type': 'executable',
           'dependencies': [
             'PCM16B',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'pcm16b_unittest.cc',
diff --git a/src/modules/audio_coding/main/source/audio_coding_module.gypi b/src/modules/audio_coding/main/source/audio_coding_module.gypi
index d2897e4..acba5a1 100644
--- a/src/modules/audio_coding/main/source/audio_coding_module.gypi
+++ b/src/modules/audio_coding/main/source/audio_coding_module.gypi
@@ -101,8 +101,8 @@
           'type': 'executable',
           'dependencies': [
             'audio_coding_module',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
           ],
           'sources': [
@@ -131,8 +131,8 @@
             'audio_coding_module',
             'NetEq',
             '<(webrtc_root)/common_audio/common_audio.gyp:vad',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
           ],
           'sources': [
diff --git a/src/modules/audio_coding/neteq/neteq.gypi b/src/modules/audio_coding/neteq/neteq.gypi
index 1c6a973..0d19c89 100644
--- a/src/modules/audio_coding/neteq/neteq.gypi
+++ b/src/modules/audio_coding/neteq/neteq.gypi
@@ -93,8 +93,8 @@
           'dependencies': [
             'NetEq',
             'NetEqTestTools',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'webrtc_neteq_unittest.cc',
@@ -178,7 +178,7 @@
           'target_name': 'RTPjitter',
           'type': 'executable',
           'dependencies': [
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'test/RTPjitter.cc',
@@ -189,7 +189,7 @@
           'type': 'executable',
           'dependencies': [
             'NetEqTestTools',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'test/RTPanalyze.cc',
@@ -200,7 +200,7 @@
           'type': 'executable',
           'dependencies': [
             'NetEqTestTools',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
            'test/RTPchange.cc',
@@ -211,7 +211,7 @@
           'type': 'executable',
           'dependencies': [
            'NetEqTestTools',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'test/RTPtimeshift.cc',
@@ -222,7 +222,7 @@
           'type': 'executable',
           'dependencies': [
             'NetEqTestTools',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'test/RTPcat.cc',
@@ -254,7 +254,7 @@
             'iLBC',
             'iSAC',
             'CNG',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'direct_dependent_settings': {
             'include_dirs': [
diff --git a/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi b/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi
index ed214de..c00885b6 100644
--- a/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi
+++ b/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi
@@ -51,8 +51,8 @@
           'type': 'executable',
           'dependencies': [
             'audio_conference_mixer',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
           ],
           'sources': [
diff --git a/src/modules/audio_device/main/source/audio_device.gypi b/src/modules/audio_device/main/source/audio_device.gypi
index 1926b46..b0de105 100644
--- a/src/modules/audio_device/main/source/audio_device.gypi
+++ b/src/modules/audio_device/main/source/audio_device.gypi
@@ -175,8 +175,8 @@
          'dependencies': [
             'audio_device',
             'webrtc_utility',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
           ],
           'sources': [
@@ -192,8 +192,8 @@
             'webrtc_utility',
             '<(webrtc_root)/common_audio/common_audio.gyp:resampler',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/test/test.gyp:test_support',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             '../test/audio_device_test_func.cc',
diff --git a/src/modules/audio_processing/apm_tests.gypi b/src/modules/audio_processing/apm_tests.gypi
index 1124165..0d5bfac 100644
--- a/src/modules/audio_processing/apm_tests.gypi
+++ b/src/modules/audio_processing/apm_tests.gypi
@@ -26,8 +26,8 @@
         'audioproc_unittest_proto',
         '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-        '<(third_party_root)/test/test.gyp:test_support',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
       ],
       'sources': [
         'aec/system_delay_unittest.cc',
@@ -59,7 +59,7 @@
             'audio_processing',
             'audioproc_debug_proto',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [ 'test/process_test.cc', ],
         },
@@ -69,7 +69,7 @@
           'dependencies': [
             'audioproc_debug_proto',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/third_party/google-gflags/google-gflags.gyp:google-gflags',
+            '<(DEPTH)/third_party/google-gflags/google-gflags.gyp:google-gflags',
           ],
           'sources': [ 'test/unpack.cc', ],
         },
diff --git a/src/modules/bitrate_controller/bitrate_controller.gypi b/src/modules/bitrate_controller/bitrate_controller.gypi
index 1ea6fe8..2db5fcb 100644
--- a/src/modules/bitrate_controller/bitrate_controller.gypi
+++ b/src/modules/bitrate_controller/bitrate_controller.gypi
@@ -41,8 +41,8 @@
           'type': 'executable',
           'dependencies': [
             'bitrate_controller',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
           'sources': [
             'bitrate_controller_unittest.cc',
diff --git a/src/modules/media_file/source/media_file.gypi b/src/modules/media_file/source/media_file.gypi
index 02a46e7..f94a618 100644
--- a/src/modules/media_file/source/media_file.gypi
+++ b/src/modules/media_file/source/media_file.gypi
@@ -48,8 +48,8 @@
           'type': 'executable',
           'dependencies': [
             'media_file',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'media_file_unittest.cc',
diff --git a/src/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi b/src/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
index 4f159ae..21ec7a9 100644
--- a/src/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
+++ b/src/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
@@ -49,9 +49,9 @@
           'type': 'executable',
           'dependencies': [
             'remote_bitrate_estimator',
-            '<(third_party_root)/testing/gmock.gyp:gmock',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gmock.gyp:gmock',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'include/mock/mock_remote_bitrate_observer.h',
diff --git a/src/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi b/src/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi
index 63253b6..09a1fe2 100644
--- a/src/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi
+++ b/src/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi
@@ -13,9 +13,9 @@
       'type': 'executable',
       'dependencies': [
         'rtp_rtcp',
-        '<(third_party_root)/testing/gmock.gyp:gmock',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
-        '<(third_party_root)/test/test.gyp:test_support_main',
+        '<(DEPTH)/testing/gmock.gyp:gmock',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support_main',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
       ],
       'include_dirs': [
diff --git a/src/modules/rtp_rtcp/test/testAPI/test_api.gypi b/src/modules/rtp_rtcp/test/testAPI/test_api.gypi
index 94cecf5..eaa3a72 100644
--- a/src/modules/rtp_rtcp/test/testAPI/test_api.gypi
+++ b/src/modules/rtp_rtcp/test/testAPI/test_api.gypi
@@ -13,8 +13,8 @@
       'type': 'executable',
       'dependencies': [
         'rtp_rtcp',
-        '<(third_party_root)/test/test.gyp:test_support_main',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support_main',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
       ],
       
       'include_dirs': [
diff --git a/src/modules/rtp_rtcp/test/testFec/test_fec.gypi b/src/modules/rtp_rtcp/test/testFec/test_fec.gypi
index 97a19f4..e4fde9c 100644
--- a/src/modules/rtp_rtcp/test/testFec/test_fec.gypi
+++ b/src/modules/rtp_rtcp/test/testFec/test_fec.gypi
@@ -13,7 +13,7 @@
       'type': 'executable',
       'dependencies': [
         'rtp_rtcp',
-        '<(third_party_root)/test/test.gyp:test_support_main',
+        '<(webrtc_root)/test/test.gyp:test_support_main',
       ],
       
       'include_dirs': [
diff --git a/src/modules/udp_transport/source/udp_transport.gypi b/src/modules/udp_transport/source/udp_transport.gypi
index c36f428..58c208a 100644
--- a/src/modules/udp_transport/source/udp_transport.gypi
+++ b/src/modules/udp_transport/source/udp_transport.gypi
@@ -88,9 +88,9 @@
           'type': 'executable',
           'dependencies': [
             'udp_transport',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/testing/gmock.gyp:gmock',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gmock.gyp:gmock',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'udp_transport_unittest.cc',
diff --git a/src/modules/utility/source/utility.gypi b/src/modules/utility/source/utility.gypi
index 52f509b..308dd9e 100644
--- a/src/modules/utility/source/utility.gypi
+++ b/src/modules/utility/source/utility.gypi
@@ -75,8 +75,8 @@
           'type': 'executable',
           'dependencies': [
             'webrtc_utility',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'audio_frame_operations_unittest.cc',
diff --git a/src/modules/video_capture/main/source/video_capture.gypi b/src/modules/video_capture/main/source/video_capture.gypi
index 4404de0..3cf6ea4 100644
--- a/src/modules/video_capture/main/source/video_capture.gypi
+++ b/src/modules/video_capture/main/source/video_capture.gypi
@@ -141,8 +141,8 @@
            'video_capture_module',
            'webrtc_utility',
            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-           '<(third_party_root)/testing/gtest.gyp:gtest',
-           '<(third_party_root)/test/test.gyp:test_support_main',
+           '<(DEPTH)/testing/gtest.gyp:gtest',
+           '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'include_dirs': [
             '../interface',
diff --git a/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi b/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi
index da5c6fb..646d0ca 100644
--- a/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi
+++ b/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi
@@ -14,7 +14,7 @@
           'target_name': 'video_codecs_test_framework',
           'type': '<(library)',
           'dependencies': [
-            '<(third_party_root)/test/test.gyp:test_support',
+            '<(webrtc_root)/test/test.gyp:test_support',
           ],
           'sources': [
             'mock/mock_packet_manipulator.h',
@@ -35,8 +35,8 @@
             'video_codecs_test_framework',
             'webrtc_video_coding',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/testing/gmock.gyp:gmock',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gmock.gyp:gmock',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'packet_manipulator_unittest.cc',
@@ -51,9 +51,9 @@
             'video_codecs_test_framework',
             'webrtc_video_coding',
             'webrtc_vp8',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/metrics.gyp:metrics',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/metrics.gyp:metrics',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'videoprocessor_integrationtest.cc',
diff --git a/src/modules/video_coding/codecs/test_framework/test_framework.gypi b/src/modules/video_coding/codecs/test_framework/test_framework.gypi
index 00b0ea2..babdfeb 100644
--- a/src/modules/video_coding/codecs/test_framework/test_framework.gypi
+++ b/src/modules/video_coding/codecs/test_framework/test_framework.gypi
@@ -15,16 +15,16 @@
           'type': '<(library)',
 
           'dependencies': [
-            '<(third_party_root)/test/metrics.gyp:metrics',
-            '<(third_party_root)/test/test.gyp:test_support',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/metrics.gyp:metrics',
+            '<(webrtc_root)/test/test.gyp:test_support',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
             '<(webrtc_root)/common_video/common_video.gyp:webrtc_libyuv',
           ],
 
           'include_dirs': [
             '../interface',
-            '<(third_party_root)/testing/gtest/include',
+            '<(DEPTH)/testing/gtest/include',
             '../../../../common_video/interface',
           ],
 
diff --git a/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi b/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi
index 5442dc6..f7f088a 100644
--- a/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi
+++ b/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi
@@ -17,8 +17,8 @@
             'video_codecs_test_framework',
             'webrtc_video_coding',
             'webrtc_vp8',
-            '<(third_party_root)/test/metrics.gyp:metrics',
-            '<(third_party_root)/third_party/google-gflags/google-gflags.gyp:google-gflags',
+            '<(webrtc_root)/test/metrics.gyp:metrics',
+            '<(DEPTH)/third_party/google-gflags/google-gflags.gyp:google-gflags',
            ],
            'sources': [
              'video_quality_measurement.cc',
diff --git a/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi b/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi
index db939ec..5dd454d 100644
--- a/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi
+++ b/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi
@@ -24,14 +24,14 @@
       'conditions': [
         ['build_with_chromium==1', {
           'dependencies': [
-            '<(third_party_root)/libvpx/libvpx.gyp:libvpx',
+            '<(DEPTH)/libvpx/libvpx.gyp:libvpx',
           ],
           'defines': [
             'WEBRTC_LIBVPX_VERSION=960' # Bali
           ],
         },{
           'dependencies': [
-            '<(third_party_root)/third_party/libvpx/libvpx.gyp:libvpx',
+            '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
           ],
           'defines': [
             'WEBRTC_LIBVPX_VERSION=971' # Cayuga
@@ -69,9 +69,9 @@
             'webrtc_vp8',
             '<(webrtc_root)/common_video/common_video.gyp:webrtc_libyuv',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/test/test.gyp:test_support',
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
           ],
          'sources': [
             # header files
@@ -96,13 +96,13 @@
           'target_name': 'vp8_unittests',
           'type': 'executable',
           'dependencies': [
-            '<(third_party_root)/test/test.gyp:test_support_main',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/third_party/libvpx/libvpx.gyp:libvpx',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
             'webrtc_vp8',
           ],
           'include_dirs': [
-            '<(third_party_root)/third_party/libvpx/source/libvpx',
+            '<(DEPTH)/third_party/libvpx/source/libvpx',
           ],
           'sources': [
             'reference_picture_selection_unittest.cc',
diff --git a/src/modules/video_coding/main/source/video_coding_test.gypi b/src/modules/video_coding/main/source/video_coding_test.gypi
index 144ec6c..e95489c 100644
--- a/src/modules/video_coding/main/source/video_coding_test.gypi
+++ b/src/modules/video_coding/main/source/video_coding_test.gypi
@@ -11,9 +11,9 @@
       'target_name': 'video_coding_test',
       'type': 'executable',
       'dependencies': [
-         '<(third_party_root)/testing/gtest.gyp:gtest',
-         '<(third_party_root)/test/test.gyp:test_support',
-         '<(third_party_root)/test/metrics.gyp:metrics',
+         '<(DEPTH)/testing/gtest.gyp:gtest',
+         '<(webrtc_root)/test/test.gyp:test_support',
+         '<(webrtc_root)/test/metrics.gyp:metrics',
          'webrtc_video_coding',
          'rtp_rtcp',
          'webrtc_utility',
@@ -68,9 +68,9 @@
       'type': 'executable',
       'dependencies': [
         'webrtc_video_coding',
-        '<(third_party_root)/test/test.gyp:test_support_main',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
-        '<(third_party_root)/testing/gmock.gyp:gmock',
+        '<(webrtc_root)/test/test.gyp:test_support_main',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(DEPTH)/testing/gmock.gyp:gmock',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
       ],
       'include_dirs': [
diff --git a/src/modules/video_processing/main/test/vpm_tests.gypi b/src/modules/video_processing/main/test/vpm_tests.gypi
index be5267e..0888b1d 100644
--- a/src/modules/video_processing/main/test/vpm_tests.gypi
+++ b/src/modules/video_processing/main/test/vpm_tests.gypi
@@ -14,8 +14,8 @@
       'dependencies': [
         'video_processing',
         'webrtc_utility',
-        '<(third_party_root)/test/test.gyp:test_support_main',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support_main',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
       ],
       'sources': [
         # headers
diff --git a/src/system_wrappers/source/system_wrappers.gyp b/src/system_wrappers/source/system_wrappers.gyp
index bda3494..b530d6f 100644
--- a/src/system_wrappers/source/system_wrappers.gyp
+++ b/src/system_wrappers/source/system_wrappers.gyp
@@ -181,8 +181,8 @@
           'type': 'executable',
           'dependencies': [
             'system_wrappers',
-            '<(webrtc_root)/../testing/gtest.gyp:gtest',
-            '<(webrtc_root)/../test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'sources': [
             'condition_variable_unittest.cc',
diff --git a/test/OWNERS b/src/test/OWNERS
similarity index 100%
rename from test/OWNERS
rename to src/test/OWNERS
diff --git a/test/linux/v4l2_file_player/Makefile b/src/test/linux/v4l2_file_player/Makefile
similarity index 100%
rename from test/linux/v4l2_file_player/Makefile
rename to src/test/linux/v4l2_file_player/Makefile
diff --git a/test/linux/v4l2_file_player/README b/src/test/linux/v4l2_file_player/README
similarity index 100%
rename from test/linux/v4l2_file_player/README
rename to src/test/linux/v4l2_file_player/README
diff --git a/test/linux/v4l2_file_player/v4l2_file_player.c b/src/test/linux/v4l2_file_player/v4l2_file_player.c
similarity index 100%
rename from test/linux/v4l2_file_player/v4l2_file_player.c
rename to src/test/linux/v4l2_file_player/v4l2_file_player.c
diff --git a/test/manual/README b/src/test/manual/README
similarity index 100%
rename from test/manual/README
rename to src/test/manual/README
diff --git a/test/manual/audio-and-video.html b/src/test/manual/audio-and-video.html
similarity index 100%
rename from test/manual/audio-and-video.html
rename to src/test/manual/audio-and-video.html
diff --git a/test/manual/iframe-video.html b/src/test/manual/iframe-video.html
similarity index 100%
rename from test/manual/iframe-video.html
rename to src/test/manual/iframe-video.html
diff --git a/test/manual/multiple-audio.html b/src/test/manual/multiple-audio.html
similarity index 100%
rename from test/manual/multiple-audio.html
rename to src/test/manual/multiple-audio.html
diff --git a/test/manual/multiple-video.html b/src/test/manual/multiple-video.html
similarity index 100%
rename from test/manual/multiple-video.html
rename to src/test/manual/multiple-video.html
diff --git a/test/manual/single-audio.html b/src/test/manual/single-audio.html
similarity index 100%
rename from test/manual/single-audio.html
rename to src/test/manual/single-audio.html
diff --git a/test/manual/single-video.html b/src/test/manual/single-video.html
similarity index 100%
rename from test/manual/single-video.html
rename to src/test/manual/single-video.html
diff --git a/test/manual/two-video-devices.html b/src/test/manual/two-video-devices.html
similarity index 100%
rename from test/manual/two-video-devices.html
rename to src/test/manual/two-video-devices.html
diff --git a/test/metrics.gyp b/src/test/metrics.gyp
similarity index 90%
rename from test/metrics.gyp
rename to src/test/metrics.gyp
index 70483f9..11573ae 100644
--- a/test/metrics.gyp
+++ b/src/test/metrics.gyp
@@ -8,7 +8,7 @@
 
 {
   'includes': [
-    '../src/build/common.gypi',
+    '../build/common.gypi',
   ],
   'targets': [
     {
@@ -35,8 +35,8 @@
       'type': 'executable',
       'dependencies': [
         'metrics',
-        '<(webrtc_root)/../test/test.gyp:test_support_main',
-        '<(webrtc_root)/../testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support_main',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
       ],
       'sources': [
         'testsupport/metrics/video_metrics_unittest.cc',
diff --git a/test/run_all_unittests.cc b/src/test/run_all_unittests.cc
similarity index 100%
rename from test/run_all_unittests.cc
rename to src/test/run_all_unittests.cc
diff --git a/test/test.gyp b/src/test/test.gyp
similarity index 91%
rename from test/test.gyp
rename to src/test/test.gyp
index b428bf3..99e9239 100644
--- a/test/test.gyp
+++ b/src/test/test.gyp
@@ -9,7 +9,7 @@
 # TODO(andrew): consider moving test_support to src/base/test.
 {
   'includes': [
-    '../src/build/common.gypi',
+    '../build/common.gypi',
   ],
   'targets': [
     {
@@ -24,8 +24,8 @@
         ],
       },
       'dependencies': [
-        '<(webrtc_root)/../testing/gtest.gyp:gtest',
-        '<(webrtc_root)/../testing/gmock.gyp:gmock',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(DEPTH)/testing/gmock.gyp:gmock',
       ],
       'all_dependent_settings': {
         'include_dirs': [
@@ -65,7 +65,7 @@
       'type': 'executable',
       'dependencies': [
         'test_support_main',
-        '<(webrtc_root)/../testing/gtest.gyp:gtest',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
       ],
       'sources': [
         'testsupport/unittest_utils.h',
diff --git a/test/test_suite.cc b/src/test/test_suite.cc
similarity index 100%
rename from test/test_suite.cc
rename to src/test/test_suite.cc
diff --git a/test/test_suite.h b/src/test/test_suite.h
similarity index 100%
rename from test/test_suite.h
rename to src/test/test_suite.h
diff --git a/test/testsupport/fileutils.cc b/src/test/testsupport/fileutils.cc
similarity index 100%
rename from test/testsupport/fileutils.cc
rename to src/test/testsupport/fileutils.cc
diff --git a/test/testsupport/fileutils.h b/src/test/testsupport/fileutils.h
similarity index 100%
rename from test/testsupport/fileutils.h
rename to src/test/testsupport/fileutils.h
diff --git a/test/testsupport/fileutils_unittest.cc b/src/test/testsupport/fileutils_unittest.cc
similarity index 100%
rename from test/testsupport/fileutils_unittest.cc
rename to src/test/testsupport/fileutils_unittest.cc
diff --git a/test/testsupport/frame_reader.cc b/src/test/testsupport/frame_reader.cc
similarity index 100%
rename from test/testsupport/frame_reader.cc
rename to src/test/testsupport/frame_reader.cc
diff --git a/test/testsupport/frame_reader.h b/src/test/testsupport/frame_reader.h
similarity index 100%
rename from test/testsupport/frame_reader.h
rename to src/test/testsupport/frame_reader.h
diff --git a/test/testsupport/frame_reader_unittest.cc b/src/test/testsupport/frame_reader_unittest.cc
similarity index 100%
rename from test/testsupport/frame_reader_unittest.cc
rename to src/test/testsupport/frame_reader_unittest.cc
diff --git a/test/testsupport/frame_writer.cc b/src/test/testsupport/frame_writer.cc
similarity index 100%
rename from test/testsupport/frame_writer.cc
rename to src/test/testsupport/frame_writer.cc
diff --git a/test/testsupport/frame_writer.h b/src/test/testsupport/frame_writer.h
similarity index 100%
rename from test/testsupport/frame_writer.h
rename to src/test/testsupport/frame_writer.h
diff --git a/test/testsupport/frame_writer_unittest.cc b/src/test/testsupport/frame_writer_unittest.cc
similarity index 100%
rename from test/testsupport/frame_writer_unittest.cc
rename to src/test/testsupport/frame_writer_unittest.cc
diff --git a/test/testsupport/gtest_prod_util.h b/src/test/testsupport/gtest_prod_util.h
similarity index 100%
rename from test/testsupport/gtest_prod_util.h
rename to src/test/testsupport/gtest_prod_util.h
diff --git a/test/testsupport/metrics/video_metrics.cc b/src/test/testsupport/metrics/video_metrics.cc
similarity index 100%
rename from test/testsupport/metrics/video_metrics.cc
rename to src/test/testsupport/metrics/video_metrics.cc
diff --git a/test/testsupport/metrics/video_metrics.h b/src/test/testsupport/metrics/video_metrics.h
similarity index 100%
rename from test/testsupport/metrics/video_metrics.h
rename to src/test/testsupport/metrics/video_metrics.h
diff --git a/test/testsupport/metrics/video_metrics_unittest.cc b/src/test/testsupport/metrics/video_metrics_unittest.cc
similarity index 100%
rename from test/testsupport/metrics/video_metrics_unittest.cc
rename to src/test/testsupport/metrics/video_metrics_unittest.cc
diff --git a/test/testsupport/mock/mock_frame_reader.h b/src/test/testsupport/mock/mock_frame_reader.h
similarity index 100%
rename from test/testsupport/mock/mock_frame_reader.h
rename to src/test/testsupport/mock/mock_frame_reader.h
diff --git a/test/testsupport/mock/mock_frame_writer.h b/src/test/testsupport/mock/mock_frame_writer.h
similarity index 100%
rename from test/testsupport/mock/mock_frame_writer.h
rename to src/test/testsupport/mock/mock_frame_writer.h
diff --git a/test/testsupport/packet_reader.cc b/src/test/testsupport/packet_reader.cc
similarity index 100%
rename from test/testsupport/packet_reader.cc
rename to src/test/testsupport/packet_reader.cc
diff --git a/test/testsupport/packet_reader.h b/src/test/testsupport/packet_reader.h
similarity index 100%
rename from test/testsupport/packet_reader.h
rename to src/test/testsupport/packet_reader.h
diff --git a/test/testsupport/packet_reader_unittest.cc b/src/test/testsupport/packet_reader_unittest.cc
similarity index 100%
rename from test/testsupport/packet_reader_unittest.cc
rename to src/test/testsupport/packet_reader_unittest.cc
diff --git a/test/testsupport/unittest_utils.h b/src/test/testsupport/unittest_utils.h
similarity index 100%
rename from test/testsupport/unittest_utils.h
rename to src/test/testsupport/unittest_utils.h
diff --git a/src/video_engine/test/auto_test/vie_auto_test.gypi b/src/video_engine/test/auto_test/vie_auto_test.gypi
index af73138..8df69e2 100644
--- a/src/video_engine/test/auto_test/vie_auto_test.gypi
+++ b/src/video_engine/test/auto_test/vie_auto_test.gypi
@@ -16,10 +16,10 @@
         '<(webrtc_root)/modules/modules.gyp:video_render_module',
         '<(webrtc_root)/modules/modules.gyp:video_capture_module',
         '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine_core',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
-        '<(third_party_root)/third_party/google-gflags/google-gflags.gyp:google-gflags',
-        '<(third_party_root)/test/metrics.gyp:metrics',
-        '<(third_party_root)/test/test.gyp:test_support',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(DEPTH)/third_party/google-gflags/google-gflags.gyp:google-gflags',
+        '<(webrtc_root)/test/metrics.gyp:metrics',
+        '<(webrtc_root)/test/test.gyp:test_support',
         '<(webrtc_root)/test/libtest/libtest.gyp:libtest',
         'video_engine_core',
         'libvietest',
diff --git a/src/video_engine/test/libvietest/libvietest.gypi b/src/video_engine/test/libvietest/libvietest.gypi
index 9fed0f1..562bdbe 100644
--- a/src/video_engine/test/libvietest/libvietest.gypi
+++ b/src/video_engine/test/libvietest/libvietest.gypi
@@ -12,8 +12,8 @@
       'type': '<(library)',
       'dependencies': [
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
-        '<(third_party_root)/test/test.gyp:test_support',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support',
         'video_engine_core',
       ],
       'direct_dependent_settings': {
diff --git a/src/video_engine/video_engine_core.gypi b/src/video_engine/video_engine_core.gypi
index a3e9754..cf4a1ec 100644
--- a/src/video_engine/video_engine_core.gypi
+++ b/src/video_engine/video_engine_core.gypi
@@ -138,9 +138,9 @@
           'type': 'executable',
           'dependencies': [
             'video_engine_core',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/testing/gmock.gyp:gmock',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(DEPTH)/testing/gmock.gyp:gmock',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
           ],
           'include_dirs': [
             '..',
diff --git a/src/voice_engine/main/source/voice_engine_core.gypi b/src/voice_engine/main/source/voice_engine_core.gypi
index 4e67175..e5f32b7 100644
--- a/src/voice_engine/main/source/voice_engine_core.gypi
+++ b/src/voice_engine/main/source/voice_engine_core.gypi
@@ -120,8 +120,8 @@
           'type': 'executable',
           'dependencies': [
             'voice_engine_core',
-            '<(third_party_root)/testing/gtest.gyp:gtest',
-            '<(third_party_root)/test/test.gyp:test_support_main',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/test/test.gyp:test_support_main',
             # The rest are to satisfy the channel_unittest include chain.
             # This would be unnecessary if we had qualified includes.
             '<(webrtc_root)/common_audio/common_audio.gyp:resampler',
diff --git a/src/voice_engine/main/test/voice_engine_tests.gypi b/src/voice_engine/main/test/voice_engine_tests.gypi
index de93cdd..796530c 100644
--- a/src/voice_engine/main/test/voice_engine_tests.gypi
+++ b/src/voice_engine/main/test/voice_engine_tests.gypi
@@ -15,9 +15,9 @@
       'dependencies': [
         'voice_engine_core',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-        '<(third_party_root)/test/test.gyp:test_support',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
-        '<(third_party_root)/testing/gmock.gyp:gmock',
+        '<(webrtc_root)/test/test.gyp:test_support',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
+        '<(DEPTH)/testing/gmock.gyp:gmock',
         '<(webrtc_root)/test/libtest/libtest.gyp:libtest',
       ],
       'include_dirs': [
@@ -93,8 +93,8 @@
       'target_name': 'voe_cmd_test',
       'type': 'executable',
       'dependencies': [
-        '<(third_party_root)/test/test.gyp:test_support',
-        '<(third_party_root)/testing/gtest.gyp:gtest',
+        '<(webrtc_root)/test/test.gyp:test_support',
+        '<(DEPTH)/testing/gtest.gyp:gtest',
         'voice_engine_core',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
       ],
@@ -113,7 +113,7 @@
           'dependencies': [
             'voice_engine_core',
             '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-            '<(third_party_root)/test/test.gyp:test_support',
+            '<(webrtc_root)/test/test.gyp:test_support',
           ],
           'include_dirs': [
             'win_test',
diff --git a/webrtc.gyp b/webrtc.gyp
index 38e57b1..18feac0 100644
--- a/webrtc.gyp
+++ b/webrtc.gyp
@@ -19,8 +19,8 @@
         'src/system_wrappers/source/system_wrappers.gyp:*',
         'src/video_engine/video_engine.gyp:*',
         'src/voice_engine/voice_engine.gyp:*',
-        'test/metrics.gyp:*',
-        'test/test.gyp:*',
+        'src/test/metrics.gyp:*',
+        'src/test/test.gyp:*',
         'tools/e2e_quality/e2e_quality.gyp:*',
       ],
     },