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

Side by Side Diff: chrome/common/net/gaia/google_service_auth_error_unittest.cc

Issue 9483002: Move values_test_util.{h,cc} to base/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 9 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/chrome_tests.gypi ('k') | chrome/test/base/values_test_util.h » ('j') | 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) 2011 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/common/net/gaia/google_service_auth_error.h" 5 #include "chrome/common/net/gaia/google_service_auth_error.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/test/values_test_util.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "chrome/test/base/values_test_util.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace { 15 namespace {
16 16
17 using test::ExpectDictStringValue; 17 using base::ExpectDictStringValue;
18 18
19 class GoogleServiceAuthErrorTest : public testing::Test {}; 19 class GoogleServiceAuthErrorTest : public testing::Test {};
20 20
21 void TestSimpleState(GoogleServiceAuthError::State state) { 21 void TestSimpleState(GoogleServiceAuthError::State state) {
22 GoogleServiceAuthError error(state); 22 GoogleServiceAuthError error(state);
23 scoped_ptr<DictionaryValue> value(error.ToValue()); 23 scoped_ptr<DictionaryValue> value(error.ToValue());
24 EXPECT_EQ(1u, value->size()); 24 EXPECT_EQ(1u, value->size());
25 std::string state_str; 25 std::string state_str;
26 EXPECT_TRUE(value->GetString("state", &state_str)); 26 EXPECT_TRUE(value->GetString("state", &state_str));
27 EXPECT_FALSE(state_str.empty()); 27 EXPECT_FALSE(state_str.empty());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ExpectDictStringValue("CAPTCHA_REQUIRED", *value, "state"); 62 ExpectDictStringValue("CAPTCHA_REQUIRED", *value, "state");
63 DictionaryValue* captcha_value = NULL; 63 DictionaryValue* captcha_value = NULL;
64 EXPECT_TRUE(value->GetDictionary("captcha", &captcha_value)); 64 EXPECT_TRUE(value->GetDictionary("captcha", &captcha_value));
65 ASSERT_TRUE(captcha_value); 65 ASSERT_TRUE(captcha_value);
66 ExpectDictStringValue("captcha_token", *captcha_value, "token"); 66 ExpectDictStringValue("captcha_token", *captcha_value, "token");
67 ExpectDictStringValue("http://www.google.com/", *captcha_value, "imageUrl"); 67 ExpectDictStringValue("http://www.google.com/", *captcha_value, "imageUrl");
68 ExpectDictStringValue("http://www.bing.com/", *captcha_value, "unlockUrl"); 68 ExpectDictStringValue("http://www.bing.com/", *captcha_value, "unlockUrl");
69 } 69 }
70 70
71 } // namespace 71 } // namespace
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/base/values_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698