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

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

Issue 15778004: Mark some of tests that invoke RunExtensionSubset as disabled on Win - see bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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 | chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc » ('j') | 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 <map> 5 #include <map>
6 6
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #define MAYBE_Uninstall DISABLED_Uninstall 113 #define MAYBE_Uninstall DISABLED_Uninstall
114 #else 114 #else
115 #define MAYBE_Uninstall Uninstall 115 #define MAYBE_Uninstall Uninstall
116 #endif 116 #endif
117 117
118 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, MAYBE_Uninstall) { 118 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, MAYBE_Uninstall) {
119 LoadExtensions(); 119 LoadExtensions();
120 ASSERT_TRUE(RunExtensionSubtest("management/test", "uninstall.html")); 120 ASSERT_TRUE(RunExtensionSubtest("management/test", "uninstall.html"));
121 } 121 }
122 122
123 // Fails often on Windows dbg bots. http://crbug.com/177163
124 #if defined(OS_WIN)
125 #define MAYBE_ManagementPolicyAllowed DISABLED_ManagementPolicyAllowed
126 #else
127 #define MAYBE_ManagementPolicyAllowed ManagementPolicyAllowed
128 #endif // defined(OS_WIN)
123 // Tests actions on extensions when no management policy is in place. 129 // Tests actions on extensions when no management policy is in place.
124 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, ManagementPolicyAllowed) { 130 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest,
131 MAYBE_ManagementPolicyAllowed) {
125 LoadExtensions(); 132 LoadExtensions();
126 ExtensionService* service = extensions::ExtensionSystem::Get( 133 ExtensionService* service = extensions::ExtensionSystem::Get(
127 browser()->profile())->extension_service(); 134 browser()->profile())->extension_service();
128 EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"], 135 EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"],
129 false)); 136 false));
130 137
131 // Ensure that all actions are allowed. 138 // Ensure that all actions are allowed.
132 extensions::ExtensionSystem::Get( 139 extensions::ExtensionSystem::Get(
133 browser()->profile())->management_policy()->UnregisterAllProviders(); 140 browser()->profile())->management_policy()->UnregisterAllProviders();
134 141
135 ASSERT_TRUE(RunExtensionSubtest("management/management_policy", 142 ASSERT_TRUE(RunExtensionSubtest("management/management_policy",
136 "allowed.html")); 143 "allowed.html"));
137 // The last thing the test does is uninstall the "enabled_extension". 144 // The last thing the test does is uninstall the "enabled_extension".
138 EXPECT_FALSE(service->GetExtensionById(extension_ids_["enabled_extension"], 145 EXPECT_FALSE(service->GetExtensionById(extension_ids_["enabled_extension"],
139 true)); 146 true));
140 } 147 }
141 148
149 // Fails often on Windows dbg bots. http://crbug.com/177163
150 #if defined(OS_WIN)
151 #define MAYBE_ManagementPolicyProhibited DISABLED_ManagementPolicyProhibited
152 #else
153 #define MAYBE_ManagementPolicyProhibited ManagementPolicyProhibited
154 #endif // defined(OS_WIN)
142 // Tests actions on extensions when management policy prohibits those actions. 155 // Tests actions on extensions when management policy prohibits those actions.
143 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, ManagementPolicyProhibited) { 156 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest,
157 MAYBE_ManagementPolicyProhibited) {
144 LoadExtensions(); 158 LoadExtensions();
145 ExtensionService* service = extensions::ExtensionSystem::Get( 159 ExtensionService* service = extensions::ExtensionSystem::Get(
146 browser()->profile())->extension_service(); 160 browser()->profile())->extension_service();
147 EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"], 161 EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"],
148 false)); 162 false));
149 163
150 // Prohibit status changes. 164 // Prohibit status changes.
151 extensions::ManagementPolicy* policy = extensions::ExtensionSystem::Get( 165 extensions::ManagementPolicy* policy = extensions::ExtensionSystem::Get(
152 browser()->profile())->management_policy(); 166 browser()->profile())->management_policy();
153 policy->UnregisterAllProviders(); 167 policy->UnregisterAllProviders();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 290 ASSERT_EQ(2, browser()->tab_strip_model()->count());
277 #else 291 #else
278 // Find the app's browser. Opening in a new window will create 292 // Find the app's browser. Opening in a new window will create
279 // a new browser. 293 // a new browser.
280 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), 294 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(),
281 browser()->host_desktop_type())); 295 browser()->host_desktop_type()));
282 Browser* app_browser = FindOtherBrowser(browser()); 296 Browser* app_browser = FindOtherBrowser(browser());
283 ASSERT_TRUE(app_browser->is_app()); 297 ASSERT_TRUE(app_browser->is_app());
284 #endif 298 #endif
285 } 299 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698