Chromium Code Reviews| Index: chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h |
| diff --git a/chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h b/chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..827304a209f2c19f01165c7da8824cb2972622ba |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h |
| @@ -0,0 +1,31 @@ |
| +// 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. |
| + |
| +#ifndef CHROME_BROWSER_UI_COCOA__TEST_SCOPED_FORCE_RTL_MAC_H__ |
|
tapted
2016/12/12 22:20:38
nit: remove an extra underscore in COCOA__TEST (3
lgrey
2016/12/12 22:38:20
Done.
|
| +#define CHROME_BROWSER_UI_COCOA__TEST_SCOPED_FORCE_RTL_MAC_H__ |
| + |
| +#include <string> |
| + |
| +#include "base/test/scoped_feature_list.h" |
| + |
| +namespace cocoa_l10n_util { |
| + |
| +// Enables all flags required for |
| +// |cocoa_l10n_util::ShouldDoExperimentalRTLLayout| to return true. |
| +class ScopedForceRTLMac final { |
| + public: |
| + ScopedForceRTLMac(); |
| + ~ScopedForceRTLMac(); |
| + |
| + private: |
| + BOOL original_apple_text_direction_; |
| + BOOL original_rtl_writing_direction_; |
| + std::string original_locale_; |
| + base::test::ScopedFeatureList scoped_feature_list_; |
| + DISALLOW_COPY_AND_ASSIGN(ScopedForceRTLMac); |
|
tapted
2016/12/12 22:20:38
nit: blank line before
lgrey
2016/12/12 22:38:20
Done.
|
| +}; |
| + |
| +} // namespace cocoa_l10n_util |
| + |
| +#endif // CHROME_BROWSER_UI_COCOA__TEST_SCOPED_FORCE_RTL_MAC_H__ |