Index: chrome/test/data/webui/bluetooth_internals_browsertest.js |
diff --git a/chrome/test/data/webui/bluetooth_internals_browsertest.js b/chrome/test/data/webui/bluetooth_internals_browsertest.js |
index 0e948f14dd66a28fee8d861e4a45d53d7a6cb7c3..2bfa1804bf53326bc901dd7393f30b3de8d7a799 100644 |
--- a/chrome/test/data/webui/bluetooth_internals_browsertest.js |
+++ b/chrome/test/data/webui/bluetooth_internals_browsertest.js |
@@ -51,9 +51,7 @@ BluetoothInternalsTest.prototype = { |
'device/bluetooth/public/interfaces/adapter.mojom', |
'device/bluetooth/public/interfaces/device.mojom', |
'mojo/public/js/bindings', |
- 'mojo/public/js/connection', |
- ]).then(function([frameInterfaces, adapter, device, bindings, |
- connection]) { |
+ ]).then(function([frameInterfaces, adapter, device, bindings]) { |
/** |
* A test adapter factory proxy for the chrome://bluetooth-internals |
* page. |
@@ -66,6 +64,7 @@ BluetoothInternalsTest.prototype = { |
'getAdapter', |
]); |
+ this.binding = new bindings.Binding(adapter.AdapterFactory, this); |
this.adapter = new TestAdapter(); |
this.adapterBinding_ = new bindings.Binding(adapter.Adapter, |
this.adapter); |
@@ -88,14 +87,12 @@ BluetoothInternalsTest.prototype = { |
* Must be used to create message pipe handle from test code. |
* |
* @constructor |
- * @extends {adapter.Adapter.stubClass} |
*/ |
var TestAdapter = function() { |
this.proxy = new TestAdapterProxy(); |
}; |
TestAdapter.prototype = { |
- __proto__: adapter.Adapter.stubClass.prototype, |
getInfo: function() { return this.proxy.getInfo(); }, |
getDevices: function() { return this.proxy.getDevices(); }, |
setClient: function(client) { return this.proxy.setClient(client); } |
@@ -146,10 +143,8 @@ BluetoothInternalsTest.prototype = { |
frameInterfaces.addInterfaceOverrideForTesting( |
adapter.AdapterFactory.name, function(handle) { |
- var stub = connection.bindHandleToStub( |
- handle, adapter.AdapterFactory); |
- |
this.adapterFactory = new TestAdapterFactoryProxy(); |
+ this.adapterFactory.binding.bind(handle); |
this.adapterFactory.adapter.proxy.setTestDevices([ |
this.fakeDeviceInfo1(), |
@@ -158,8 +153,6 @@ BluetoothInternalsTest.prototype = { |
this.adapterFactory.adapter.proxy.setTestAdapter( |
this.fakeAdapterInfo()); |
- bindings.StubBindings(stub).delegate = this.adapterFactory; |
- |
this.setupResolver.resolve(); |
}.bind(this)); |