mojo/public: Include gtest.h as "gtest/gtest.h", instead of via "absolute" path.

* This allows one to put gtest in other places (e.g., as in the fuchsia
  mojo repo).
* Thus this allows merges to the fuchsia mojo repo to happen much more
  cleanly. (I.e., nearly all files will be unchanged.)
* Why does this necessarily work? gtest.h itself includes other things
  in gtest's |include| directory in the same way, so gtest's |include|
  directory better be in the include path whenever gtest is used.
* Why "gtest/gtest.h" and not <gtest/gtest.h>? i. It's not a system
  header. ii. It's not a C header (which all other .h files included
  using <...> are). iii. It's the way gtest (in particular gtest.h)
  itself includes its own headers.

Also, make a "forwarding" //mojo/public:gtest target, so that other
things in //mojo/public can use gtest without needing to know directly
where gtest is. (This again simplifies merges to the fuchsia mojo repo,
as well as making it easier to consume/build the public tests from
elsewhere.)

R=vardhan@google.com

Review URL: https://codereview.chromium.org/2244503002 .

Cr-Mirrored-From: https://github.com/domokit/mojo
Cr-Mirrored-Commit: dddc0e5845959fe485ec11fc94bfecc4a4807562
diff --git a/BUILD.gn b/BUILD.gn
index 1de956f..4c9bb3d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -56,3 +56,13 @@
     ":sdk",
   ]
 }
+
+# "Forwarding" target, to make it easy to put gtest wherever you want.
+# TODO(vtl): Maybe this should be parametrized and made into
+# //build/module_args/mojo.gni (but maybe that's overkill).
+group("gtest") {
+  testonly = true
+  public_deps = [
+    "//testing/gtest",
+  ]
+}
diff --git a/c/BUILD.gn b/c/BUILD.gn
index 43c4470..8975441 100644
--- a/c/BUILD.gn
+++ b/c/BUILD.gn
@@ -74,10 +74,10 @@
 
   deps = [
     ":bindings",
-    "//testing/gtest",
   ]
 
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
     "mojo/public/cpp/bindings/tests:validation_util",
     "mojo/public/cpp/test_support",
@@ -114,8 +114,9 @@
 
   deps = [
     ":common",
-    "//testing/gtest",
   ]
+
+  mojo_sdk_deps = [ "mojo/public:gtest" ]
 }
 
 # environment ------------------------------------------------------------------
@@ -300,8 +301,9 @@
 
   deps = [
     ":system",
-    "//testing/gtest",
   ]
+
+  mojo_sdk_deps = [ "mojo/public:gtest" ]
 }
 
 mojo_sdk_source_set("system_perftests") {
@@ -317,10 +319,12 @@
 
   deps = [
     ":system",
-    "//testing/gtest",
   ]
 
-  mojo_sdk_deps = [ "mojo/public/cpp/test_support" ]
+  mojo_sdk_deps = [
+    "mojo/public:gtest",
+    "mojo/public/cpp/test_support",
+  ]
 }
 
 # Compilation tests ------------------------------------------------------------
@@ -335,8 +339,9 @@
 
   deps = [
     ":pure_compile_tests",
-    "//testing/gtest",
   ]
+
+  mojo_sdk_deps = [ "mojo/public:gtest" ]
 }
 
 # This source set contains "pure" tests that only depend on the public SDK (and
diff --git a/c/tests/bindings/array_unittest.cc b/c/tests/bindings/array_unittest.cc
index 7ac2494..634633d 100644
--- a/c/tests/bindings/array_unittest.cc
+++ b/c/tests/bindings/array_unittest.cc
@@ -9,11 +9,11 @@
 #include <mojo/bindings/struct.h>
 #include <stddef.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/bindings/testing_util.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/bindings/buffer_unittest.cc b/c/tests/bindings/buffer_unittest.cc
index aa95a78..ff38b25 100644
--- a/c/tests/bindings/buffer_unittest.cc
+++ b/c/tests/bindings/buffer_unittest.cc
@@ -6,7 +6,7 @@
 
 #include <stdint.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/bindings/message_unittest.cc b/c/tests/bindings/message_unittest.cc
index ba32804..2639cd9 100644
--- a/c/tests/bindings/message_unittest.cc
+++ b/c/tests/bindings/message_unittest.cc
@@ -9,9 +9,9 @@
 #include <string>
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/tests/validation_test_input_parser.h"
 #include "mojo/public/cpp/system/macros.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/bindings/struct_unittest.cc b/c/tests/bindings/struct_unittest.cc
