-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "google_apis/google_api_keys_unittest.h"
#include "base/mac/bundle_locations.h"
-#include "base/macros.h"
+#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "google_apis/gaia/gaia_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/stringize_macros.h"
+#include "google_apis/gaia/gaia_config.h"
#include "google_apis/google_api_keys_mac.h"
// After this test, for the remainder of this compilation unit, we
// need official keys to not be used.
-#undef GOOGLE_CHROME_BUILD
+#undef BUILDFLAG_INTERNAL_CHROMIUM_BRANDING
+#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING
+#define BUILDFLAG_INTERNAL_CHROMIUM_BRANDING() (1)
+#define BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING() (0)
#undef USE_OFFICIAL_GOOGLE_API_KEYS
// Override some keys using both preprocessor defines and Info.plist entries.
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
-#undef GOOGLE_CLIENT_ID_CLOUD_PRINT
-#undef GOOGLE_CLIENT_SECRET_CLOUD_PRINT
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#define GOOGLE_API_KEY "API_KEY"
#define GOOGLE_CLIENT_ID_MAIN "ID_MAIN"
#define GOOGLE_CLIENT_SECRET_MAIN "SECRET_MAIN"
-#define GOOGLE_CLIENT_ID_CLOUD_PRINT "ID_CLOUD_PRINT"
-#define GOOGLE_CLIENT_SECRET_CLOUD_PRINT "SECRET_CLOUD_PRINT"
#define GOOGLE_CLIENT_ID_REMOTING "ID_REMOTING"
#define GOOGLE_CLIENT_SECRET_REMOTING "SECRET_REMOTING"
#define GOOGLE_CLIENT_ID_REMOTING_HOST "ID_REMOTING_HOST"
testcase::g_api_key_cache.Get().GetClientID(testcase::CLIENT_MAIN);
std::string secret_main =
testcase::g_api_key_cache.Get().GetClientSecret(testcase::CLIENT_MAIN);
- std::string id_cloud_print =
- testcase::g_api_key_cache.Get().GetClientID(testcase::CLIENT_CLOUD_PRINT);
- std::string secret_cloud_print =
- testcase::g_api_key_cache.Get().GetClientSecret(
- testcase::CLIENT_CLOUD_PRINT);
std::string id_remoting =
testcase::g_api_key_cache.Get().GetClientID(testcase::CLIENT_REMOTING);
std::string secret_remoting = testcase::g_api_key_cache.Get().GetClientSecret(
EXPECT_EQ("plist-API_KEY", api_key);
EXPECT_EQ("plist-ID_MAIN", id_main);
EXPECT_EQ("SECRET_MAIN", secret_main);
- EXPECT_EQ("ID_CLOUD_PRINT", id_cloud_print);
- EXPECT_EQ("SECRET_CLOUD_PRINT", secret_cloud_print);
EXPECT_EQ("ID_REMOTING", id_remoting);
EXPECT_EQ("SECRET_REMOTING", secret_remoting);
EXPECT_EQ("ID_REMOTING_HOST", id_remoting_host);