Allow test() build targets with no deps

A test() target with no deps (maybe only public_deps or no
deps at all) would fail to compile on android because of
a "deps += [...]" statement.

Bug: 927257

Change-Id: I7fa3172a1f9cdca146800b8f81b965cfd46f81e9
Reviewed-on: https://chromium-review.googlesource.com/c/1443016
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#627962}
diff --git a/testing/test.gni b/testing/test.gni
index d04dad1..a7dd581 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -135,7 +135,7 @@
         }
       }
       unittest_apk(_apk_target) {
-        forward_variables_from(invoker, _apk_specific_vars + [ "deps" ])
+        forward_variables_from(invoker, _apk_specific_vars)
         shared_library = ":$_library_target"
         apk_name = invoker.target_name
         if (defined(invoker.output_name)) {
@@ -143,6 +143,12 @@
           install_script_name = "install_${invoker.output_name}"
         }
 
+        if (defined(invoker.deps)) {
+          deps = invoker.deps
+        } else {
+          deps = []
+        }
+
         # Add the Java classes so that each target does not have to do it.
         deps += [ "//base/test:test_support_java" ]