index 33f122d..8df7032 100644
--- a/c/tests/bindings/struct_unittest.cc
+++ b/c/tests/bindings/struct_unittest.cc
@@ -10,12 +10,12 @@
 #include <mojo/bindings/internal/util.h>
 #include <string.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/bindings/testing_util.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/interfaces/bindings/tests/rect.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/bindings/testing_util.h b/c/tests/bindings/testing_util.h
index 6d276c1..ca08ebb 100644
--- a/c/tests/bindings/testing_util.h
+++ b/c/tests/bindings/testing_util.h
@@ -11,7 +11,7 @@
 #include <stdint.h>
 #include <string.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 // This will copy the supplied |in_struct| and compare it against the new
 // copy, expecting them to be the same. It compares the encoded version to be
diff --git a/c/tests/bindings/union_unittest.cc b/c/tests/bindings/union_unittest.cc
index a434ba8..64a13af 100644
--- a/c/tests/bindings/union_unittest.cc
+++ b/c/tests/bindings/union_unittest.cc
@@ -8,10 +8,10 @@
 
 #include <mojo/bindings/array.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/bindings/testing_util.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/bindings/validation_unittest.cc b/c/tests/bindings/validation_unittest.cc
index 1d1ee43..9dbc5c3 100644
--- a/c/tests/bindings/validation_unittest.cc
+++ b/c/tests/bindings/validation_unittest.cc
@@ -14,11 +14,11 @@
 #include <functional>
 #include <string>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/tests/validation_util.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/test_support/test_support.h"
 #include "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom-c.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 using mojo::test::EnumerateSourceRootRelativeDirectory;
 
diff --git a/c/tests/compile/compile_unittest.cc b/c/tests/compile/compile_unittest.cc
index 3160edb..ca1c907 100644
--- a/c/tests/compile/compile_unittest.cc
+++ b/c/tests/compile/compile_unittest.cc
@@ -7,7 +7,7 @@
 // mojo/public/c/include/mojo/environment, mojo/public/c/include/mojo/system
 // (and the C standard library), and not using gtest.
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 // Defined in compile_unittest_pure_c.c.
 extern "C" const char* MinimalCTest(void);
diff --git a/c/tests/macros_unittest.cc b/c/tests/macros_unittest.cc
index 45ef6bc..6619e4d 100644
--- a/c/tests/macros_unittest.cc
+++ b/c/tests/macros_unittest.cc
@@ -14,7 +14,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/c/tests/result_unittest.cc b/c/tests/result_unittest.cc
index 78684cc..cb16dfe 100644
--- a/c/tests/result_unittest.cc
+++ b/c/tests/result_unittest.cc
@@ -7,7 +7,7 @@
 
 #include <mojo/result.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/buffer_unittest.cc b/c/tests/system/buffer_unittest.cc
index 6e1619f..2a2ed57 100644
--- a/c/tests/system/buffer_unittest.cc
+++ b/c/tests/system/buffer_unittest.cc
@@ -10,7 +10,7 @@
 #include <mojo/result.h>
 #include <mojo/system/handle.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/data_pipe_unittest.cc b/c/tests/system/data_pipe_unittest.cc
index 6a85360..409c61f 100644
--- a/c/tests/system/data_pipe_unittest.cc
+++ b/c/tests/system/data_pipe_unittest.cc
@@ -12,7 +12,7 @@
 #include <mojo/system/wait.h>
 #include <string.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/handle_unittest.cc b/c/tests/system/handle_unittest.cc
index a5e3c7f..2fb99da 100644
--- a/c/tests/system/handle_unittest.cc
+++ b/c/tests/system/handle_unittest.cc
@@ -12,7 +12,7 @@
 #include <mojo/result.h>
 #include <mojo/system/message_pipe.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/message_pipe_perftest.cc b/c/tests/system/message_pipe_perftest.cc
index 8701fa8..005b705 100644
--- a/c/tests/system/message_pipe_perftest.cc
+++ b/c/tests/system/message_pipe_perftest.cc
@@ -17,9 +17,9 @@
 
 #include <thread>
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/system/perftest_utils.h"
 #include "mojo/public/cpp/test_support/test_support.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/message_pipe_unittest.cc b/c/tests/system/message_pipe_unittest.cc
index a2a1861..c10c468 100644
--- a/c/tests/system/message_pipe_unittest.cc
+++ b/c/tests/system/message_pipe_unittest.cc
@@ -12,7 +12,7 @@
 #include <mojo/system/handle.h>
 #include <mojo/system/wait.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/reference_perftest.cc b/c/tests/system/reference_perftest.cc
