| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 blink::WebInputEvent::Type type, | 617 blink::WebInputEvent::Type type, |
| 618 ui::KeyboardCode key_code, | 618 ui::KeyboardCode key_code, |
| 619 int native_key_code, | 619 int native_key_code, |
| 620 int modifiers) { | 620 int modifiers) { |
| 621 NativeWebKeyboardEvent event; | 621 NativeWebKeyboardEvent event; |
| 622 BuildSimpleWebKeyEvent(type, key_code, native_key_code, modifiers, &event); | 622 BuildSimpleWebKeyEvent(type, key_code, native_key_code, modifiers, &event); |
| 623 web_contents->GetRenderViewHost()->ForwardKeyboardEvent(event); | 623 web_contents->GetRenderViewHost()->ForwardKeyboardEvent(event); |
| 624 } | 624 } |
| 625 | 625 |
| 626 // Tests that Ctrl+Enter/Cmd+Enter keys on a link open the backgournd tab. | 626 // Tests that Ctrl+Enter/Cmd+Enter keys on a link open the backgournd tab. |
| 627 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, CtrlEnterKey) { | 627 // Failing due to Blink r189541 http://crbug.com/455691 |
| 628 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DISABLED_CtrlEnterKey) { |
| 628 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 629 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
| 629 | 630 |
| 630 GURL url(embedded_test_server()->GetURL( | 631 GURL url(embedded_test_server()->GetURL( |
| 631 "/popup_blocker/popup-simulated-click-on-anchor.html")); | 632 "/popup_blocker/popup-simulated-click-on-anchor.html")); |
| 632 ui_test_utils::NavigateToURL(browser(), url); | 633 ui_test_utils::NavigateToURL(browser(), url); |
| 633 | 634 |
| 634 content::WindowedNotificationObserver wait_for_new_tab( | 635 content::WindowedNotificationObserver wait_for_new_tab( |
| 635 chrome::NOTIFICATION_TAB_ADDED, | 636 chrome::NOTIFICATION_TAB_ADDED, |
| 636 content::NotificationService::AllSources()); | 637 content::NotificationService::AllSources()); |
| 637 | 638 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 wait_for_new_tab.Wait(); | 670 wait_for_new_tab.Wait(); |
| 670 | 671 |
| 671 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(), | 672 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(), |
| 672 browser()->host_desktop_type())); | 673 browser()->host_desktop_type())); |
| 673 ASSERT_EQ(2, browser()->tab_strip_model()->count()); | 674 ASSERT_EQ(2, browser()->tab_strip_model()->count()); |
| 674 // Check that we create the background tab. | 675 // Check that we create the background tab. |
| 675 ASSERT_EQ(0, browser()->tab_strip_model()->active_index()); | 676 ASSERT_EQ(0, browser()->tab_strip_model()->active_index()); |
| 676 } | 677 } |
| 677 | 678 |
| 678 } // namespace | 679 } // namespace |
| OLD | NEW |