OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 #include <shlobj.h> // Must be before propkey. | 7 #include <shlobj.h> // Must be before propkey. |
8 #include <propkey.h> | 8 #include <propkey.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 command_line->AppendSwitch(switches::kEnableProfileShortcutManager); | 169 command_line->AppendSwitch(switches::kEnableProfileShortcutManager); |
170 } | 170 } |
171 | 171 |
172 private: | 172 private: |
173 DISALLOW_COPY_AND_ASSIGN(BrowserTestWithProfileShortcutManager); | 173 DISALLOW_COPY_AND_ASSIGN(BrowserTestWithProfileShortcutManager); |
174 }; | 174 }; |
175 | 175 |
176 // Check that the window properties on Windows are properly set. | 176 // Check that the window properties on Windows are properly set. |
177 // http://crbug.com/396344 | 177 // http://crbug.com/396344 |
178 IN_PROC_BROWSER_TEST_F(BrowserTestWithProfileShortcutManager, | 178 IN_PROC_BROWSER_TEST_F(BrowserTestWithProfileShortcutManager, |
179 DISABLED_WindowProperties) { | 179 WindowProperties) { |
180 // Disable this test in Metro+Ash where Windows window properties aren't used. | 180 // Disable this test in Metro+Ash where Windows window properties aren't used. |
181 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 181 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
182 return; | 182 return; |
183 | 183 |
184 // This test checks HWND properties that are only available on Win7+. | 184 // This test checks HWND properties that are only available on Win7+. |
185 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 185 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
186 return; | 186 return; |
187 | 187 |
188 // Single profile case. The profile name should not be shown. | 188 // Single profile case. The profile name should not be shown. |
189 WaitAndValidateBrowserWindowProperties(base::Bind( | 189 WaitAndValidateBrowserWindowProperties(base::Bind( |
(...skipping 29 matching lines...) Expand all Loading... |
219 Browser* profile2_browser = | 219 Browser* profile2_browser = |
220 CreateBrowser(profile_manager->GetProfileByPath(path_profile2)); | 220 CreateBrowser(profile_manager->GetProfileByPath(path_profile2)); |
221 size_t profile2_index = cache.GetIndexOfProfileWithPath(path_profile2); | 221 size_t profile2_index = cache.GetIndexOfProfileWithPath(path_profile2); |
222 WaitAndValidateBrowserWindowProperties( | 222 WaitAndValidateBrowserWindowProperties( |
223 base::Bind(&ValidateBrowserWindowProperties, | 223 base::Bind(&ValidateBrowserWindowProperties, |
224 profile2_browser, | 224 profile2_browser, |
225 cache.GetNameOfProfileAtIndex(profile2_index))); | 225 cache.GetNameOfProfileAtIndex(profile2_index))); |
226 } | 226 } |
227 | 227 |
228 // http://crbug.com/396344 | 228 // http://crbug.com/396344 |
229 IN_PROC_BROWSER_TEST_F(BrowserWindowPropertyManagerTest, DISABLED_HostedApp) { | 229 IN_PROC_BROWSER_TEST_F(BrowserWindowPropertyManagerTest, HostedApp) { |
230 #if defined(USE_ASH) | 230 #if defined(USE_ASH) |
231 // Disable this test in Metro+Ash where Windows window properties aren't used. | 231 // Disable this test in Metro+Ash where Windows window properties aren't used. |
232 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 232 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
233 return; | 233 return; |
234 #endif | 234 #endif |
235 | 235 |
236 // This test checks HWND properties that are only available on Win7+. | 236 // This test checks HWND properties that are only available on Win7+. |
237 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 237 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
238 return; | 238 return; |
239 | 239 |
(...skipping 18 matching lines...) Expand all Loading... |
258 for (chrome::BrowserIterator it; !it.done() && !app_browser; it.Next()) { | 258 for (chrome::BrowserIterator it; !it.done() && !app_browser; it.Next()) { |
259 if (*it != browser()) | 259 if (*it != browser()) |
260 app_browser = *it; | 260 app_browser = *it; |
261 } | 261 } |
262 ASSERT_TRUE(app_browser); | 262 ASSERT_TRUE(app_browser); |
263 ASSERT_TRUE(app_browser != browser()); | 263 ASSERT_TRUE(app_browser != browser()); |
264 | 264 |
265 WaitAndValidateBrowserWindowProperties( | 265 WaitAndValidateBrowserWindowProperties( |
266 base::Bind(&ValidateHostedAppWindowProperties, app_browser, extension)); | 266 base::Bind(&ValidateHostedAppWindowProperties, app_browser, extension)); |
267 } | 267 } |
OLD | NEW |