index 7283866..a86c18d 100644
--- a/c/tests/system/reference_perftest.cc
+++ b/c/tests/system/reference_perftest.cc
@@ -5,8 +5,8 @@
 // This provides a reference for comparison of performance versus overhead in
 // perftests.
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/system/perftest_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/time_unittest.cc b/c/tests/system/time_unittest.cc
index cf2fc15..df7bd24 100644
--- a/c/tests/system/time_unittest.cc
+++ b/c/tests/system/time_unittest.cc
@@ -7,7 +7,7 @@
 
 #include <mojo/system/time.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/wait_set_perftest.cc b/c/tests/system/wait_set_perftest.cc
index 96ff026..3d41817 100644
--- a/c/tests/system/wait_set_perftest.cc
+++ b/c/tests/system/wait_set_perftest.cc
@@ -18,9 +18,9 @@
 #include <thread>
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/system/perftest_utils.h"
 #include "mojo/public/cpp/test_support/test_support.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/wait_set_unittest.cc b/c/tests/system/wait_set_unittest.cc
index 1cd6c9c..7149c39 100644
--- a/c/tests/system/wait_set_unittest.cc
+++ b/c/tests/system/wait_set_unittest.cc
@@ -11,7 +11,7 @@
 #include <mojo/system/handle.h>
 #include <mojo/system/message_pipe.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/c/tests/system/wait_unittest.cc b/c/tests/system/wait_unittest.cc
index 33d3676..e09a2cc 100644
--- a/c/tests/system/wait_unittest.cc
+++ b/c/tests/system/wait_unittest.cc
@@ -10,7 +10,7 @@
 #include <mojo/result.h>
 #include <mojo/system/handle.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace {
 
diff --git a/cpp/application/BUILD.gn b/cpp/application/BUILD.gn
index 612cc44..7013df1 100644
--- a/cpp/application/BUILD.gn
+++ b/cpp/application/BUILD.gn
@@ -53,10 +53,10 @@
 
   deps = [
     ":application",
-    "//testing/gtest",
   ]
 
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/cpp/bindings",
     "mojo/public/cpp/environment",
     "mojo/public/cpp/system",
diff --git a/cpp/application/application_test_base.h b/cpp/application/application_test_base.h
index a81119e..fc3dbc8 100644
--- a/cpp/application/application_test_base.h
+++ b/cpp/application/application_test_base.h
@@ -8,12 +8,12 @@
 #include <string>
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/string.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/interfaces/application/application.mojom.h"
 #include "mojo/public/interfaces/application/shell.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/application/tests/BUILD.gn b/cpp/application/tests/BUILD.gn
index 529e612..190f742 100644
--- a/cpp/application/tests/BUILD.gn
+++ b/cpp/application/tests/BUILD.gn
@@ -11,11 +11,8 @@
     "service_provider_impl_unittest.cc",
   ]
 
-  deps = [
-    "//testing/gtest",
-  ]
-
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/cpp/application:standalone",
     "mojo/public/cpp/bindings",
     "mojo/public/cpp/environment:standalone",
diff --git a/cpp/application/tests/service_provider_impl_unittest.cc b/cpp/application/tests/service_provider_impl_unittest.cc
index fb42758..39a9c75 100644
--- a/cpp/application/tests/service_provider_impl_unittest.cc
+++ b/cpp/application/tests/service_provider_impl_unittest.cc
@@ -6,13 +6,13 @@
 
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/application/connect.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/application/service_provider.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/bindings/tests/BUILD.gn b/cpp/bindings/tests/BUILD.gn
index 6405354..ece351b 100644
--- a/cpp/bindings/tests/BUILD.gn
+++ b/cpp/bindings/tests/BUILD.gn
@@ -49,10 +49,10 @@
   deps = [
     ":mojo_public_bindings_test_utils",
     ":validation_util",
-    "//testing/gtest",
   ]
 
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/cpp/bindings",
     "mojo/public/cpp/bindings:callback",
     "mojo/public/cpp/environment:standalone",
@@ -72,11 +72,8 @@
     "bindings_perftest.cc",
   ]
 
-  deps = [
-    "//testing/gtest",
-  ]
-
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/cpp/bindings",
     "mojo/public/cpp/bindings:callback",
     "mojo/public/cpp/environment:standalone",
@@ -105,11 +102,13 @@
     "validation_util.h",
   ]
 
-  mojo_sdk_deps = [ "mojo/public/cpp/test_support" ]
-
   deps = [
     ":mojo_public_bindings_test_utils",
-    "//testing/gtest",
+  ]
+
+  mojo_sdk_deps = [
+    "mojo/public:gtest",
+    "mojo/public/cpp/test_support",
   ]
 }
 
