| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |