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 "base/string_util.h" | 5 #include "base/string_util.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/api/identity/identity_api.h" | 8 #include "chrome/browser/extensions/api/identity/identity_api.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 break; | 177 break; |
178 } | 178 } |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 private: | 182 private: |
183 ResultType result_; | 183 ResultType result_; |
184 OAuth2MintTokenFlow::Delegate* delegate_; | 184 OAuth2MintTokenFlow::Delegate* delegate_; |
185 }; | 185 }; |
186 | 186 |
187 ProfileKeyedService* IdentityAPITestFactory(content::BrowserContext* profile) { | 187 BrowserContextKeyedService* IdentityAPITestFactory( |
| 188 content::BrowserContext* profile) { |
188 return new IdentityAPI(static_cast<Profile*>(profile)); | 189 return new IdentityAPI(static_cast<Profile*>(profile)); |
189 } | 190 } |
190 | 191 |
191 } // namespace | 192 } // namespace |
192 | 193 |
193 class MockGetAuthTokenFunction : public IdentityGetAuthTokenFunction { | 194 class MockGetAuthTokenFunction : public IdentityGetAuthTokenFunction { |
194 public: | 195 public: |
195 MockGetAuthTokenFunction() : login_ui_result_(true), | 196 MockGetAuthTokenFunction() : login_ui_result_(true), |
196 scope_ui_result_(true), | 197 scope_ui_result_(true), |
197 login_ui_shown_(false), | 198 login_ui_shown_(false), |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 scoped_ptr<base::Value> value(utils::RunFunctionAndReturnSingleResult( | 1061 scoped_ptr<base::Value> value(utils::RunFunctionAndReturnSingleResult( |
1061 function, args, browser())); | 1062 function, args, browser())); |
1062 | 1063 |
1063 std::string url; | 1064 std::string url; |
1064 EXPECT_TRUE(value->GetAsString(&url)); | 1065 EXPECT_TRUE(value->GetAsString(&url)); |
1065 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), | 1066 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), |
1066 url); | 1067 url); |
1067 } | 1068 } |
1068 | 1069 |
1069 } // namespace extensions | 1070 } // namespace extensions |
OLD | NEW |