| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 ASSERT_FALSE(locale.empty()); | 65 ASSERT_FALSE(locale.empty()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 // Since synchronization isn't complete for the ResourceBundle class, reload | 68 // Since synchronization isn't complete for the ResourceBundle class, reload |
| 69 // locale resources on the IO thread. | 69 // locale resources on the IO thread. |
| 70 // crbug.com/95425, crbug.com/132752 | 70 // crbug.com/95425, crbug.com/132752 |
| 71 void ReloadLocaleResources(const std::string& new_locale) { | 71 void ReloadLocaleResources(const std::string& new_locale) { |
| 72 content::BrowserThread::PostTaskAndReply( | 72 content::BrowserThread::PostTaskAndReply( |
| 73 content::BrowserThread::IO, FROM_HERE, | 73 content::BrowserThread::IO, FROM_HERE, |
| 74 base::Bind(&ReloadLocaleResourcesOnIOThread, base::ConstRef(new_locale)), | 74 base::BindOnce(&ReloadLocaleResourcesOnIOThread, |
| 75 base::ConstRef(new_locale)), |
| 75 base::MessageLoop::QuitWhenIdleClosure()); | 76 base::MessageLoop::QuitWhenIdleClosure()); |
| 76 content::RunMessageLoop(); | 77 content::RunMessageLoop(); |
| 77 } | 78 } |
| 78 | 79 |
| 79 } // namespace | 80 } // namespace |
| 80 | 81 |
| 81 static const base::FilePath::CharType* kBidiCheckerTestsJS = | 82 static const base::FilePath::CharType* kBidiCheckerTestsJS = |
| 82 FILE_PATH_LITERAL("bidichecker_tests.js"); | 83 FILE_PATH_LITERAL("bidichecker_tests.js"); |
| 83 | 84 |
| 84 void WebUIBidiCheckerBrowserTest::SetUp() { | 85 void WebUIBidiCheckerBrowserTest::SetUp() { |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 731 |
| 731 IN_PROC_BROWSER_TEST_F(DISABLED_WebUIBidiCheckerBrowserTestLTR, | 732 IN_PROC_BROWSER_TEST_F(DISABLED_WebUIBidiCheckerBrowserTestLTR, |
| 732 TestHistoryFrame) { | 733 TestHistoryFrame) { |
| 733 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 734 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
| 734 } | 735 } |
| 735 | 736 |
| 736 IN_PROC_BROWSER_TEST_F(DISABLED_WebUIBidiCheckerBrowserTestRTL, | 737 IN_PROC_BROWSER_TEST_F(DISABLED_WebUIBidiCheckerBrowserTestRTL, |
| 737 TestHistoryFrame) { | 738 TestHistoryFrame) { |
| 738 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); | 739 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL); |
| 739 } | 740 } |
| OLD | NEW |