| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 if (WebInspector.targetManager.targets().length >= n) | 1096 if (WebInspector.targetManager.targets().length >= n) |
| 1097 callback.call(null); | 1097 callback.call(null); |
| 1098 else | 1098 else |
| 1099 this.addSniffer(WebInspector.TargetManager.prototype, "addTarget", c
heckTargets.bind(this)); | 1099 this.addSniffer(WebInspector.TargetManager.prototype, "addTarget", c
heckTargets.bind(this)); |
| 1100 } | 1100 } |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 /** | 1103 /** |
| 1104 * Key event with given key identifier. | 1104 * Key event with given key identifier. |
| 1105 */ | 1105 */ |
| 1106 TestSuite.createKeyEvent = function(keyIdentifier) | 1106 TestSuite.createKeyEvent = function(key) |
| 1107 { | 1107 { |
| 1108 var evt = document.createEvent("KeyboardEvent"); | 1108 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); |
| 1109 evt.initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel *
/, null /* view */, keyIdentifier, ""); | |
| 1110 return evt; | |
| 1111 }; | 1109 }; |
| 1112 | 1110 |
| 1113 window.uiTests = new TestSuite(window.domAutomationController); | 1111 window.uiTests = new TestSuite(window.domAutomationController); |
| 1114 })(window); | 1112 })(window); |
| OLD | NEW |