| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 bool install_ui_result_; | 141 bool install_ui_result_; |
| 142 bool login_ui_shown_; | 142 bool login_ui_shown_; |
| 143 bool install_ui_shown_; | 143 bool install_ui_shown_; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 class GetAuthTokenFunctionTest : public ExtensionBrowserTest { | 146 class GetAuthTokenFunctionTest : public ExtensionBrowserTest { |
| 147 public: | 147 public: |
| 148 virtual void SetUp() OVERRIDE { | 148 virtual void SetUp() OVERRIDE { |
| 149 ExtensionBrowserTest::SetUp(); | 149 ExtensionBrowserTest::SetUp(); |
| 150 ManifestHandler::Register(extension_manifest_keys::kOAuth2, | 150 ManifestHandler::Register(extension_manifest_keys::kOAuth2, |
| 151 new OAuth2ManifestHandler); | 151 make_linked_ptr(new OAuth2ManifestHandler)); |
| 152 } | 152 } |
| 153 protected: | 153 protected: |
| 154 enum OAuth2Fields { | 154 enum OAuth2Fields { |
| 155 NONE = 0, | 155 NONE = 0, |
| 156 CLIENT_ID = 1, | 156 CLIENT_ID = 1, |
| 157 SCOPES = 2 | 157 SCOPES = 2 |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 ~GetAuthTokenFunctionTest() {} | 160 ~GetAuthTokenFunctionTest() {} |
| 161 | 161 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 IN_PROC_BROWSER_TEST_F(LaunchWebAuthFlowFunctionTest, Bounds) { | 455 IN_PROC_BROWSER_TEST_F(LaunchWebAuthFlowFunctionTest, Bounds) { |
| 456 RunAndCheckBounds("", 0, 0, 0, 0); | 456 RunAndCheckBounds("", 0, 0, 0, 0); |
| 457 RunAndCheckBounds("\"width\": 100, \"height\": 200", 0, 0, 100, 200); | 457 RunAndCheckBounds("\"width\": 100, \"height\": 200", 0, 0, 100, 200); |
| 458 RunAndCheckBounds("\"left\": 100, \"top\": 200", 100, 200, 0, 0); | 458 RunAndCheckBounds("\"left\": 100, \"top\": 200", 100, 200, 0, 0); |
| 459 RunAndCheckBounds( | 459 RunAndCheckBounds( |
| 460 "\"left\": 100, \"top\": 200, \"width\": 300, \"height\": 400", | 460 "\"left\": 100, \"top\": 200, \"width\": 300, \"height\": 400", |
| 461 100, 200, 300, 400); | 461 100, 200, 300, 400); |
| 462 } | 462 } |
| 463 | 463 |
| 464 } // namespace extensions | 464 } // namespace extensions |
| OLD | NEW |