| 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/browser/download/download_crx_util.h" | 5 #include "chrome/browser/download/download_crx_util.h" |
| 6 #include "chrome/browser/download/download_service.h" | 6 #include "chrome/browser/download/download_service.h" |
| 7 #include "chrome/browser/download/download_service_factory.h" | 7 #include "chrome/browser/download/download_service_factory.h" |
| 8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
| 9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
| 10 #include "chrome/browser/extensions/extension_install_prompt.h" | 10 #include "chrome/browser/extensions/extension_install_prompt.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 EXPECT_TRUE(WaitForCrxInstallerDone()); | 223 EXPECT_TRUE(WaitForCrxInstallerDone()); |
| 224 LOG(ERROR) << "PackAndInstallExtension: Extension install"; | 224 LOG(ERROR) << "PackAndInstallExtension: Extension install"; |
| 225 EXPECT_TRUE(mock_prompt->confirmation_requested()); | 225 EXPECT_TRUE(mock_prompt->confirmation_requested()); |
| 226 LOG(ERROR) << "PackAndInstallExtension: Extension install confirmed"; | 226 LOG(ERROR) << "PackAndInstallExtension: Extension install confirmed"; |
| 227 } | 227 } |
| 228 | 228 |
| 229 // Tests that scopes are only granted if |record_oauth2_grant_| on the prompt is | 229 // Tests that scopes are only granted if |record_oauth2_grant_| on the prompt is |
| 230 // true. | 230 // true. |
| 231 #if defined(OS_WIN) | 231 #if defined(OS_WIN) |
| 232 #define MAYBE_GrantScopes FLAKY_GrantScopes | 232 #define MAYBE_GrantScopes DISABLED_GrantScopes |
| 233 #else | 233 #else |
| 234 #define MAYBE_GrantScopes GrantScopes | 234 #define MAYBE_GrantScopes GrantScopes |
| 235 #endif | 235 #endif |
| 236 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, MAYBE_GrantScopes) { | 236 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, MAYBE_GrantScopes) { |
| 237 EXPECT_NO_FATAL_FAILURE(CheckHasEmptyScopesAfterInstall("browsertest/scopes", | 237 EXPECT_NO_FATAL_FAILURE(CheckHasEmptyScopesAfterInstall("browsertest/scopes", |
| 238 true)); | 238 true)); |
| 239 } | 239 } |
| 240 | 240 |
| 241 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DoNotGrantScopes) { | 241 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DoNotGrantScopes) { |
| 242 EXPECT_NO_FATAL_FAILURE(CheckHasEmptyScopesAfterInstall("browsertest/scopes", | 242 EXPECT_NO_FATAL_FAILURE(CheckHasEmptyScopesAfterInstall("browsertest/scopes", |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 EXPECT_EQ(string16(), mock_prompt->error()) << kTestData[i]; | 277 EXPECT_EQ(string16(), mock_prompt->error()) << kTestData[i]; |
| 278 } else { | 278 } else { |
| 279 EXPECT_EQ(l10n_util::GetStringUTF16( | 279 EXPECT_EQ(l10n_util::GetStringUTF16( |
| 280 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), | 280 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), |
| 281 mock_prompt->error()) << kTestData[i]; | 281 mock_prompt->error()) << kTestData[i]; |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace extensions | 286 } // namespace extensions |
| OLD | NEW |