| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/toolbar/browser_actions_bar_browsertest.h" | 5 #include "chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 browser_actions_bar()->Press(1); | 398 browser_actions_bar()->Press(1); |
| 399 observer.Wait(); | 399 observer.Wait(); |
| 400 EXPECT_FALSE(browser_actions_bar()->HasPopup()); | 400 EXPECT_FALSE(browser_actions_bar()->HasPopup()); |
| 401 EXPECT_FALSE(first_controller->is_showing_popup()); | 401 EXPECT_FALSE(first_controller->is_showing_popup()); |
| 402 EXPECT_FALSE(second_controller->is_showing_popup()); | 402 EXPECT_FALSE(second_controller->is_showing_popup()); |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 | 405 |
| 406 IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest, | 406 IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest, |
| 407 OverflowedBrowserActionPopupTest) { | 407 OverflowedBrowserActionPopupTest) { |
| 408 scoped_ptr<BrowserActionTestUtil> overflow_bar = | 408 std::unique_ptr<BrowserActionTestUtil> overflow_bar = |
| 409 browser_actions_bar()->CreateOverflowBar(); | 409 browser_actions_bar()->CreateOverflowBar(); |
| 410 | 410 |
| 411 // Load up two extensions that have browser action popups. | 411 // Load up two extensions that have browser action popups. |
| 412 base::FilePath data_dir = | 412 base::FilePath data_dir = |
| 413 test_data_dir_.AppendASCII("api_test").AppendASCII("browser_action"); | 413 test_data_dir_.AppendASCII("api_test").AppendASCII("browser_action"); |
| 414 const extensions::Extension* first_extension = | 414 const extensions::Extension* first_extension = |
| 415 LoadExtension(data_dir.AppendASCII("open_popup")); | 415 LoadExtension(data_dir.AppendASCII("open_popup")); |
| 416 ASSERT_TRUE(first_extension); | 416 ASSERT_TRUE(first_extension); |
| 417 const extensions::Extension* second_extension = | 417 const extensions::Extension* second_extension = |
| 418 LoadExtension(data_dir.AppendASCII("remove_popup")); | 418 LoadExtension(data_dir.AppendASCII("remove_popup")); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 EXPECT_EQ(page_action_extension->id(), | 501 EXPECT_EQ(page_action_extension->id(), |
| 502 browser_actions_bar()->GetExtensionId(0)); | 502 browser_actions_bar()->GetExtensionId(0)); |
| 503 browser_actions_bar()->Press(0); | 503 browser_actions_bar()->Press(0); |
| 504 base::RunLoop().RunUntilIdle(); | 504 base::RunLoop().RunUntilIdle(); |
| 505 EXPECT_TRUE(browser_actions_bar()->HasPopup()); | 505 EXPECT_TRUE(browser_actions_bar()->HasPopup()); |
| 506 // Cleanup the popup (to avoid having windows open at tear down). | 506 // Cleanup the popup (to avoid having windows open at tear down). |
| 507 browser_actions_bar()->HidePopup(); | 507 browser_actions_bar()->HidePopup(); |
| 508 content::RunAllBlockingPoolTasksUntilIdle(); | 508 content::RunAllBlockingPoolTasksUntilIdle(); |
| 509 EXPECT_FALSE(browser_actions_bar()->HasPopup()); | 509 EXPECT_FALSE(browser_actions_bar()->HasPopup()); |
| 510 } | 510 } |
| OLD | NEW |