| 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   692  |   692  | 
|   693       SDK.multitargetConsoleModel.addEventListener(SDK.ConsoleModel.Events.Messa
      geAdded, onConsoleMessage, this); |   693       SDK.multitargetConsoleModel.addEventListener(SDK.ConsoleModel.Events.Messa
      geAdded, onConsoleMessage, this); | 
|   694       SDK.multitargetNetworkManager.setNetworkConditions(preset); |   694       SDK.multitargetNetworkManager.setNetworkConditions(preset); | 
|   695     } |   695     } | 
|   696  |   696  | 
|   697     test.takeControl(); |   697     test.takeControl(); | 
|   698     step1(); |   698     step1(); | 
|   699  |   699  | 
|   700     function step1() { |   700     function step1() { | 
|   701       testPreset( |   701       testPreset( | 
|   702           Components.NetworkConditionsSelector._presets[0], |   702           NetworkConditions.NetworkConditionsSelector.presets[0], | 
|   703           ['offline event: online = false', 'connection change event: type = non
      e; downlinkMax = 0'], step2); |   703           ['offline event: online = false', 'connection change event: type = non
      e; downlinkMax = 0'], step2); | 
|   704     } |   704     } | 
|   705  |   705  | 
|   706     function step2() { |   706     function step2() { | 
|   707       testPreset( |   707       testPreset( | 
|   708           Components.NetworkConditionsSelector._presets[2], |   708           NetworkConditions.NetworkConditionsSelector.presets[2], | 
|   709           ['online event: online = true', 'connection change event: type = cellu
      lar; downlinkMax = 0.244140625'], |   709           ['online event: online = true', 'connection change event: type = cellu
      lar; downlinkMax = 0.244140625'], | 
|   710           step3); |   710           step3); | 
|   711     } |   711     } | 
|   712  |   712  | 
|   713     function step3() { |   713     function step3() { | 
|   714       testPreset( |   714       testPreset( | 
|   715           Components.NetworkConditionsSelector._presets[8], ['connection change 
      event: type = wifi; downlinkMax = 30'], |   715           NetworkConditions.NetworkConditionsSelector.presets[8], | 
|   716           test.releaseControl.bind(test)); |   716           ['connection change event: type = wifi; downlinkMax = 30'], test.relea
      seControl.bind(test)); | 
|   717     } |   717     } | 
|   718   }; |   718   }; | 
|   719  |   719  | 
|   720   TestSuite.prototype.testScreenshotRecording = function() { |   720   TestSuite.prototype.testScreenshotRecording = function() { | 
|   721     var test = this; |   721     var test = this; | 
|   722  |   722  | 
|   723     function performActionsInPage(callback) { |   723     function performActionsInPage(callback) { | 
|   724       var count = 0; |   724       var count = 0; | 
|   725       var div = document.createElement('div'); |   725       var div = document.createElement('div'); | 
|   726       div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100p
      x; position: absolute;'); |   726       div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100p
      x; position: absolute;'); | 
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1103       if (runtimeModel.executionContexts().length >= n) |  1103       if (runtimeModel.executionContexts().length >= n) | 
|  1104         callback.call(null); |  1104         callback.call(null); | 
|  1105       else |  1105       else | 
|  1106         this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', 
      checkForExecutionContexts.bind(this)); |  1106         this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', 
      checkForExecutionContexts.bind(this)); | 
|  1107     } |  1107     } | 
|  1108   }; |  1108   }; | 
|  1109  |  1109  | 
|  1110  |  1110  | 
|  1111   window.uiTests = new TestSuite(window.domAutomationController); |  1111   window.uiTests = new TestSuite(window.domAutomationController); | 
|  1112 })(window); |  1112 })(window); | 
| OLD | NEW |