| 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_toolbar_model.h" | 10 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 return; | 157 return; |
| 158 | 158 |
| 159 const Extension* extension = | 159 const Extension* extension = |
| 160 LoadExtensionIncognito(test_data_dir_.AppendASCII("browser_action"). | 160 LoadExtensionIncognito(test_data_dir_.AppendASCII("browser_action"). |
| 161 AppendASCII("open_popup_background")); | 161 AppendASCII("open_popup_background")); |
| 162 ASSERT_TRUE(extension); | 162 ASSERT_TRUE(extension); |
| 163 ExtensionTestMessageListener listener(false); | 163 ExtensionTestMessageListener listener(false); |
| 164 listener.set_extension_id(extension->id()); | 164 listener.set_extension_id(extension->id()); |
| 165 | 165 |
| 166 Browser* incognito_browser = | 166 Browser* incognito_browser = |
| 167 ui_test_utils::OpenURLOffTheRecord(profile(), GURL("chrome://newtab/")); | 167 OpenURLOffTheRecord(profile(), GURL("chrome://newtab/")); |
| 168 listener.WaitUntilSatisfied(); | 168 listener.WaitUntilSatisfied(); |
| 169 EXPECT_EQ(std::string("opened"), listener.message()); | 169 EXPECT_EQ(std::string("opened"), listener.message()); |
| 170 EXPECT_TRUE(BrowserActionTestUtil(incognito_browser).HasPopup()); | 170 EXPECT_TRUE(BrowserActionTestUtil(incognito_browser).HasPopup()); |
| 171 } | 171 } |
| 172 | 172 |
| 173 #if defined(OS_LINUX) | 173 #if defined(OS_LINUX) |
| 174 #define MAYBE_TestOpenPopupDoesNotCloseOtherPopups DISABLED_TestOpenPopupDoesNot
CloseOtherPopups | 174 #define MAYBE_TestOpenPopupDoesNotCloseOtherPopups DISABLED_TestOpenPopupDoesNot
CloseOtherPopups |
| 175 #else | 175 #else |
| 176 #define MAYBE_TestOpenPopupDoesNotCloseOtherPopups TestOpenPopupDoesNotCloseOthe
rPopups | 176 #define MAYBE_TestOpenPopupDoesNotCloseOtherPopups TestOpenPopupDoesNotCloseOthe
rPopups |
| 177 #endif | 177 #endif |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 // Forcibly closing the browser HWND should not cause a crash. | 362 // Forcibly closing the browser HWND should not cause a crash. |
| 363 EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); | 363 EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); |
| 364 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); | 364 EXPECT_EQ(TRUE, ::DestroyWindow(hwnd)); |
| 365 EXPECT_EQ(FALSE, ::IsWindow(hwnd)); | 365 EXPECT_EQ(FALSE, ::IsWindow(hwnd)); |
| 366 } | 366 } |
| 367 #endif // OS_WIN | 367 #endif // OS_WIN |
| 368 | 368 |
| 369 } // namespace | 369 } // namespace |
| 370 } // namespace extensions | 370 } // namespace extensions |
| OLD | NEW |