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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/spatial-navigation/resources/spatial-navigation-utils.js

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Original author: Doug Turner <doug.turner@gmail.com> 2 * Original author: Doug Turner <doug.turner@gmail.com>
3 * 3 *
4 * Contributors: 4 * Contributors:
5 * * Antonio Gomes <tonikitoo@webkit.org> 5 * * Antonio Gomes <tonikitoo@webkit.org>
6 **/ 6 **/
7 7
8 var gExpectedResults = 0; 8 var gExpectedResults = 0;
9 var gIndex = 0; 9 var gIndex = 0;
10 var gClosureCallback = null; 10 var gClosureCallback = null;
(...skipping 24 matching lines...) Expand all
35 35
36 doMove(); 36 doMove();
37 } 37 }
38 38
39 function doMove() 39 function doMove()
40 { 40 {
41 var direction; 41 var direction;
42 42
43 switch (gExpectedResults[gIndex][0]) { 43 switch (gExpectedResults[gIndex][0]) {
44 case "Up": 44 case "Up":
45 direction = "upArrow"; 45 direction = "ArrowUp";
46 break; 46 break;
47 case "Right": 47 case "Right":
48 direction = "rightArrow"; 48 direction = "ArrowRight";
49 break; 49 break;
50 case "Down": 50 case "Down":
51 direction = "downArrow"; 51 direction = "ArrowDown";
52 break; 52 break;
53 case "Left": 53 case "Left":
54 direction = "leftArrow"; 54 direction = "ArrowLeft";
55 break; 55 break;
56 case "Space": 56 case "Space":
57 direction = " "; 57 direction = " ";
58 break; 58 break;
59 default: 59 default:
60 debug("Action [" + gExpectedResults[gIndex][0] + "] not supported."); 60 debug("Action [" + gExpectedResults[gIndex][0] + "] not supported.");
61 } 61 }
62 62
63 if (window.testRunner && direction) 63 if (window.testRunner && direction)
64 eventSender.keyDown(direction); 64 eventSender.keyDown(direction);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (gFocusedDocument != document) 97 if (gFocusedDocument != document)
98 return; 98 return;
99 } 99 }
100 100
101 if (currentDocument.hasFocus()) { 101 if (currentDocument.hasFocus()) {
102 gFocusedDocument = currentDocument; 102 gFocusedDocument = currentDocument;
103 return; 103 return;
104 } 104 }
105 } 105 }
106 106
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698