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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 { "search_id", ui::TEXT_INPUT_TYPE_SEARCH }, | 250 { "search_id", ui::TEXT_INPUT_TYPE_SEARCH }, |
251 { "email_id", ui::TEXT_INPUT_TYPE_EMAIL }, | 251 { "email_id", ui::TEXT_INPUT_TYPE_EMAIL }, |
252 { "number_id", ui::TEXT_INPUT_TYPE_NUMBER }, | 252 { "number_id", ui::TEXT_INPUT_TYPE_NUMBER }, |
253 { "tel_id", ui::TEXT_INPUT_TYPE_TELEPHONE }, | 253 { "tel_id", ui::TEXT_INPUT_TYPE_TELEPHONE }, |
254 { "url_id", ui::TEXT_INPUT_TYPE_URL }, | 254 { "url_id", ui::TEXT_INPUT_TYPE_URL }, |
255 { "textarea_id", ui::TEXT_INPUT_TYPE_TEXT_AREA }, | 255 { "textarea_id", ui::TEXT_INPUT_TYPE_TEXT_AREA }, |
256 { "contenteditable_id", ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE }, | 256 { "contenteditable_id", ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE }, |
257 }; // The order should be same as tab order in all_input_node.html. | 257 }; // The order should be same as tab order in all_input_node.html. |
258 | 258 |
259 for (size_t i = 0; i < arraysize(expectations); ++i) { | 259 for (size_t i = 0; i < arraysize(expectations); ++i) { |
260 content::SimulateKeyPress(tab, ui::VKEY_TAB, false, false, false, false); | 260 content::SimulateKeyPress(tab, ui::DomKey::TAB, ui::DomCode::TAB, |
| 261 ui::VKEY_TAB, false, false, false, false); |
261 | 262 |
262 helper.WaitForTextInputStateChanged(expectations[i].type); | 263 helper.WaitForTextInputStateChanged(expectations[i].type); |
263 EXPECT_EQ(expectations[i].type, helper.GetTextInputType()); | 264 EXPECT_EQ(expectations[i].type, helper.GetTextInputType()); |
264 } | 265 } |
265 | 266 |
266 for (size_t i = 0; i < arraysize(expectations); ++i) { | 267 for (size_t i = 0; i < arraysize(expectations); ++i) { |
267 helper.ClickElement(expectations[i].node_id, tab); | 268 helper.ClickElement(expectations[i].node_id, tab); |
268 | 269 |
269 helper.WaitForTextInputStateChanged(expectations[i].type); | 270 helper.WaitForTextInputStateChanged(expectations[i].type); |
270 EXPECT_EQ(expectations[i].type, helper.GetTextInputType()); | 271 EXPECT_EQ(expectations[i].type, helper.GetTextInputType()); |
(...skipping 28 matching lines...) Expand all Loading... |
299 0); | 300 0); |
300 content::WebContents* new_tab = | 301 content::WebContents* new_tab = |
301 browser()->tab_strip_model()->GetActiveWebContents(); | 302 browser()->tab_strip_model()->GetActiveWebContents(); |
302 EXPECT_NE(base_tab, new_tab); | 303 EXPECT_NE(base_tab, new_tab); |
303 | 304 |
304 helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT); | 305 helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT); |
305 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, helper.GetTextInputType()); | 306 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, helper.GetTextInputType()); |
306 } | 307 } |
307 | 308 |
308 } // namespace chromeos | 309 } // namespace chromeos |
OLD | NEW |