diff --git a/cpp/bindings/tests/array_unittest.cc b/cpp/bindings/tests/array_unittest.cc
index 820331c..8f44584 100644
--- a/cpp/bindings/tests/array_unittest.cc
+++ b/cpp/bindings/tests/array_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/lib/array_internal.h"
 #include "mojo/public/cpp/bindings/lib/array_serialization.h"
@@ -10,7 +11,6 @@
 #include "mojo/public/cpp/bindings/tests/iterator_test_util.h"
 #include "mojo/public/interfaces/bindings/tests/test_arrays.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/binding_callback_unittest.cc b/cpp/bindings/tests/binding_callback_unittest.cc
index 44a8150..ab72154 100644
--- a/cpp/bindings/tests/binding_callback_unittest.cc
+++ b/cpp/bindings/tests/binding_callback_unittest.cc
@@ -3,13 +3,13 @@
 // found in the LICENSE file.
 
 #include "build/build_config.h"
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_ptr.h"
 #include "mojo/public/cpp/bindings/string.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 ///////////////////////////////////////////////////////////////////////////////
 //
diff --git a/cpp/bindings/tests/binding_set_unittest.cc b/cpp/bindings/tests/binding_set_unittest.cc
index aae49d8..49edc47 100644
--- a/cpp/bindings/tests/binding_set_unittest.cc
+++ b/cpp/bindings/tests/binding_set_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "mojo/public/cpp/bindings/binding_set.h"
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/minimal_interface.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/bindings/tests/binding_unittest.cc b/cpp/bindings/tests/binding_unittest.cc
index f47e70a..4e75755 100644
--- a/cpp/bindings/tests/binding_unittest.cc
+++ b/cpp/bindings/tests/binding_unittest.cc
@@ -5,13 +5,13 @@
 // Note: This file tests both binding.h (mojo::Binding) and strong_binding.h
 // (mojo::StrongBinding).
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/bindings/tests/bindings_perftest.cc b/cpp/bindings/tests/bindings_perftest.cc
index 3655498..7cbde8a 100644
--- a/cpp/bindings/tests/bindings_perftest.cc
+++ b/cpp/bindings/tests/bindings_perftest.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/test_support/test_support.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/bindings/tests/bounds_checker_unittest.cc b/cpp/bindings/tests/bounds_checker_unittest.cc
index ce60645..55112ed 100644
--- a/cpp/bindings/tests/bounds_checker_unittest.cc
+++ b/cpp/bindings/tests/bounds_checker_unittest.cc
@@ -4,10 +4,10 @@
 
 #include <limits>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
 #include "mojo/public/cpp/bindings/lib/bounds_checker.h"
 #include "mojo/public/cpp/system/handle.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/buffer_unittest.cc b/cpp/bindings/tests/buffer_unittest.cc
index 96acdd9..b8e9a7c 100644
--- a/cpp/bindings/tests/buffer_unittest.cc
+++ b/cpp/bindings/tests/buffer_unittest.cc
@@ -4,9 +4,9 @@
 
 #include <limits>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/callback_unittest.cc b/cpp/bindings/tests/callback_unittest.cc
index a423090..25c8998 100644
--- a/cpp/bindings/tests/callback_unittest.cc
+++ b/cpp/bindings/tests/callback_unittest.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/callback.h"
 #include "mojo/public/cpp/bindings/map.h"
 #include "mojo/public/cpp/bindings/string.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/connector_unittest.cc b/cpp/bindings/tests/connector_unittest.cc
index 7d49d73..5e34143 100644
--- a/cpp/bindings/tests/connector_unittest.cc
+++ b/cpp/bindings/tests/connector_unittest.cc
@@ -7,13 +7,13 @@
 
 #include <string>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/connector.h"
 #include "mojo/public/cpp/bindings/lib/message_builder.h"
 #include "mojo/public/cpp/bindings/tests/message_queue.h"
 #include "mojo/public/cpp/environment/logging.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/constant_unittest.cc b/cpp/bindings/tests/constant_unittest.cc
index f6394f3..bb94aac 100644
--- a/cpp/bindings/tests/constant_unittest.cc
+++ b/cpp/bindings/tests/constant_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/interfaces/bindings/tests/test_constants.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/equals_unittest.cc b/cpp/bindings/tests/equals_unittest.cc
index efac86b..3468a2c 100644
--- a/cpp/bindings/tests/equals_unittest.cc
+++ b/cpp/bindings/tests/equals_unittest.cc
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/formatting_unittest.cc b/cpp/bindings/tests/formatting_unittest.cc
index 9082243..4978af9 100644
--- a/cpp/bindings/tests/formatting_unittest.cc
+++ b/cpp/bindings/tests/formatting_unittest.cc
@@ -4,11 +4,11 @@
 
 #include <sstream>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/formatting.h"
 #include "mojo/public/cpp/bindings/map.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/handle_passing_unittest.cc b/cpp/bindings/tests/handle_passing_unittest.cc
