Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: ios/chrome/test/earl_grey/chrome_ios_eg_test.gni

Issue 2589843002: Upstream Chrome on iOS source code [11/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/test/earl_grey/BUILD.gn ('k') | ios/chrome/test/ocmock/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/test/earl_grey/chrome_ios_eg_test.gni
diff --git a/ios/chrome/test/earl_grey/chrome_ios_eg_test.gni b/ios/chrome/test/earl_grey/chrome_ios_eg_test.gni
new file mode 100644
index 0000000000000000000000000000000000000000..c5d7fb91f3cadd5444340925605dc2dd1904c13d
--- /dev/null
+++ b/ios/chrome/test/earl_grey/chrome_ios_eg_test.gni
@@ -0,0 +1,141 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/mac/tweak_info_plist.gni")
+import("//ios/build/chrome_build.gni")
+import("//ios/public/provider/chrome/browser/build_config.gni")
+import("//ios/third_party/earl_grey/ios_eg_test.gni")
+
+# Template wrapping ios_eg_test, setting default values for EarlGrey test
+# based on //ios/chrome/app:chrome.
+#
+# Arguments:
+#
+# info_plist:
+# (optional) string, path to the Info.plist file that will be used for
+# the bundle.
+#
+# info_plist_target:
+# (optional) string, if the info_plist is generated from an action,
+# rather than a regular source file, specify the target name in lieu
+# of info_plist. The two arguments are mutually exclusive.
+#
+# extra_info_plists:
+# (optional) string array, extra list of plist files that will be merged
+# and tweaked; ignored if either info_plist or info_plist_target is set.
+#
+# entitlements_path:
+# (optional) path to the template to use to generate the application
+# entitlements by performing variable substitutions, defaults to
+# //build/config/ios/entitlements.plist.
+#
+# entitlements_target:
+# (optional) label of the target generating the application
+# entitlements (must generate a single file as output); cannot be
+# defined if entitlements_path is set.
+#
+# deps
+# list of labels to depends on.
+#
+# This template defines two targets, one named "${target_name}" is the EarlGrey
+# test application, and the other named "${target_name}_deps_group" is a group
+# target that depends on the template "deps" property (used to implement the
+# test suite running the FLAKY_ tests).
+#
+template("chrome_ios_eg_test") {
+ if (!defined(entitlements_path) && !defined(entitlements_target)) {
+ _target_name = target_name
+ _tweak_entitlements = target_name + "_tweak_entitlements"
+ compile_plist(_tweak_entitlements) {
+ format = "xml1"
+ substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ]
+ output_name = "$target_gen_dir/$_target_name.entitlements"
+ plist_templates =
+ [ "//ios/chrome/test/earl_grey/resources/Chrome.entitlements" ]
+ }
+ }
+
+ if (!defined(info_plist) && !defined(info_plist_target)) {
+ _tweak_info_plist = target_name + "_tweak_info_plist"
+ tweak_info_plist(_tweak_info_plist) {
+ info_plists = [
+ "//ios/chrome/app/resources/Info.plist",
+ "//ios/chrome/app/resources/EarlGreyAddition+Info.plist",
+ ]
+ if (ios_chrome_info_plist_additions != []) {
+ info_plists += ios_chrome_info_plist_additions
+ }
+ if (defined(invoker.extra_info_plists)) {
+ info_plists += invoker.extra_info_plists
+ }
+ args = [
+ "--breakpad=$breakpad_enabled_as_int",
+ "--branding=$chromium_short_name",
+ "--version-overrides=MINOR=9999",
+ ]
+ }
+ }
+
+ _deps_group_name = target_name + "_deps_group"
+ group(_deps_group_name) {
+ testonly = true
+ public_deps = invoker.deps
+ if (defined(invoker.public_deps)) {
+ public_deps += invoker.public_deps
+ }
+ }
+
+ ios_eg_test(target_name) {
+ forward_variables_from(invoker,
+ "*",
+ [
+ "deps",
+ "entitlements_path",
+ "entitlements_target",
+ "eg_main_application_delegate",
+ "info_plist",
+ "info_plist_target",
+ "public_deps",
+ ])
+
+ if (!defined(entitlements_path) && !defined(entitlements_target)) {
+ entitlements_target = ":$_tweak_entitlements"
+ }
+
+ if (!defined(info_plist) && !defined(info_plist_target)) {
+ info_plist_target = ":$_tweak_info_plist"
+ }
+
+ _eg_main_application_delegate = "MainApplicationDelegate"
+ if (defined(invoker.eg_main_application_delegate)) {
+ _eg_main_application_delegate = invoker.eg_main_application_delegate
+ }
+
+ deps = [
+ ":$_deps_group_name",
+ "//ios/chrome/app:main",
+ "//ios/chrome/test/earl_grey:hooks",
+ "//ios/testing:http_server_bundle_data",
+ ]
+ if (!defined(bundle_deps)) {
+ bundle_deps = []
+ }
+ bundle_deps += [ "//ios/chrome/app/resources" ]
+
+ if (!defined(extra_substitutions)) {
+ extra_substitutions = []
+ }
+ extra_substitutions += [
+ "CHROMIUM_BUNDLE_ID=gtest.$target_name",
+ "CHROMIUM_HANDOFF_ID=$chromium_handoff_id",
+ "CHROMIUM_SHORT_NAME=$target_name",
+ "CHROMIUM_URL_SCHEME_1=$url_unsecure_scheme",
+ "CHROMIUM_URL_SCHEME_2=$url_secure_scheme",
+ "CHROMIUM_URL_SCHEME_3=$url_x_callback_scheme",
+ "CHROMIUM_URL_SCHEME_4=$url_channel_scheme",
+ "EG_MAIN_APPLICATION_DELEGATE=$_eg_main_application_delegate",
+ "SSOAUTH_URL_SCHEME=$url_ssoauth_scheme",
+ ]
+ }
+}
« no previous file with comments | « ios/chrome/test/earl_grey/BUILD.gn ('k') | ios/chrome/test/ocmock/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698