Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: components/test_runner/event_sender.cc

Issue 2080963002: Fix inspector layout tests to deal send tab via event sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/test_runner/event_sender.h" 5 #include "components/test_runner/event_sender.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 } else if ("backspace" == code_str || 1558 } else if ("backspace" == code_str ||
1559 "Backspace" == code_str) { 1559 "Backspace" == code_str) {
1560 code = ui::VKEY_BACK; 1560 code = ui::VKEY_BACK;
1561 domKeyString.assign("Backspace"); 1561 domKeyString.assign("Backspace");
1562 domCodeString.assign("Backspace"); 1562 domCodeString.assign("Backspace");
1563 } else if ("escape" == code_str || 1563 } else if ("escape" == code_str ||
1564 "Escape" == code_str) { 1564 "Escape" == code_str) {
1565 code = ui::VKEY_ESCAPE; 1565 code = ui::VKEY_ESCAPE;
1566 domKeyString.assign("Escape"); 1566 domKeyString.assign("Escape");
1567 domCodeString.assign("Escape"); 1567 domCodeString.assign("Escape");
1568 } else if ("Tab" == code_str) {
1569 code = ui::VKEY_TAB;
1570 domKeyString.assign("Tab");
1571 domCodeString.assign("Tab");
1568 } else { 1572 } else {
1569 // Compare the input string with the function-key names defined by the 1573 // Compare the input string with the function-key names defined by the
1570 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key 1574 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key
1571 // name, set its key code. 1575 // name, set its key code.
1572 for (int i = 1; i <= 24; ++i) { 1576 for (int i = 1; i <= 24; ++i) {
1573 std::string function_key_name = base::StringPrintf("F%d", i); 1577 std::string function_key_name = base::StringPrintf("F%d", i);
1574 if (function_key_name == code_str) { 1578 if (function_key_name == code_str) {
1575 code = ui::VKEY_F1 + (i - 1); 1579 code = ui::VKEY_F1 + (i - 1);
1576 domKeyString = function_key_name; 1580 domKeyString = function_key_name;
1577 domCodeString = function_key_name; 1581 domCodeString = function_key_name;
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2809 2813
2810 const blink::WebView* EventSender::view() const { 2814 const blink::WebView* EventSender::view() const {
2811 return web_test_proxy_base_->web_view(); 2815 return web_test_proxy_base_->web_view();
2812 } 2816 }
2813 2817
2814 blink::WebView* EventSender::view() { 2818 blink::WebView* EventSender::view() {
2815 return web_test_proxy_base_->web_view(); 2819 return web_test_proxy_base_->web_view();
2816 } 2820 }
2817 2821
2818 } // namespace test_runner 2822 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698