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

Unified Diff: chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h

Issue 2555033003: Add ScopedMacRTL class for Cocoa browser RTL testing (Closed)
Patch Set: Review comments 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
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..a012dbbf1eba48e653d966f7879d9f89dfa967f1
--- /dev/null
+++ b/chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.h
@@ -0,0 +1,32 @@
+// 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__
+#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);
+};
+
+} // namespace cocoa_l10n_util
+
+#endif // CHROME_BROWSER_UI_COCOA_TEST_SCOPED_FORCE_RTL_MAC_H__
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm ('k') | chrome/browser/ui/cocoa/test/scoped_force_rtl_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698