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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" | 8 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 // Focus to password field. | 288 // Focus to password field. |
289 helper.ClickElement("password_id", base_tab); | 289 helper.ClickElement("password_id", base_tab); |
290 helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_PASSWORD); | 290 helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_PASSWORD); |
291 EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, helper.GetTextInputType()); | 291 EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, helper.GetTextInputType()); |
292 | 292 |
293 // Then opening new foreground tab and wait new TextInputType. | 293 // Then opening new foreground tab and wait new TextInputType. |
294 GURL new_url = ui_test_utils::GetTestUrl( | 294 GURL new_url = ui_test_utils::GetTestUrl( |
295 base::FilePath(FILE_PATH_LITERAL("textinput")), | 295 base::FilePath(FILE_PATH_LITERAL("textinput")), |
296 base::FilePath(FILE_PATH_LITERAL("focus_input_on_load.html"))); | 296 base::FilePath(FILE_PATH_LITERAL("focus_input_on_load.html"))); |
297 ui_test_utils::NavigateToURLWithDisposition(browser(), | 297 ui_test_utils::NavigateToURLWithDisposition( |
298 new_url, | 298 browser(), new_url, WindowOpenDisposition::NEW_FOREGROUND_TAB, 0); |
299 NEW_FOREGROUND_TAB, | |
300 0); | |
301 content::WebContents* new_tab = | 299 content::WebContents* new_tab = |
302 browser()->tab_strip_model()->GetActiveWebContents(); | 300 browser()->tab_strip_model()->GetActiveWebContents(); |
303 EXPECT_NE(base_tab, new_tab); | 301 EXPECT_NE(base_tab, new_tab); |
304 | 302 |
305 helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT); | 303 helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT); |
306 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, helper.GetTextInputType()); | 304 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, helper.GetTextInputType()); |
307 } | 305 } |
308 | 306 |
309 } // namespace chromeos | 307 } // namespace chromeos |
OLD | NEW |