Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | |
| 10 | |
| 9 #include "chrome/browser/ui/webui/web_ui_browsertest.h" | 11 #include "chrome/browser/ui/webui/web_ui_browsertest.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
| 11 | 13 |
| 12 // Base class for BidiChecker-based tests. Preloads the BidiChecker JS library | 14 // Base class for BidiChecker-based tests. Preloads the BidiChecker JS library |
| 13 // for each test. | 15 // for each test. |
| 14 class WebUIBidiCheckerBrowserTest : public WebUIBrowserTest { | 16 class WebUIBidiCheckerBrowserTest : public WebUIBrowserTest { |
| 15 public: | 17 public: |
| 16 virtual ~WebUIBidiCheckerBrowserTest(); | 18 virtual ~WebUIBidiCheckerBrowserTest(); |
| 17 | 19 |
| 18 protected: | 20 protected: |
| 19 WebUIBidiCheckerBrowserTest(); | 21 WebUIBidiCheckerBrowserTest(); |
| 20 | 22 |
| 21 // Runs the Bidi Checker on the given page URL. |isRTL| should be true when | 23 // Runs the Bidi Checker on the given page URL. |isRTL| should be true when |
| 22 // the active page locale is RTL. | 24 // the active page locale is RTL. |
| 23 void RunBidiCheckerOnPage(const char pageURL[], bool isRTL); | 25 void RunBidiCheckerOnPage(const std::string& pageURL, bool isRTL); |
|
tfarina
2012/03/19 00:59:27
nit: page_url, is_rtl here and elsewhere?
Sheridan Rawlins
2012/03/20 18:51:33
Done.
| |
| 24 | 26 |
| 25 // Setup test path. | 27 // Setup test path. |
| 26 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 28 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; |
| 27 }; | 29 }; |
| 28 | 30 |
| 29 // Base class for BidiChecker-based tests that run with an LTR UI. | 31 // Base class for BidiChecker-based tests that run with an LTR UI. |
| 30 class WebUIBidiCheckerBrowserTestLTR : public WebUIBidiCheckerBrowserTest { | 32 class WebUIBidiCheckerBrowserTestLTR : public WebUIBidiCheckerBrowserTest { |
| 31 public: | 33 public: |
| 32 void RunBidiCheckerOnPage(const char pageURL[]); | 34 void RunBidiCheckerOnPage(const std::string& pageURL); |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 // Base class for BidiChecker-based tests that run with an RTL UI. | 37 // Base class for BidiChecker-based tests that run with an RTL UI. |
| 36 class WebUIBidiCheckerBrowserTestRTL : public WebUIBidiCheckerBrowserTest { | 38 class WebUIBidiCheckerBrowserTestRTL : public WebUIBidiCheckerBrowserTest { |
| 37 public: | 39 public: |
| 38 void RunBidiCheckerOnPage(const char pageURL[]); | 40 void RunBidiCheckerOnPage(const std::string& pageURL); |
| 39 | 41 |
| 40 protected: | 42 protected: |
| 41 virtual void SetUpOnMainThread() OVERRIDE; | 43 virtual void SetUpOnMainThread() OVERRIDE; |
| 42 virtual void CleanUpOnMainThread() OVERRIDE; | 44 virtual void CleanUpOnMainThread() OVERRIDE; |
| 43 | 45 |
| 44 // The app locale before we change it | 46 // The app locale before we change it |
| 45 std::string app_locale_; | 47 std::string app_locale_; |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 #endif // CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_ | 50 #endif // CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_ |
| OLD | NEW |