| 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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 | 710 |
| 711 function finish() | 711 function finish() |
| 712 { | 712 { |
| 713 test.releaseControl(); | 713 test.releaseControl(); |
| 714 } | 714 } |
| 715 | 715 |
| 716 test.takeControl(); | 716 test.takeControl(); |
| 717 step1(); | 717 step1(); |
| 718 }; | 718 }; |
| 719 | 719 |
| 720 TestSuite.prototype.testDispatchKeyEventDoesNotCrash = function() |
| 721 { |
| 722 WebInspector.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent
({ |
| 723 type: "rawKeyDown", |
| 724 windowsVirtualKeyCode: 0x23, |
| 725 key: "End" |
| 726 }); |
| 727 WebInspector.targetManager.mainTarget().inputAgent().invoke_dispatchKeyEvent
({ |
| 728 type: "keyUp", |
| 729 windowsVirtualKeyCode: 0x23, |
| 730 key: "End" |
| 731 }); |
| 732 }; |
| 733 |
| 720 TestSuite.prototype.testEmulateNetworkConditions = function() | 734 TestSuite.prototype.testEmulateNetworkConditions = function() |
| 721 { | 735 { |
| 722 var test = this; | 736 var test = this; |
| 723 | 737 |
| 724 function testPreset(preset, messages, next) | 738 function testPreset(preset, messages, next) |
| 725 { | 739 { |
| 726 function onConsoleMessage(event) | 740 function onConsoleMessage(event) |
| 727 { | 741 { |
| 728 var index = messages.indexOf(event.data.messageText); | 742 var index = messages.indexOf(event.data.messageText); |
| 729 if (index === -1) { | 743 if (index === -1) { |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 /** | 1170 /** |
| 1157 * Key event with given key identifier. | 1171 * Key event with given key identifier. |
| 1158 */ | 1172 */ |
| 1159 TestSuite.createKeyEvent = function(key) | 1173 TestSuite.createKeyEvent = function(key) |
| 1160 { | 1174 { |
| 1161 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); | 1175 return new KeyboardEvent("keydown", {bubbles: true, cancelable:true, key: ke
y}); |
| 1162 }; | 1176 }; |
| 1163 | 1177 |
| 1164 window.uiTests = new TestSuite(window.domAutomationController); | 1178 window.uiTests = new TestSuite(window.domAutomationController); |
| 1165 })(window); | 1179 })(window); |
| OLD | NEW |