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

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: Actually include moved files 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..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__
« 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