Chromium Code Reviews| Index: ui/base/test/scoped_mac_rtl.h |
| diff --git a/ui/base/test/scoped_mac_rtl.h b/ui/base/test/scoped_mac_rtl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..674e9e99809c5de0417400aac37dc22c4ac94cba |
| --- /dev/null |
| +++ b/ui/base/test/scoped_mac_rtl.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 UI_BASE_TEST_SCOPED_MAC_RTL_H_ |
|
tapted
2016/12/07 23:20:27
Why src/ui/base ? (Is there a plan to use this out
|
| +#define UI_BASE_TEST_SCOPED_MAC_RTL_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/test/scoped_feature_list.h" |
| + |
| +namespace ui { |
| + |
| +// Enables all flags required for |
| +// |ui::ShouldDoExperimentalRTLLayout| to return true. |
| +class ScopedEnableMacRTLLayout final { |
|
tapted
2016/12/07 23:20:27
Since there's only one class in the file, it would
|
| + public: |
| + ScopedEnableMacRTLLayout(); |
| + ~ScopedEnableMacRTLLayout(); |
| + |
| + 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(ScopedEnableMacRTLLayout); |
|
tapted
2016/12/07 23:20:27
nit: blank line before
|
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_BASE_TEST_SCOPED_MAC_RTL_H_ |