index ca11052..b13d2da 100644
--- a/cpp/bindings/tests/handle_passing_unittest.cc
+++ b/cpp/bindings/tests/handle_passing_unittest.cc
@@ -4,12 +4,12 @@
 
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/sample_factory.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/interface_ptr_set_unittest.cc b/cpp/bindings/tests/interface_ptr_set_unittest.cc
index c27aba1..adcc306 100644
--- a/cpp/bindings/tests/interface_ptr_set_unittest.cc
+++ b/cpp/bindings/tests/interface_ptr_set_unittest.cc
@@ -4,11 +4,11 @@
 
 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/minimal_interface.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace common {
diff --git a/cpp/bindings/tests/interface_ptr_unittest.cc b/cpp/bindings/tests/interface_ptr_unittest.cc
index dbe5f29..151a144 100644
--- a/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/utility/run_loop.h"
@@ -11,7 +12,6 @@
 #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/scoping.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/interface_unittest.cc b/cpp/bindings/tests/interface_unittest.cc
index f650df6..68fc6b8 100644
--- a/cpp/bindings/tests/interface_unittest.cc
+++ b/cpp/bindings/tests/interface_unittest.cc
@@ -4,8 +4,8 @@
 
 #include <memory>
 
+#include "gtest/gtest.h"
 #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 using sample::SampleInterface;
 using sample::SampleInterface_SampleMethod1_Params;
diff --git a/cpp/bindings/tests/iterator_test_util.h b/cpp/bindings/tests/iterator_test_util.h
index ffe23bb..ce52529 100644
--- a/cpp/bindings/tests/iterator_test_util.h
+++ b/cpp/bindings/tests/iterator_test_util.h
@@ -8,7 +8,7 @@
 #include <algorithm>
 #include <vector>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/iterator_util_unittest.cc b/cpp/bindings/tests/iterator_util_unittest.cc
index 469816c..e8b1fe8 100644
--- a/cpp/bindings/tests/iterator_util_unittest.cc
+++ b/cpp/bindings/tests/iterator_util_unittest.cc
@@ -4,10 +4,10 @@
 
 #include <algorithm>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/iterator_util.h"
 #include "mojo/public/cpp/bindings/map.h"
 #include "mojo/public/cpp/bindings/tests/iterator_test_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/map_unittest.cc b/cpp/bindings/tests/map_unittest.cc
index 5488c95..e69192f 100644
--- a/cpp/bindings/tests/map_unittest.cc
+++ b/cpp/bindings/tests/map_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/lib/array_serialization.h"
 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
@@ -12,7 +13,6 @@
 #include "mojo/public/cpp/bindings/string.h"
 #include "mojo/public/cpp/bindings/tests/container_test_util.h"
 #include "mojo/public/interfaces/bindings/tests/rect.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/message_builder_unittest.cc b/cpp/bindings/tests/message_builder_unittest.cc
index 19202ba..14c0902 100644
--- a/cpp/bindings/tests/message_builder_unittest.cc
+++ b/cpp/bindings/tests/message_builder_unittest.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
 #include "mojo/public/cpp/bindings/lib/message_builder.h"
 #include "mojo/public/cpp/bindings/lib/message_internal.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/request_response_unittest.cc b/cpp/bindings/tests/request_response_unittest.cc
index 0a003d1..9034a65 100644
--- a/cpp/bindings/tests/request_response_unittest.cc
+++ b/cpp/bindings/tests/request_response_unittest.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/sample_import.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/router_unittest.cc b/cpp/bindings/tests/router_unittest.cc
index c5ea103..c5b006d 100644
--- a/cpp/bindings/tests/router_unittest.cc
+++ b/cpp/bindings/tests/router_unittest.cc
@@ -5,12 +5,12 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/message_builder.h"
 #include "mojo/public/cpp/bindings/lib/router.h"
 #include "mojo/public/cpp/bindings/tests/message_queue.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/sample_service_unittest.cc b/cpp/bindings/tests/sample_service_unittest.cc
index 31d829e..dec83b8 100644
--- a/cpp/bindings/tests/sample_service_unittest.cc
+++ b/cpp/bindings/tests/sample_service_unittest.cc
@@ -7,9 +7,9 @@
 #include <string>
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/interfaces/bindings/tests/sample_service.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 
diff --git a/cpp/bindings/tests/serialization_api_unittest.cc b/cpp/bindings/tests/serialization_api_unittest.cc
index 754f68f..5fc8852 100644
--- a/cpp/bindings/tests/serialization_api_unittest.cc
+++ b/cpp/bindings/tests/serialization_api_unittest.cc
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/lib/array_serialization.h"
 #include "mojo/public/cpp/bindings/lib/validation_errors.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "mojo/public/interfaces/bindings/tests/rect.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/serialization_warning_unittest.cc b/cpp/bindings/tests/serialization_warning_unittest.cc
index fe5d393..71753f1 100644
--- a/cpp/bindings/tests/serialization_warning_unittest.cc
+++ b/cpp/bindings/tests/serialization_warning_unittest.cc
@@ -5,6 +5,7 @@
 // Serialization warnings are only recorded in debug build.
 #ifndef NDEBUG
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/lib/array_internal.h"
 #include "mojo/public/cpp/bindings/lib/array_serialization.h"
@@ -13,7 +14,6 @@
 #include "mojo/public/cpp/bindings/string.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/string_unittest.cc b/cpp/bindings/tests/string_unittest.cc
index 4089039..ca0c741 100644
--- a/cpp/bindings/tests/string_unittest.cc
+++ b/cpp/bindings/tests/string_unittest.cc
@@ -4,8 +4,8 @@
 
 #include <sstream>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/string.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/strong_binding_set_unittest.cc b/cpp/bindings/tests/strong_binding_set_unittest.cc
index eeb3636..79fdd07 100644
--- a/cpp/bindings/tests/strong_binding_set_unittest.cc
+++ b/cpp/bindings/tests/strong_binding_set_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "mojo/public/cpp/bindings/strong_binding_set.h"
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/minimal_interface.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace common {
diff --git a/cpp/bindings/tests/struct_unittest.cc b/cpp/bindings/tests/struct_unittest.cc
index 68782b8..29c0b89 100644
--- a/cpp/bindings/tests/struct_unittest.cc
+++ b/cpp/bindings/tests/struct_unittest.cc
@@ -3,13 +3,14 @@
 // found in the LICENSE file.
 
 #include <string.h>
+
 #include <type_traits>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h"
 #include "mojo/public/cpp/bindings/lib/validation_errors.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/synchronous_connector_unittest.cc b/cpp/bindings/tests/synchronous_connector_unittest.cc
index 4ef1ca9..6aa6290 100644
--- a/cpp/bindings/tests/synchronous_connector_unittest.cc
+++ b/cpp/bindings/tests/synchronous_connector_unittest.cc
@@ -5,12 +5,13 @@
 #include "mojo/public/cpp/bindings/lib/synchronous_connector.h"
 
 #include <string.h>
+
 #include <string>
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/lib/message_builder.h"
 #include "mojo/public/cpp/bindings/message.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/synchronous_interface_ptr_unittest.cc b/cpp/bindings/tests/synchronous_interface_ptr_unittest.cc
index db59a6f..9fd364e 100644
--- a/cpp/bindings/tests/synchronous_interface_ptr_unittest.cc
+++ b/cpp/bindings/tests/synchronous_interface_ptr_unittest.cc
@@ -2,21 +2,20 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "mojo/public/cpp/bindings/lib/synchronous_connector.h"
+#include "mojo/public/cpp/bindings/synchronous_interface_ptr.h"
 
 #include <thread>
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/bindings/synchronous_interface_ptr.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/math_calculator.mojom-sync.h"
 #include "mojo/public/interfaces/bindings/tests/math_calculator.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/scoping.mojom-sync.h"
 #include "mojo/public/interfaces/bindings/tests/scoping.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/type_conversion_unittest.cc b/cpp/bindings/tests/type_conversion_unittest.cc
index d5059d5..d30756c 100644
--- a/cpp/bindings/tests/type_conversion_unittest.cc
+++ b/cpp/bindings/tests/type_conversion_unittest.cc
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/environment/environment.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/bindings/tests/union_unittest.cc b/cpp/bindings/tests/union_unittest.cc
index 6f14a1a..d12a5c5 100644
--- a/cpp/bindings/tests/union_unittest.cc
+++ b/cpp/bindings/tests/union_unittest.cc
@@ -5,6 +5,7 @@
 #include <utility>
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/lib/array_internal.h"
@@ -17,7 +18,6 @@
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/bindings/tests/validation_unittest.cc b/cpp/bindings/tests/validation_unittest.cc
index 6c90f0e..cfb93d1 100644
--- a/cpp/bindings/tests/validation_unittest.cc
+++ b/cpp/bindings/tests/validation_unittest.cc
@@ -9,6 +9,7 @@
 #include <utility>
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/interface_ptr.h"
 #include "mojo/public/cpp/bindings/lib/connector.h"
@@ -23,7 +24,6 @@
 #include "mojo/public/cpp/test_support/test_support.h"
 #include "mojo/public/cpp/utility/run_loop.h"
 #include "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 
diff --git a/cpp/bindings/tests/validation_util.cc b/cpp/bindings/tests/validation_util.cc
index 6b01356..a7dd1eb 100644
--- a/cpp/bindings/tests/validation_util.cc
+++ b/cpp/bindings/tests/validation_util.cc
@@ -6,9 +6,9 @@
 
 #include <stdio.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/tests/validation_test_input_parser.h"
 #include "mojo/public/cpp/test_support/test_support.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace test {
diff --git a/cpp/environment/tests/BUILD.gn b/cpp/environment/tests/BUILD.gn
index 2ad2bfd..65a09ed 100644
--- a/cpp/environment/tests/BUILD.gn
+++ b/cpp/environment/tests/BUILD.gn
@@ -14,11 +14,8 @@
     "logging_unittest.cc",
   ]
 
-  deps = [
-    "//testing/gtest",
-  ]
-
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/c:environment",
     "mojo/public/cpp/bindings:callback",
     "mojo/public/cpp/environment:standalone",
@@ -35,11 +32,8 @@
     "run_loop_async_wait_perftest.cc",
   ]
 
