Index: chrome/browser/ui/views/constrained_window_views_browsertest.cc |
diff --git a/chrome/browser/ui/views/constrained_window_views_browsertest.cc b/chrome/browser/ui/views/constrained_window_views_browsertest.cc |
index 5db441f1a9143d94846528364e2cb8fe89a793ac..5538e47365595e8391ea9ab2ae2ba7a795cf947e 100644 |
--- a/chrome/browser/ui/views/constrained_window_views_browsertest.cc |
+++ b/chrome/browser/ui/views/constrained_window_views_browsertest.cc |
@@ -5,14 +5,11 @@ |
#include <memory> |
#include "base/macros.h" |
-#include "base/test/scoped_feature_list.h" |
#include "build/build_config.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_commands.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/browser/ui/views/tab_modal_confirm_dialog_views.h" |
-#include "chrome/common/chrome_features.h" |
-#include "chrome/common/url_constants.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/interactive_test_utils.h" |
#include "chrome/test/base/ui_test_utils.h" |
@@ -170,51 +167,6 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, TabMoveTest) { |
EXPECT_EQ(NULL, dialog->GetWidget()); |
} |
-// Tests that the web contents navigates when backspace is pressed. |
-IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, NavigationOnBackspace) { |
- content::WebContents* web_contents = |
- browser()->tab_strip_model()->GetActiveWebContents(); |
- content::WaitForLoadStop(web_contents); |
- const GURL original_url = web_contents->GetURL(); |
- EXPECT_NE(GURL(chrome::kChromeUIVersionURL), original_url); |
- ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIVersionURL)); |
- content::WaitForLoadStop(web_contents); |
- EXPECT_EQ(GURL(chrome::kChromeUIVersionURL), web_contents->GetURL()); |
- |
- std::unique_ptr<TestDialog> dialog = ShowModalDialog(web_contents); |
- |
- views::Widget* widget = dialog->GetWidget(); |
- |
- EXPECT_TRUE(widget->IsVisible()); |
- EXPECT_EQ(dialog->GetContentsView(), |
- widget->GetFocusManager()->GetFocusedView()); |
- |
- // Pressing backspace should not navigate back and close the dialog |
- // with the Finch flag disabled. |
- EXPECT_TRUE(chrome::CanGoBack(browser())); |
- EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_BACK, |
- false, false, false, false)); |
- content::RunAllPendingInMessageLoop(); |
- content::WaitForLoadStop(web_contents); |
- |
- EXPECT_EQ(widget, dialog->GetWidget()); |
- EXPECT_EQ(GURL(chrome::kChromeUIVersionURL), web_contents->GetURL()); |
- |
- // Pressing backspace should navigate back and close the dialog with the |
- // Finch flag enabled. |
- base::test::ScopedFeatureList scoped_feature_list; |
- scoped_feature_list.InitAndEnableFeature(features::kBackspaceGoesBackFeature); |
- |
- EXPECT_TRUE(chrome::CanGoBack(browser())); |
- EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_BACK, |
- false, false, false, false)); |
- content::RunAllPendingInMessageLoop(); |
- content::WaitForLoadStop(web_contents); |
- |
- EXPECT_EQ(nullptr, dialog->GetWidget()); |
- EXPECT_EQ(original_url, web_contents->GetURL()); |
-} |
- |
// Tests that the dialog closes when the escape key is pressed. |
IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, ClosesOnEscape) { |
#if defined(OS_WIN) |