| 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/strings/string_util.h" | 5 #include "base/strings/string_util.h" |
| 6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/extensions/api/identity/experimental_identity_api.h" | 9 #include "chrome/browser/extensions/api/identity/experimental_identity_api.h" |
| 10 #include "chrome/browser/extensions/api/identity/identity_api.h" | 10 #include "chrome/browser/extensions/api/identity/identity_api.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 break; | 170 break; |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 private: | 175 private: |
| 176 ResultType result_; | 176 ResultType result_; |
| 177 OAuth2MintTokenFlow::Delegate* delegate_; | 177 OAuth2MintTokenFlow::Delegate* delegate_; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 BrowserContextKeyedService* IdentityAPITestFactory(Profile* profile) { | |
| 181 return new IdentityAPI(profile); | |
| 182 } | |
| 183 | |
| 184 } // namespace | 180 } // namespace |
| 185 | 181 |
| 186 class ExperimentalMockGetAuthTokenFunction : | 182 class ExperimentalMockGetAuthTokenFunction : |
| 187 public ExperimentalIdentityGetAuthTokenFunction { | 183 public ExperimentalIdentityGetAuthTokenFunction { |
| 188 public: | 184 public: |
| 189 ExperimentalMockGetAuthTokenFunction() | 185 ExperimentalMockGetAuthTokenFunction() |
| 190 : login_access_token_result_(true), | 186 : login_access_token_result_(true), |
| 191 login_ui_result_(true), | 187 login_ui_result_(true), |
| 192 install_ui_result_(false), | 188 install_ui_result_(false), |
| 193 login_ui_shown_(false), | 189 login_ui_shown_(false), |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 "https://abcdefghij.chromiumapp.org/callback#test')</script>\"}]", | 770 "https://abcdefghij.chromiumapp.org/callback#test')</script>\"}]", |
| 775 browser())); | 771 browser())); |
| 776 | 772 |
| 777 std::string url; | 773 std::string url; |
| 778 EXPECT_TRUE(value->GetAsString(&url)); | 774 EXPECT_TRUE(value->GetAsString(&url)); |
| 779 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), | 775 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), |
| 780 url); | 776 url); |
| 781 } | 777 } |
| 782 | 778 |
| 783 } // namespace extensions | 779 } // namespace extensions |
| OLD | NEW |