OLD | NEW |
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/common/net/gaia/google_service_auth_error.h" | 5 #include "google_apis/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/test/values_test_util.h" |
11 #include "base/values.h" | 11 #include "base/values.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 { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Test that a well formed ClientOAuth response generates an invalid | 115 // Test that a well formed ClientOAuth response generates an invalid |
116 // credentials error with the given error message. | 116 // credentials error with the given error message. |
117 GoogleServiceAuthError error2( | 117 GoogleServiceAuthError error2( |
118 GoogleServiceAuthError::FromClientOAuthError( | 118 GoogleServiceAuthError::FromClientOAuthError( |
119 "{\"cause\":\"foo\",\"explanation\":\"error_message\"}")); | 119 "{\"cause\":\"foo\",\"explanation\":\"error_message\"}")); |
120 EXPECT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, error2.state()); | 120 EXPECT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, error2.state()); |
121 EXPECT_EQ("error_message", error2.error_message()); | 121 EXPECT_EQ("error_message", error2.error_message()); |
122 } | 122 } |
123 | 123 |
124 } // namespace | 124 } // namespace |
OLD | NEW |