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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Tests | 142 // Tests |
143 | 143 |
144 //============================== | 144 //============================== |
145 // chrome://settings/history | 145 // chrome://settings/history |
146 //============================== | 146 //============================== |
147 | 147 |
148 static void SetupHistoryPageTest(Browser* browser, | 148 static void SetupHistoryPageTest(Browser* browser, |
149 const std::string& page_url, | 149 const std::string& page_url, |
150 const std::string& page_title) { | 150 const std::string& page_title) { |
151 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 151 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
152 browser->profile(), Profile::IMPLICIT_ACCESS); | 152 browser->profile(), ServiceAccessType::IMPLICIT_ACCESS); |
153 const GURL history_url = GURL(page_url); | 153 const GURL history_url = GURL(page_url); |
154 history_service->AddPage( | 154 history_service->AddPage( |
155 history_url, base::Time::Now(), history::SOURCE_BROWSED); | 155 history_url, base::Time::Now(), history::SOURCE_BROWSED); |
156 history_service->SetPageTitle(history_url, base::UTF8ToUTF16(page_title)); | 156 history_service->SetPageTitle(history_url, base::UTF8ToUTF16(page_title)); |
157 } | 157 } |
158 | 158 |
159 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, | 159 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, |
160 TestHistoryPage) { | 160 TestHistoryPage) { |
161 // Test an Israeli news site with a Hebrew title. | 161 // Test an Israeli news site with a Hebrew title. |
162 SetupHistoryPageTest(browser(), | 162 SetupHistoryPageTest(browser(), |
(...skipping 558 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 |