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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_
6 #define CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_
8 #include "base/command_line.h"
9 #include "chrome/test/base/web_ui_browser_test.h"
15 // Base class for BidiChecker-based tests. Preloads the BidiChecker JS library
17 class WebUIBidiCheckerBrowserTest
: public WebUIBrowserTest
{
19 ~WebUIBidiCheckerBrowserTest() override
;
21 // testing::Test implementation.
22 void SetUp() override
;
23 void TearDown() override
;
26 WebUIBidiCheckerBrowserTest();
28 // Runs the Bidi Checker on the given page URL. |is_rtl| should be true when
29 // the active page locale is RTL.
30 void RunBidiCheckerOnPage(const std::string
& page_url
, bool is_rtl
);
33 void SetUpInProcessBrowserTestFixture() override
;
36 // The command line args used to run the test before being changed in SetUp().
37 base::CommandLine::StringVector argv_
;
40 // Base class for BidiChecker-based tests that run with an LTR UI.
41 // Disabled on all platforms due to http://crbug.com/511439
42 class DISABLED_WebUIBidiCheckerBrowserTestLTR
43 : public WebUIBidiCheckerBrowserTest
{
45 void RunBidiCheckerOnPage(const std::string
& page_url
);
48 // Base class for BidiChecker-based tests that run with an RTL UI.
49 // Disabled on all platforms due to http://crbug.com/511439
50 class DISABLED_WebUIBidiCheckerBrowserTestRTL
51 : public WebUIBidiCheckerBrowserTest
{
53 void RunBidiCheckerOnPage(const std::string
& page_url
);
56 void SetUpOnMainThread() override
;
57 void TearDownOnMainThread() override
;
59 // The app locale before we change it
60 std::string app_locale_
;
63 #endif // CHROME_BROWSER_UI_WEBUI_BIDI_CHECKER_WEB_UI_TEST_H_