tests_hook.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef IOS_CHROME_APP_TESTS_HOOK_H_
  5. #define IOS_CHROME_APP_TESTS_HOOK_H_
  6. namespace policy {
  7. class ConfigurationPolicyProvider;
  8. }
  9. namespace tests_hook {
  10. // Returns true if app group access should be disabled as tests don't have the
  11. // required entitlements.
  12. // This is used by internal code.
  13. bool DisableAppGroupAccess();
  14. // Returns true if ContentSuggestions should be disabled to allow other tests to
  15. // run unimpeded.
  16. bool DisableContentSuggestions();
  17. // Returns true if Discover feed should be disabled to allow tests to run
  18. // without it.
  19. bool DisableDiscoverFeed();
  20. // Returns true if the first_run path should be disabled to allow other tests to
  21. // run unimpeded.
  22. bool DisableFirstRun();
  23. // Returns true if the geolocation should be disabled to avoid the user location
  24. // prompt displaying for the omnibox.
  25. bool DisableGeolocation();
  26. // Returns true if the upgrade sign-in promo should be disabled to allow other
  27. // tests to run unimpeded.
  28. bool DisableUpgradeSigninPromo();
  29. // Returns true if the update service should be disabled so that the update
  30. // infobar won't be shown during testing.
  31. bool DisableUpdateService();
  32. // The main thread freeze detection is interfering with the EarlGrey
  33. // synchronization.
  34. // Return true if it should be disabled.
  35. bool DisableMainThreadFreezeDetection();
  36. // Returns a policy provider that should be installed as the platform policy
  37. // provider when testing. May return nullptr.
  38. policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider();
  39. // Global integration tests setup.
  40. void SetUpTestsIfPresent();
  41. // Runs the integration tests. This is not used by EarlGrey-based integration
  42. // tests.
  43. void RunTestsIfPresent();
  44. } // namespace tests_hook
  45. #endif // IOS_CHROME_APP_TESTS_HOOK_H_