Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: chrome/browser/extensions/api/management/management_browsertest.cc

Issue 10855108: Mark ExtensionManagementTest.InstallRequiresConfirm flaky on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/stl_util.h" 6 #include "base/stl_util.h"
7 #include "chrome/browser/extensions/autoupdate_interceptor.h" 7 #include "chrome/browser/extensions/autoupdate_interceptor.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/extensions/extension_host.h" 9 #include "chrome/browser/extensions/extension_host.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const Extension* extension = InstallExtension( 102 const Extension* extension = InstallExtension(
103 test_data_dir_.AppendASCII("install/install.crx"), 1); 103 test_data_dir_.AppendASCII("install/install.crx"), 1);
104 ASSERT_TRUE(extension); 104 ASSERT_TRUE(extension);
105 105
106 // Cancel this install. 106 // Cancel this install.
107 ASSERT_FALSE(StartInstallButCancel( 107 ASSERT_FALSE(StartInstallButCancel(
108 test_data_dir_.AppendASCII("install/install_v2.crx"))); 108 test_data_dir_.AppendASCII("install/install_v2.crx")));
109 EXPECT_TRUE(IsExtensionAtVersion(extension, "1.0")); 109 EXPECT_TRUE(IsExtensionAtVersion(extension, "1.0"));
110 } 110 }
111 111
112 IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallRequiresConfirm) { 112 #if defined(OS_WIN)
113 // http://crbug.com/141913
114 #define MAYBE_InstallRequiresConfirm FLAKY_InstallRequiresConfirm
115 #else
116 #define MAYBE_InstallRequiresConfirm InstallRequiresConfirm
117 #endif
118 IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, MAYBE_InstallRequiresConfirm) {
113 // Installing the extension without an auto confirming UI should result in 119 // Installing the extension without an auto confirming UI should result in
114 // it being disabled, since good.crx has permissions that require approval. 120 // it being disabled, since good.crx has permissions that require approval.
115 ExtensionService* service = browser()->profile()->GetExtensionService(); 121 ExtensionService* service = browser()->profile()->GetExtensionService();
116 std::string id = "ldnnhddmnhbkjipkidpdiheffobcpfmf"; 122 std::string id = "ldnnhddmnhbkjipkidpdiheffobcpfmf";
117 ASSERT_FALSE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 0)); 123 ASSERT_FALSE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 0));
118 ASSERT_TRUE(service->GetExtensionById(id, true)); 124 ASSERT_TRUE(service->GetExtensionById(id, true));
119 UninstallExtension(id); 125 UninstallExtension(id);
120 126
121 // And the install should succeed when the permissions are accepted. 127 // And the install should succeed when the permissions are accepted.
122 ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( 128 ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 std::string(kExtensionId) + ";http://localhost/autoupdate/manifest")); 618 std::string(kExtensionId) + ";http://localhost/autoupdate/manifest"));
613 } 619 }
614 ASSERT_TRUE(WaitForExtensionInstall()); 620 ASSERT_TRUE(WaitForExtensionInstall());
615 ASSERT_EQ(size_before + 1, service->extensions()->size()); 621 ASSERT_EQ(size_before + 1, service->extensions()->size());
616 extension = service->GetExtensionById(kExtensionId, false); 622 extension = service->GetExtensionById(kExtensionId, false);
617 ASSERT_TRUE(extension); 623 ASSERT_TRUE(extension);
618 EXPECT_EQ(Extension::EXTERNAL_POLICY_DOWNLOAD, extension->location()); 624 EXPECT_EQ(Extension::EXTERNAL_POLICY_DOWNLOAD, extension->location());
619 EXPECT_TRUE(service->IsExtensionEnabled(kExtensionId)); 625 EXPECT_TRUE(service->IsExtensionEnabled(kExtensionId));
620 EXPECT_TRUE(service->disabled_extensions()->is_empty()); 626 EXPECT_TRUE(service->disabled_extensions()->is_empty());
621 } 627 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698