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