OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/extension_tabs_module.h" | 5 #include "chrome/browser/extensions/extension_tabs_module.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 // Run in incognito window. | 249 // Run in incognito window. |
250 EXPECT_TRUE(MatchPattern( | 250 EXPECT_TRUE(MatchPattern( |
251 RunFunctionAndReturnError( | 251 RunFunctionAndReturnError( |
252 new CreateWindowFunction(), | 252 new CreateWindowFunction(), |
253 kArgs, | 253 kArgs, |
254 incognito_browser), | 254 incognito_browser), |
255 extension_tabs_module_constants::kIncognitoModeIsDisabled)); | 255 extension_tabs_module_constants::kIncognitoModeIsDisabled)); |
256 } | 256 } |
257 | 257 |
258 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, InvalidUpdateWindowState) { | 258 #if defined(USE_AURA) |
| 259 // crbug.com/105173. |
| 260 #define MAYBE_InvalidUpdateWindowState DISABLED_InvalidUpdateWindowState |
| 261 #else |
| 262 #define MAYBE_InvalidUpdateWindowState InvalidUpdateWindowState |
| 263 #endif |
| 264 |
| 265 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, MAYBE_InvalidUpdateWindowState) { |
259 static const char kArgsMinimizedWithFocus[] = | 266 static const char kArgsMinimizedWithFocus[] = |
260 "[%u, {\"state\": \"minimized\", \"focused\": true}]"; | 267 "[%u, {\"state\": \"minimized\", \"focused\": true}]"; |
261 static const char kArgsMaximizedWithoutFocus[] = | 268 static const char kArgsMaximizedWithoutFocus[] = |
262 "[%u, {\"state\": \"maximized\", \"focused\": false}]"; | 269 "[%u, {\"state\": \"maximized\", \"focused\": false}]"; |
263 static const char kArgsMinimizedWithBounds[] = | 270 static const char kArgsMinimizedWithBounds[] = |
264 "[%u, {\"state\": \"minimized\", \"width\": 500}]"; | 271 "[%u, {\"state\": \"minimized\", \"width\": 500}]"; |
265 static const char kArgsMaximizedWithBounds[] = | 272 static const char kArgsMaximizedWithBounds[] = |
266 "[%u, {\"state\": \"maximized\", \"width\": 500}]"; | 273 "[%u, {\"state\": \"maximized\", \"width\": 500}]"; |
267 int window_id = ExtensionTabUtil::GetWindowId(browser()); | 274 int window_id = ExtensionTabUtil::GetWindowId(browser()); |
268 | 275 |
(...skipping 18 matching lines...) Expand all Loading... |
287 browser()), | 294 browser()), |
288 extension_tabs_module_constants::kInvalidWindowStateError)); | 295 extension_tabs_module_constants::kInvalidWindowStateError)); |
289 | 296 |
290 EXPECT_TRUE(MatchPattern( | 297 EXPECT_TRUE(MatchPattern( |
291 RunFunctionAndReturnError( | 298 RunFunctionAndReturnError( |
292 new UpdateWindowFunction(), | 299 new UpdateWindowFunction(), |
293 base::StringPrintf(kArgsMaximizedWithBounds, window_id), | 300 base::StringPrintf(kArgsMaximizedWithBounds, window_id), |
294 browser()), | 301 browser()), |
295 extension_tabs_module_constants::kInvalidWindowStateError)); | 302 extension_tabs_module_constants::kInvalidWindowStateError)); |
296 } | 303 } |
OLD | NEW |