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/api/identity/web_auth_flow.h" | 9 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 break; | 173 break; |
174 } | 174 } |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 private: | 178 private: |
179 ResultType result_; | 179 ResultType result_; |
180 OAuth2MintTokenFlow::Delegate* delegate_; | 180 OAuth2MintTokenFlow::Delegate* delegate_; |
181 }; | 181 }; |
182 | 182 |
183 ProfileKeyedService* IdentityAPITestFactory(Profile* profile) { | 183 ProfileKeyedService* IdentityAPITestFactory(content::BrowserContext* profile) { |
Jói
2013/04/23 22:45:22
nit: Might be nice to rename |profile| to |context
Paweł Hajdan Jr.
2013/04/23 22:58:11
I think I'll be changing that later, also includin
Jói
2013/04/24 09:09:10
OK, fine by me.
| |
184 return new IdentityAPI(profile); | 184 return new IdentityAPI(static_cast<Profile*>(profile)); |
185 } | 185 } |
186 | 186 |
187 } // namespace | 187 } // namespace |
188 | 188 |
189 class MockGetAuthTokenFunction : public IdentityGetAuthTokenFunction { | 189 class MockGetAuthTokenFunction : public IdentityGetAuthTokenFunction { |
190 public: | 190 public: |
191 MockGetAuthTokenFunction() : login_ui_result_(true), | 191 MockGetAuthTokenFunction() : login_ui_result_(true), |
192 install_ui_result_(false), | 192 install_ui_result_(false), |
193 login_ui_shown_(false), | 193 login_ui_shown_(false), |
194 install_ui_shown_(false) { | 194 install_ui_shown_(false) { |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
861 "https://abcdefghij.chromiumapp.org/callback#test')</script>\"}]", | 861 "https://abcdefghij.chromiumapp.org/callback#test')</script>\"}]", |
862 browser())); | 862 browser())); |
863 | 863 |
864 std::string url; | 864 std::string url; |
865 EXPECT_TRUE(value->GetAsString(&url)); | 865 EXPECT_TRUE(value->GetAsString(&url)); |
866 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), | 866 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), |
867 url); | 867 url); |
868 } | 868 } |
869 | 869 |
870 } // namespace extensions | 870 } // namespace extensions |
OLD | NEW |