OLD | NEW |
1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/bidi_checker_web_ui_test.h" | 5 #include "chrome/browser/ui/webui/bidi_checker_web_ui_test.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 WebUIBrowserTest::SetUpInProcessBrowserTestFixture(); | 96 WebUIBrowserTest::SetUpInProcessBrowserTestFixture(); |
97 WebUIBrowserTest::AddLibrary(WebUIBidiCheckerLibraryJSPath()); | 97 WebUIBrowserTest::AddLibrary(WebUIBidiCheckerLibraryJSPath()); |
98 WebUIBrowserTest::AddLibrary(base::FilePath(kBidiCheckerTestsJS)); | 98 WebUIBrowserTest::AddLibrary(base::FilePath(kBidiCheckerTestsJS)); |
99 } | 99 } |
100 | 100 |
101 void WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage( | 101 void WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage( |
102 const std::string& page_url, bool is_rtl) { | 102 const std::string& page_url, bool is_rtl) { |
103 ui_test_utils::NavigateToURL(browser(), GURL(page_url)); | 103 ui_test_utils::NavigateToURL(browser(), GURL(page_url)); |
104 ASSERT_TRUE(RunJavascriptTest("runBidiChecker", | 104 ASSERT_TRUE(RunJavascriptTest("runBidiChecker", |
105 base::Value::CreateStringValue(page_url), | 105 base::Value::CreateStringValue(page_url), |
106 base::Value::CreateBooleanValue(is_rtl))); | 106 new base::FundamentalValue(is_rtl))); |
107 } | 107 } |
108 | 108 |
109 void WebUIBidiCheckerBrowserTestLTR::RunBidiCheckerOnPage( | 109 void WebUIBidiCheckerBrowserTestLTR::RunBidiCheckerOnPage( |
110 const std::string& page_url) { | 110 const std::string& page_url) { |
111 WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(page_url, false); | 111 WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(page_url, false); |
112 } | 112 } |
113 | 113 |
114 void WebUIBidiCheckerBrowserTestRTL::RunBidiCheckerOnPage( | 114 void WebUIBidiCheckerBrowserTestRTL::RunBidiCheckerOnPage( |
115 const std::string& page_url) { | 115 const std::string& page_url) { |
116 WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(page_url, true); | 116 WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(page_url, true); |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 // chrome://history-frame | 721 // chrome://history-frame |
722 //============================== | 722 //============================== |
723 | 723 |
724 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) { | 724 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) { |
725 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 725 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
726 } | 726 } |
727 | 727 |
728 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) { | 728 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) { |
729 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 729 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
730 } | 730 } |
OLD | NEW |