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

Side by Side Diff: chrome/browser/chromeos/mobile_config_unittest.cc

Issue 10444119: Fix gcc 4.6 compile issues; set but unused variable and pointer/FALSE fubar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unsigned 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/external_metrics_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromeos/mobile_config.h" 5 #include "chrome/browser/chromeos/mobile_config.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace { 10 namespace {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 EXPECT_TRUE(locale_config == NULL); 162 EXPECT_TRUE(locale_config == NULL);
163 } 163 }
164 164
165 TEST(MobileConfigTest, OldDeal) { 165 TEST(MobileConfigTest, OldDeal) {
166 MobileConfig config(kOldDealMobileConfig, "en-US"); 166 MobileConfig config(kOldDealMobileConfig, "en-US");
167 EXPECT_TRUE(config.IsReady()); 167 EXPECT_TRUE(config.IsReady());
168 const MobileConfig::Carrier* carrier; 168 const MobileConfig::Carrier* carrier;
169 carrier = config.GetCarrier("Carrier (country)"); 169 carrier = config.GetCarrier("Carrier (country)");
170 EXPECT_TRUE(carrier != NULL); 170 EXPECT_TRUE(carrier != NULL);
171 // Check default value. 171 // Check default value.
172 EXPECT_EQ(false, carrier->show_portal_button()); 172 EXPECT_FALSE(carrier->show_portal_button());
173 const MobileConfig::CarrierDeal* deal; 173 const MobileConfig::CarrierDeal* deal;
174 // TODO(nkostylev): Pass fixed time instead of relying on Time::Now(). 174 // TODO(nkostylev): Pass fixed time instead of relying on Time::Now().
175 deal = carrier->GetDefaultDeal(); 175 deal = carrier->GetDefaultDeal();
176 EXPECT_TRUE(deal == NULL); 176 EXPECT_TRUE(deal == NULL);
177 } 177 }
178 178
179 TEST(MobileConfigTest, DealOtherLocale) { 179 TEST(MobileConfigTest, DealOtherLocale) {
180 MobileConfig config(kGoodMobileConfig, "en-GB"); 180 MobileConfig config(kGoodMobileConfig, "en-GB");
181 EXPECT_TRUE(config.IsReady()); 181 EXPECT_TRUE(config.IsReady());
182 const MobileConfig::Carrier* carrier; 182 const MobileConfig::Carrier* carrier;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 EXPECT_TRUE(config_us.IsReady()); 240 EXPECT_TRUE(config_us.IsReady());
241 config_us.LoadManifestFromString(kLocalMobileConfig); 241 config_us.LoadManifestFromString(kLocalMobileConfig);
242 EXPECT_TRUE(config_us.IsReady()); 242 EXPECT_TRUE(config_us.IsReady());
243 const MobileConfig::LocaleConfig* locale_config; 243 const MobileConfig::LocaleConfig* locale_config;
244 locale_config = config_us.GetLocaleConfig(); 244 locale_config = config_us.GetLocaleConfig();
245 EXPECT_TRUE(locale_config != NULL); 245 EXPECT_TRUE(locale_config != NULL);
246 EXPECT_EQ("accounts.carrier.com/localized/", locale_config->setup_url()); 246 EXPECT_EQ("accounts.carrier.com/localized/", locale_config->setup_url());
247 } 247 }
248 248
249 } // namespace chromeos 249 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/external_metrics_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698