-  deps = [
-    "//testing/gtest",
-  ]
-
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/c:environment_perftest_helpers",
     "mojo/public/cpp/environment:standalone",
     "mojo/public/cpp/system",
diff --git a/cpp/environment/tests/async_wait_unittest.cc b/cpp/environment/tests/async_wait_unittest.cc
index e5ba436..069278d 100644
--- a/cpp/environment/tests/async_wait_unittest.cc
+++ b/cpp/environment/tests/async_wait_unittest.cc
@@ -8,13 +8,13 @@
 
 #include <string>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/environment/environment.h"
 #include "mojo/public/cpp/system/handle.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "mojo/public/cpp/utility/run_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/environment/tests/async_waiter_unittest.cc b/cpp/environment/tests/async_waiter_unittest.cc
index 9347450..d46912c 100644
--- a/cpp/environment/tests/async_waiter_unittest.cc
+++ b/cpp/environment/tests/async_waiter_unittest.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/bindings/callback.h"
 #include "mojo/public/cpp/environment/async_waiter.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "mojo/public/cpp/utility/run_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/environment/tests/logger_unittest.cc b/cpp/environment/tests/logger_unittest.cc
index c8bc0b2..bc564d3 100644
--- a/cpp/environment/tests/logger_unittest.cc
+++ b/cpp/environment/tests/logger_unittest.cc
@@ -4,8 +4,8 @@
 
 #include <mojo/environment/logger.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/environment/environment.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/environment/tests/logging_unittest.cc b/cpp/environment/tests/logging_unittest.cc
