| 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 690 |
| 691 ConsoleModel.consoleModel.addEventListener(ConsoleModel.ConsoleModel.Event
s.MessageAdded, onConsoleMessage, this); | 691 ConsoleModel.consoleModel.addEventListener(ConsoleModel.ConsoleModel.Event
s.MessageAdded, onConsoleMessage, this); |
| 692 SDK.multitargetNetworkManager.setNetworkConditions(preset); | 692 SDK.multitargetNetworkManager.setNetworkConditions(preset); |
| 693 } | 693 } |
| 694 | 694 |
| 695 test.takeControl(); | 695 test.takeControl(); |
| 696 step1(); | 696 step1(); |
| 697 | 697 |
| 698 function step1() { | 698 function step1() { |
| 699 testPreset( | 699 testPreset( |
| 700 NetworkConditions.NetworkConditionsSelector.presets[0], | 700 MobileThrottling.NetworkConditionsSelector.presets[0], |
| 701 ['offline event: online = false', 'connection change event: type = non
e; downlinkMax = 0'], step2); | 701 ['offline event: online = false', 'connection change event: type = non
e; downlinkMax = 0'], step2); |
| 702 } | 702 } |
| 703 | 703 |
| 704 function step2() { | 704 function step2() { |
| 705 testPreset( | 705 testPreset( |
| 706 NetworkConditions.NetworkConditionsSelector.presets[1], | 706 MobileThrottling.NetworkConditionsSelector.presets[1], |
| 707 ['online event: online = true', 'connection change event: type = cellu
lar; downlinkMax = 0.390625'], step3); | 707 ['online event: online = true', 'connection change event: type = cellu
lar; downlinkMax = 0.390625'], step3); |
| 708 } | 708 } |
| 709 | 709 |
| 710 function step3() { | 710 function step3() { |
| 711 testPreset( | 711 testPreset( |
| 712 NetworkConditions.NetworkConditionsSelector.presets[2], | 712 MobileThrottling.NetworkConditionsSelector.presets[2], |
| 713 ['connection change event: type = cellular; downlinkMax = 1.4400000000
000002'], | 713 ['connection change event: type = cellular; downlinkMax = 1.4400000000
000002'], |
| 714 test.releaseControl.bind(test)); | 714 test.releaseControl.bind(test)); |
| 715 } | 715 } |
| 716 }; | 716 }; |
| 717 | 717 |
| 718 TestSuite.prototype.testScreenshotRecording = function() { | 718 TestSuite.prototype.testScreenshotRecording = function() { |
| 719 var test = this; | 719 var test = this; |
| 720 | 720 |
| 721 function performActionsInPage(callback) { | 721 function performActionsInPage(callback) { |
| 722 var count = 0; | 722 var count = 0; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 if (runtimeModel.executionContexts().length >= n) | 1100 if (runtimeModel.executionContexts().length >= n) |
| 1101 callback.call(null); | 1101 callback.call(null); |
| 1102 else | 1102 else |
| 1103 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated',
checkForExecutionContexts.bind(this)); | 1103 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated',
checkForExecutionContexts.bind(this)); |
| 1104 } | 1104 } |
| 1105 }; | 1105 }; |
| 1106 | 1106 |
| 1107 | 1107 |
| 1108 window.uiTests = new TestSuite(window.domAutomationController); | 1108 window.uiTests = new TestSuite(window.domAutomationController); |
| 1109 })(window); | 1109 })(window); |
| OLD | NEW |