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

Side by Side Diff: components/autofill/content/browser/wallet/full_wallet_unittest.cc

Issue 108603005: Update uses of Value in chromeos/, cloud_print/, components/, content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } // anonymous namespace 348 } // anonymous namespace
349 349
350 namespace autofill { 350 namespace autofill {
351 namespace wallet { 351 namespace wallet {
352 352
353 class FullWalletTest : public testing::Test { 353 class FullWalletTest : public testing::Test {
354 public: 354 public:
355 FullWalletTest() {} 355 FullWalletTest() {}
356 protected: 356 protected:
357 void SetUpDictionary(const std::string& json) { 357 void SetUpDictionary(const std::string& json) {
358 scoped_ptr<Value> value(base::JSONReader::Read(json)); 358 scoped_ptr<base::Value> value(base::JSONReader::Read(json));
359 ASSERT_TRUE(value.get()); 359 ASSERT_TRUE(value.get());
360 ASSERT_TRUE(value->IsType(Value::TYPE_DICTIONARY)); 360 ASSERT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY));
361 dict.reset(static_cast<DictionaryValue*>(value.release())); 361 dict.reset(static_cast<base::DictionaryValue*>(value.release()));
362 } 362 }
363 scoped_ptr<DictionaryValue> dict; 363 scoped_ptr<base::DictionaryValue> dict;
364 }; 364 };
365 365
366 TEST_F(FullWalletTest, CreateFullWalletMissingExpirationMonth) { 366 TEST_F(FullWalletTest, CreateFullWalletMissingExpirationMonth) {
367 SetUpDictionary(kFullWalletMissingExpirationMonth); 367 SetUpDictionary(kFullWalletMissingExpirationMonth);
368 EXPECT_EQ(NULL, FullWallet::CreateFullWallet(*dict).get()); 368 EXPECT_EQ(NULL, FullWallet::CreateFullWallet(*dict).get());
369 } 369 }
370 370
371 TEST_F(FullWalletTest, CreateFullWalletMissingExpirationYear) { 371 TEST_F(FullWalletTest, CreateFullWalletMissingExpirationYear) {
372 SetUpDictionary(kFullWalletMissingExpirationYear); 372 SetUpDictionary(kFullWalletMissingExpirationYear);
373 EXPECT_EQ(NULL, FullWallet::CreateFullWallet(*dict).get()); 373 EXPECT_EQ(NULL, FullWallet::CreateFullWallet(*dict).get());
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 full_wallet->GetInfo( 521 full_wallet->GetInfo(
522 AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR))); 522 AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR)));
523 EXPECT_TRUE(GetTestAddress()->EqualsIgnoreID( 523 EXPECT_TRUE(GetTestAddress()->EqualsIgnoreID(
524 *full_wallet->billing_address())); 524 *full_wallet->billing_address()));
525 EXPECT_TRUE(GetTestShippingAddress()->EqualsIgnoreID( 525 EXPECT_TRUE(GetTestShippingAddress()->EqualsIgnoreID(
526 *full_wallet->shipping_address())); 526 *full_wallet->shipping_address()));
527 } 527 }
528 528
529 } // namespace wallet 529 } // namespace wallet
530 } // namespace autofill 530 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698