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" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 ResourceBundle::GetSharedInstance().ReloadLocaleResources(new_locale)); | 65 ResourceBundle::GetSharedInstance().ReloadLocaleResources(new_locale)); |
66 } | 66 } |
67 ASSERT_FALSE(locale.empty()); | 67 ASSERT_FALSE(locale.empty()); |
68 } | 68 } |
69 | 69 |
70 // Since synchronization isn't complete for the ResourceBundle class, reload | 70 // Since synchronization isn't complete for the ResourceBundle class, reload |
71 // locale resources on the IO thread. | 71 // locale resources on the IO thread. |
72 // crbug.com/95425, crbug.com/132752 | 72 // crbug.com/95425, crbug.com/132752 |
73 void ReloadLocaleResources(const std::string& new_locale) { | 73 void ReloadLocaleResources(const std::string& new_locale) { |
74 content::BrowserThread::PostTaskAndReply( | 74 content::BrowserThread::PostTaskAndReply( |
75 content::BrowserThread::IO, FROM_HERE, | 75 content::BrowserThread::IO, |
| 76 FROM_HERE, |
76 base::Bind(&ReloadLocaleResourcesOnIOThread, base::ConstRef(new_locale)), | 77 base::Bind(&ReloadLocaleResourcesOnIOThread, base::ConstRef(new_locale)), |
77 MessageLoop::QuitClosure()); | 78 base::MessageLoop::QuitClosure()); |
78 content::RunMessageLoop(); | 79 content::RunMessageLoop(); |
79 } | 80 } |
80 | 81 |
81 } // namespace | 82 } // namespace |
82 | 83 |
83 static const base::FilePath::CharType* kBidiCheckerTestsJS = | 84 static const base::FilePath::CharType* kBidiCheckerTestsJS = |
84 FILE_PATH_LITERAL("bidichecker_tests.js"); | 85 FILE_PATH_LITERAL("bidichecker_tests.js"); |
85 | 86 |
86 void WebUIBidiCheckerBrowserTest::SetUp() { | 87 void WebUIBidiCheckerBrowserTest::SetUp() { |
87 argv_ = CommandLine::ForCurrentProcess()->GetArgs(); | 88 argv_ = CommandLine::ForCurrentProcess()->GetArgs(); |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 // chrome://history-frame | 788 // chrome://history-frame |
788 //============================== | 789 //============================== |
789 | 790 |
790 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) { | 791 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) { |
791 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 792 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
792 } | 793 } |
793 | 794 |
794 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) { | 795 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) { |
795 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 796 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
796 } | 797 } |
OLD | NEW |