index e3af7aa..74bafb1 100644
--- a/cpp/environment/tests/logging_unittest.cc
+++ b/cpp/environment/tests/logging_unittest.cc
@@ -7,10 +7,10 @@
 #include <sstream>
 #include <string>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/environment/environment.h"
 #include "mojo/public/cpp/environment/logging.h"
 #include "mojo/public/cpp/system/macros.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/environment/tests/run_loop_async_wait_perftest.cc b/cpp/environment/tests/run_loop_async_wait_perftest.cc
index 8a8dd73..f809a8e 100644
--- a/cpp/environment/tests/run_loop_async_wait_perftest.cc
+++ b/cpp/environment/tests/run_loop_async_wait_perftest.cc
@@ -7,11 +7,11 @@
 
 #include <stdio.h>
 
+#include "gtest/gtest.h"
 #include "mojo/public/c/tests/environment/async_waiter_perftest_helpers.h"
 #include "mojo/public/cpp/environment/environment.h"
 #include "mojo/public/cpp/test_support/test_support.h"
 #include "mojo/public/cpp/utility/run_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/BUILD.gn b/cpp/system/tests/BUILD.gn
index 7d825d6..f1aee05 100644
--- a/cpp/system/tests/BUILD.gn
+++ b/cpp/system/tests/BUILD.gn
@@ -17,9 +17,8 @@
     "wait_unittest.cc",
   ]
 
-  deps = [
-    "//testing/gtest",
+  mojo_sdk_deps = [
+    "mojo/public:gtest",
+    "mojo/public/cpp/system",
   ]
-
-  mojo_sdk_deps = [ "mojo/public/cpp/system" ]
 }
