| 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 "chrome/browser/extensions/browser_action_test_util.h" | 5 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 6 #include "chrome/browser/extensions/extension_action.h" | 6 #include "chrome/browser/extensions/extension_action.h" |
| 7 #include "chrome/browser/extensions/extension_action_manager.h" | 7 #include "chrome/browser/extensions/extension_action_manager.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 OpenExtensionPopupViaAPI(); | 329 OpenExtensionPopupViaAPI(); |
| 330 BrowserActionTestUtil test_util(browser()); | 330 BrowserActionTestUtil test_util(browser()); |
| 331 const gfx::NativeView view = test_util.GetPopupNativeView(); | 331 const gfx::NativeView view = test_util.GetPopupNativeView(); |
| 332 EXPECT_NE(static_cast<gfx::NativeView>(NULL), view); | 332 EXPECT_NE(static_cast<gfx::NativeView>(NULL), view); |
| 333 const HWND hwnd = views::HWNDForNativeView(view); | 333 const HWND hwnd = views::HWNDForNativeView(view); |
| 334 EXPECT_EQ(hwnd, | 334 EXPECT_EQ(hwnd, |
| 335 views::HWNDForNativeView(browser()->window()->GetNativeWindow())); | 335 views::HWNDForNativeView(browser()->window()->GetNativeWindow())); |
| 336 EXPECT_EQ(TRUE, ::IsWindow(hwnd)); | 336 EXPECT_EQ(TRUE, ::IsWindow(hwnd)); |
| 337 | 337 |
| 338 // Create a new browser window to prevent the message loop from terminating. | 338 // Create a new browser window to prevent the message loop from terminating. |
| 339 Browser* new_browser = chrome::FindBrowserWithWebContents( | 339 browser()->OpenURL(content::OpenURLParams(GURL("about:"), content::Referrer(), |
| 340 browser()->OpenURL(content::OpenURLParams( | 340 NEW_WINDOW, |
| 341 GURL("about:"), content::Referrer(), NEW_WINDOW, | 341 ui::PAGE_TRANSITION_TYPED, false)); |
| 342 ui::PAGE_TRANSITION_TYPED, false))); | |
| 343 | 342 |
| 344 // Forcibly closing the browser HWND should not cause a crash. | 343 // Forcibly closing the browser HWND should not cause a crash. |
| 345 EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); | 344 EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); |
| 346 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); | 345 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); |
| 347 EXPECT_EQ(FALSE, ::IsWindow(hwnd)); | 346 EXPECT_EQ(FALSE, ::IsWindow(hwnd)); |
| 348 } | 347 } |
| 349 #endif // OS_WIN | 348 #endif // OS_WIN |
| 350 | 349 |
| 351 } // namespace | 350 } // namespace |
| 352 } // namespace extensions | 351 } // namespace extensions |
| OLD | NEW |