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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 step1(); | 696 step1(); |
697 | 697 |
698 function step1() { | 698 function step1() { |
699 testPreset( | 699 testPreset( |
700 NetworkConditions.NetworkConditionsSelector.presets[0], | 700 NetworkConditions.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[2], | 706 NetworkConditions.NetworkConditionsSelector.presets[1], |
707 ['online event: online = true', 'connection change event: type = cellu
lar; downlinkMax = 0.244140625'], | 707 ['online event: online = true', 'connection change event: type = cellu
lar; downlinkMax = 0.390625'], step3); |
708 step3); | |
709 } | 708 } |
710 | 709 |
711 function step3() { | 710 function step3() { |
712 testPreset( | 711 testPreset( |
713 NetworkConditions.NetworkConditionsSelector.presets[8], | 712 NetworkConditions.NetworkConditionsSelector.presets[2], |
714 ['connection change event: type = wifi; downlinkMax = 30'], test.relea
seControl.bind(test)); | 713 ['connection change event: type = cellular; downlinkMax = 1.4400000000
000002'], |
| 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; |
723 var div = document.createElement('div'); | 723 var div = document.createElement('div'); |
724 div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100p
x; position: absolute;'); | 724 div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100p
x; position: absolute;'); |
(...skipping 375 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 |