diff --git a/cpp/system/tests/buffer_unittest.cc b/cpp/system/tests/buffer_unittest.cc
index a6feb76..495d268 100644
--- a/cpp/system/tests/buffer_unittest.cc
+++ b/cpp/system/tests/buffer_unittest.cc
@@ -6,7 +6,7 @@
 
 #include "mojo/public/cpp/system/buffer.h"
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/data_pipe_unittest.cc b/cpp/system/tests/data_pipe_unittest.cc
index b75eca0..de30ed9 100644
--- a/cpp/system/tests/data_pipe_unittest.cc
+++ b/cpp/system/tests/data_pipe_unittest.cc
@@ -6,10 +6,10 @@
 
 #include "mojo/public/cpp/system/data_pipe.h"
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/system/handle.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/system/wait.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/handle_unittest.cc b/cpp/system/tests/handle_unittest.cc
index a7174db..6c7bebb 100644
--- a/cpp/system/tests/handle_unittest.cc
+++ b/cpp/system/tests/handle_unittest.cc
@@ -9,9 +9,9 @@
 #include <map>
 #include <utility>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/system/buffer.h"
 #include "mojo/public/cpp/system/macros.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/macros_unittest.cc b/cpp/system/tests/macros_unittest.cc
index 92c3f51..60eb553 100644
--- a/cpp/system/tests/macros_unittest.cc
+++ b/cpp/system/tests/macros_unittest.cc
@@ -14,7 +14,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/message_pipe_unittest.cc b/cpp/system/tests/message_pipe_unittest.cc
index 90c0d33..8c153c2 100644
--- a/cpp/system/tests/message_pipe_unittest.cc
+++ b/cpp/system/tests/message_pipe_unittest.cc
@@ -8,9 +8,9 @@
 
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/system/handle.h"
 #include "mojo/public/cpp/system/wait.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/time_unittest.cc b/cpp/system/tests/time_unittest.cc
index 45c07a7..74fc78e 100644
--- a/cpp/system/tests/time_unittest.cc
+++ b/cpp/system/tests/time_unittest.cc
@@ -6,7 +6,7 @@
 
 #include "mojo/public/cpp/system/time.h"
 
-#include "testing/gtest/include/gtest/gtest.h"
+#include "gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/system/tests/wait_unittest.cc b/cpp/system/tests/wait_unittest.cc
index 6573b16..543f297 100644
--- a/cpp/system/tests/wait_unittest.cc
+++ b/cpp/system/tests/wait_unittest.cc
@@ -8,9 +8,9 @@
 
 #include <vector>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/system/handle.h"
 #include "mojo/public/cpp/system/message_pipe.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/cpp/utility/tests/BUILD.gn b/cpp/utility/tests/BUILD.gn
index 8a4f40c..cc265ca 100644
--- a/cpp/utility/tests/BUILD.gn
+++ b/cpp/utility/tests/BUILD.gn
@@ -11,11 +11,8 @@
     "run_loop_unittest.cc",
   ]
 
-  deps = [
-    "//testing/gtest",
-  ]
-
   mojo_sdk_deps = [
+    "mojo/public:gtest",
     "mojo/public/cpp/system",
     "mojo/public/cpp/test_support:test_utils",
     "mojo/public/cpp/utility",
diff --git a/cpp/utility/tests/run_loop_unittest.cc b/cpp/utility/tests/run_loop_unittest.cc
index 650f145..5e50a67 100644
--- a/cpp/utility/tests/run_loop_unittest.cc
+++ b/cpp/utility/tests/run_loop_unittest.cc
@@ -6,11 +6,11 @@
 
 #include <string>
 
+#include "gtest/gtest.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "mojo/public/cpp/utility/run_loop_handler.h"
-#include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
 namespace {
diff --git a/mojo_sdk.gni b/mojo_sdk.gni
index 716c2c3..c84fc0f 100644
--- a/mojo_sdk.gni
+++ b/mojo_sdk.gni
@@ -115,9 +115,8 @@
           # the Mojo SDK should be on targets within the same file or on a
           # whitelisted set of external dependencies.
           dep_dir = get_path_info(dep, "dir")
-          assert(dep_dir == "." || dep == "//testing/gtest" ||
-                 (dep == "//dart/runtime:libdart" &&
-                  target_name == "mojo_internal_impl"))
+          assert(dep_dir == "." || (dep == "//dart/runtime:libdart" &&
+                                    target_name == "mojo_internal_impl"))
         }
         deps += [ dep ]
       }