| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var testRunner = testRunner || {}; | 5 var testRunner = testRunner || {}; |
| 6 var accessibilityController = accessibilityController || {}; | 6 var accessibilityController = accessibilityController || {}; |
| 7 var gamepadController = gamepadController || {}; | 7 var gamepadController = gamepadController || {}; |
| 8 var eventSender = eventSender || {}; | 8 var eventSender = eventSender || {}; |
| 9 var textInputController = textInputController || {}; | 9 var textInputController = textInputController || {}; |
| 10 | 10 |
| 11 (function() { | 11 (function() { |
| 12 native function GetWorkerThreadCount(); | 12 native function GetWorkerThreadCount(); |
| 13 native function NotifyDone(); | 13 native function NotifyDone(); |
| 14 native function OverridePreference(); | 14 native function OverridePreference(); |
| 15 native function SetDumpAsText(); | 15 native function SetDumpAsText(); |
| 16 native function SetDumpChildFramesAsText(); | 16 native function SetDumpChildFramesAsText(); |
| 17 native function SetPrinting(); | 17 native function SetPrinting(); |
| 18 native function SetShouldStayOnPageAfterHandlingBeforeUnload(); | 18 native function SetShouldStayOnPageAfterHandlingBeforeUnload(); |
| 19 native function SetWaitUntilDone(); | 19 native function SetWaitUntilDone(); |
| 20 | 20 |
| 21 native function NotImplemented(); | 21 native function NotImplemented(); |
| 22 | 22 |
| 23 var DefaultHandler = function(name) { | 23 var DefaultHandler = function(name) { |
| 24 var handler = { | 24 var handler = { |
| 25 get: function(receiver, property) { | 25 get: function(receiver, property) { |
| 26 NotImplemented(name, property); | 26 NotImplemented(name, property); |
| 27 return function() {} | 27 return function() {} |
| 28 }, |
| 29 getPropertyDescriptor: function(property) { |
| 30 NotImplemented(name, property); |
| 31 return undefined; |
| 28 } | 32 } |
| 29 } | 33 } |
| 30 return Proxy.create(handler); | 34 return Proxy.create(handler); |
| 31 } | 35 } |
| 32 | 36 |
| 33 var TestRunner = function() { | 37 var TestRunner = function() { |
| 34 Object.defineProperty(this, | 38 Object.defineProperty(this, |
| 35 "workerThreadCount", | 39 "workerThreadCount", |
| 36 {value: GetWorkerThreadCount}); | 40 {value: GetWorkerThreadCount}); |
| 37 Object.defineProperty(this, | 41 Object.defineProperty(this, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 gamepadController = new GamepadController(); | 65 gamepadController = new GamepadController(); |
| 62 | 66 |
| 63 var EventSender = function() {} | 67 var EventSender = function() {} |
| 64 EventSender.prototype = DefaultHandler("eventSender"); | 68 EventSender.prototype = DefaultHandler("eventSender"); |
| 65 eventSender = new EventSender(); | 69 eventSender = new EventSender(); |
| 66 | 70 |
| 67 var TextInputController = function() {} | 71 var TextInputController = function() {} |
| 68 TextInputController.prototype = DefaultHandler("textInputController"); | 72 TextInputController.prototype = DefaultHandler("textInputController"); |
| 69 textInputController = new TextInputController(); | 73 textInputController = new TextInputController(); |
| 70 })(); | 74 })(); |
| OLD | NEW |