| 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 "build/build_config.h" | 5 #include "build/build_config.h" | 
| 6 #include "chrome/browser/extensions/browser_action_test_util.h" | 6 #include "chrome/browser/extensions/browser_action_test_util.h" | 
| 7 #include "chrome/browser/extensions/extension_action.h" | 7 #include "chrome/browser/extensions/extension_action.h" | 
| 8 #include "chrome/browser/extensions/extension_action_manager.h" | 8 #include "chrome/browser/extensions/extension_action_manager.h" | 
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" | 
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" | 
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138                                   kFlagEnableIncognito | kFlagUseIncognito)) | 138                                   kFlagEnableIncognito | kFlagUseIncognito)) | 
| 139       << message_; | 139       << message_; | 
| 140   frame_observer.Wait(); | 140   frame_observer.Wait(); | 
| 141   // Non-Aura Linux uses a singleton for the popup, so it looks like all windows | 141   // Non-Aura Linux uses a singleton for the popup, so it looks like all windows | 
| 142   // have popups if there is any popup open. | 142   // have popups if there is any popup open. | 
| 143 #if !(defined(OS_LINUX) && !defined(USE_AURA)) | 143 #if !(defined(OS_LINUX) && !defined(USE_AURA)) | 
| 144   // Starting window does not have a popup. | 144   // Starting window does not have a popup. | 
| 145   EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); | 145   EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); | 
| 146 #endif | 146 #endif | 
| 147   // Incognito window should have a popup. | 147   // Incognito window should have a popup. | 
| 148   EXPECT_TRUE(BrowserActionTestUtil(BrowserList::GetInstance( | 148   EXPECT_TRUE(BrowserActionTestUtil(BrowserList::GetInstance()->GetLastActive()) | 
| 149       chrome::GetActiveDesktop())->GetLastActive()).HasPopup()); | 149                   .HasPopup()); | 
| 150 } | 150 } | 
| 151 | 151 | 
| 152 // Tests that an extension can open a popup in the last active incognito window | 152 // Tests that an extension can open a popup in the last active incognito window | 
| 153 // even from a background page with a non-incognito profile. | 153 // even from a background page with a non-incognito profile. | 
| 154 // (crbug.com/448853) | 154 // (crbug.com/448853) | 
| 155 #if defined(OS_WIN) | 155 #if defined(OS_WIN) | 
| 156 // Fails on XP: http://crbug.com/515717 | 156 // Fails on XP: http://crbug.com/515717 | 
| 157 #define MAYBE_TestOpenPopupIncognitoFromBackground \ | 157 #define MAYBE_TestOpenPopupIncognitoFromBackground \ | 
| 158   DISABLED_TestOpenPopupIncognitoFromBackground | 158   DISABLED_TestOpenPopupIncognitoFromBackground | 
| 159 #else | 159 #else | 
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 370 | 370 | 
| 371   // Forcibly closing the browser HWND should not cause a crash. | 371   // Forcibly closing the browser HWND should not cause a crash. | 
| 372   EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); | 372   EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); | 
| 373   EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); | 373   EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); | 
| 374   EXPECT_EQ(FALSE, ::IsWindow(hwnd)); | 374   EXPECT_EQ(FALSE, ::IsWindow(hwnd)); | 
| 375 } | 375 } | 
| 376 #endif  // OS_WIN | 376 #endif  // OS_WIN | 
| 377 | 377 | 
| 378 }  // namespace | 378 }  // namespace | 
| 379 }  // namespace extensions | 379 }  // namespace extensions | 
| OLD | NEW | 
|---|