| 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.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "base/threading/platform_thread.h" |
| 13 #include "base/time.h" |
| 12 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 13 #include "base/threading/platform_thread.h" | |
| 14 #include "base/values.h" | 15 #include "base/values.h" |
| 15 #include "chrome/browser/autofill/autofill_common_test.h" | 16 #include "chrome/browser/autofill/autofill_common_test.h" |
| 16 #include "chrome/browser/autofill/autofill_profile.h" | 17 #include "chrome/browser/autofill/autofill_profile.h" |
| 17 #include "chrome/browser/autofill/personal_data_manager.h" | 18 #include "chrome/browser/autofill/personal_data_manager.h" |
| 18 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 19 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 19 #include "chrome/browser/history/history.h" | 20 #include "chrome/browser/history/history.h" |
| 20 #include "chrome/browser/history/history_service_factory.h" | 21 #include "chrome/browser/history/history_service_factory.h" |
| 21 #include "chrome/browser/prefs/pref_service.h" | 22 #include "chrome/browser/prefs/pref_service.h" |
| 22 #include "chrome/browser/prefs/session_startup_pref.h" | 23 #include "chrome/browser/prefs/session_startup_pref.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 //============================== | 140 //============================== |
| 140 // chrome://settings/history | 141 // chrome://settings/history |
| 141 //============================== | 142 //============================== |
| 142 | 143 |
| 143 static void SetupHistoryPageTest(Browser* browser, | 144 static void SetupHistoryPageTest(Browser* browser, |
| 144 const std::string page_url, | 145 const std::string page_url, |
| 145 const std::string page_title) { | 146 const std::string page_title) { |
| 146 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 147 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
| 147 browser->profile(), Profile::IMPLICIT_ACCESS); | 148 browser->profile(), Profile::IMPLICIT_ACCESS); |
| 148 const GURL history_url = GURL(page_url); | 149 const GURL history_url = GURL(page_url); |
| 149 history_service->AddPage(history_url, history::SOURCE_BROWSED); | 150 history_service->AddPage( |
| 151 history_url, base::Time::Now(), history::SOURCE_BROWSED); |
| 150 history_service->SetPageTitle(history_url, UTF8ToUTF16(page_title)); | 152 history_service->SetPageTitle(history_url, UTF8ToUTF16(page_title)); |
| 151 } | 153 } |
| 152 | 154 |
| 153 // TODO(estade): fix this test: http://crbug.com/119595 | 155 // TODO(estade): fix this test: http://crbug.com/119595 |
| 154 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, | 156 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, |
| 155 TestHistoryPage) { | 157 TestHistoryPage) { |
| 156 // Test an Israeli news site with a Hebrew title. | 158 // Test an Israeli news site with a Hebrew title. |
| 157 SetupHistoryPageTest(browser(), | 159 SetupHistoryPageTest(browser(), |
| 158 "http://www.ynet.co.il", | 160 "http://www.ynet.co.il", |
| 159 "\xD7\x91\xD7\x93\xD7\x99\xD7\xA7\xD7\x94\x21"); | 161 "\xD7\x91\xD7\x93\xD7\x99\xD7\xA7\xD7\x94\x21"); |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 // chrome://history-frame | 753 // chrome://history-frame |
| 752 //============================== | 754 //============================== |
| 753 | 755 |
| 754 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) { | 756 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) { |
| 755 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 757 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
| 756 } | 758 } |
| 757 | 759 |
| 758 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) { | 760 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) { |
| 759 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 761 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
| 760 } | 762 } |
| OLD | NEW |