| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 if (debuggerModel.isPaused()) { | 406 if (debuggerModel.isPaused()) { |
| 407 this.releaseControl(); | 407 this.releaseControl(); |
| 408 return; | 408 return; |
| 409 } | 409 } |
| 410 this._waitForScriptPause(this.releaseControl.bind(this)); | 410 this._waitForScriptPause(this.releaseControl.bind(this)); |
| 411 } | 411 } |
| 412 }; | 412 }; |
| 413 | 413 |
| 414 TestSuite.prototype.enableTouchEmulation = function() | 414 TestSuite.prototype.enableTouchEmulation = function() |
| 415 { | 415 { |
| 416 WebInspector.overridesSupport._emulateTouchEventsInTarget(WebInspector.targe
tManager.mainTarget(), true, "mobile"); | 416 var deviceModeModel = new WebInspector.DeviceModeModel(function() {}); |
| 417 deviceModeModel._target = WebInspector.targetManager.mainTarget(); |
| 418 deviceModeModel._applyTouch(true, true); |
| 417 }; | 419 }; |
| 418 | 420 |
| 419 TestSuite.prototype.switchToPanel = function(panelName) | 421 TestSuite.prototype.switchToPanel = function(panelName) |
| 420 { | 422 { |
| 421 this.showPanel(panelName).then(this.releaseControl.bind(this)); | 423 this.showPanel(panelName).then(this.releaseControl.bind(this)); |
| 422 this.takeControl(); | 424 this.takeControl(); |
| 423 } | 425 } |
| 424 | 426 |
| 425 // Regression test for crbug.com/370035. | 427 // Regression test for crbug.com/370035. |
| 426 TestSuite.prototype.testDeviceMetricsOverrides = function() | 428 TestSuite.prototype.testDeviceMetricsOverrides = function() |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 }; | 819 }; |
| 818 | 820 |
| 819 return new TestSuite(); | 821 return new TestSuite(); |
| 820 | 822 |
| 821 } | 823 } |
| 822 | 824 |
| 823 if (window.uiTests) { | 825 if (window.uiTests) { |
| 824 WebInspector.notifications.addEventListener(WebInspector.NotificationService
.Events.InspectorAgentEnabledForTests, | 826 WebInspector.notifications.addEventListener(WebInspector.NotificationService
.Events.InspectorAgentEnabledForTests, |
| 825 window.uiTests.testSuiteReady.bind(null, createTestSuite)); | 827 window.uiTests.testSuiteReady.bind(null, createTestSuite)); |
| 826 } | 828 } |
| OLD | NEW |