Chromium Code Reviews| Index: chrome/browser/autofill/phone_number_i18n_unittest.cc |
| diff --git a/chrome/browser/autofill/phone_number_i18n_unittest.cc b/chrome/browser/autofill/phone_number_i18n_unittest.cc |
| index a2eb312c829c2c442b94da24f49ca9986d164fd1..38d83b19d860dc506451c05ea687bbfbba51514b 100644 |
| --- a/chrome/browser/autofill/phone_number_i18n_unittest.cc |
| +++ b/chrome/browser/autofill/phone_number_i18n_unittest.cc |
| @@ -2,8 +2,10 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include "base/message_loop.h" |
| #include "base/utf_string_conversions.h" |
| #include "chrome/browser/autofill/phone_number_i18n.h" |
| +#include "content/browser/browser_thread.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| using autofill_i18n::NormalizePhoneNumber; |
| @@ -11,7 +13,16 @@ using autofill_i18n::ParsePhoneNumber; |
| using autofill_i18n::ConstructPhoneNumber; |
| using autofill_i18n::PhoneNumbersMatch; |
| -typedef testing::Test PhoneNumberI18NTest; |
| +class PhoneNumberI18NTest : public testing::Test { |
| + public: |
| + // In order to access the application locale -- which the tested functions do |
| + // internally -- this test must run on the UI thread. |
| + PhoneNumberI18NTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} |
|
dhollowa
2011/10/20 15:34:27
I may be missing something here, but how does this
GeorgeY
2011/10/20 19:40:00
AFAIK, yes, creating BrowserThread::UI thread does
|
| + |
| + private: |
| + MessageLoopForUI message_loop_; |
| + BrowserThread ui_thread_; |
| +}; |
| TEST_F(PhoneNumberI18NTest, NormalizePhoneNumber) { |
| // "Large" digits. |