Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: chrome/browser/autofill/address_unittest.cc

Issue 10533143: Revert 142048 - Move thread checking from autofill_country.cc to browser_process_impl.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_country.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/address_unittest.cc
===================================================================
--- chrome/browser/autofill/address_unittest.cc (revision 142065)
+++ chrome/browser/autofill/address_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,8 +14,21 @@
using content::BrowserThread;
+class AddressTest : 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.
+ AddressTest() : ui_thread_(BrowserThread::UI, &message_loop_) {}
+
+ private:
+ MessageLoopForUI message_loop_;
+ content::TestBrowserThread ui_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(AddressTest);
+};
+
// Test that the getters and setters for country code are working.
-TEST(AddressTest, CountryCode) {
+TEST_F(AddressTest, CountryCode) {
Address address;
EXPECT_EQ(std::string(), address.country_code());
@@ -27,7 +40,7 @@
}
// Test that country codes are properly decoded as country names.
-TEST(AddressTest, GetCountry) {
+TEST_F(AddressTest, GetCountry) {
Address address;
EXPECT_EQ(std::string(), address.country_code());
@@ -45,7 +58,7 @@
}
// Test that we properly detect country codes appropriate for each country.
-TEST(AddressTest, SetCountry) {
+TEST_F(AddressTest, SetCountry) {
Address address;
EXPECT_EQ(std::string(), address.country_code());
@@ -81,7 +94,7 @@
}
// Test that we properly match typed values to stored country data.
-TEST(AddressTest, IsCountry) {
+TEST_F(AddressTest, IsCountry) {
Address address;
address.set_country_code("US");
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_country.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698