mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
Update web-platform-tests to revision 68a256f49be380ca4add535ce8ece9de28820e6b
This commit is contained in:
parent
e54935c25a
commit
cd5bf022bd
178 changed files with 6082 additions and 795 deletions
|
@ -2,19 +2,15 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
var mojomId = 'device/usb/public/interfaces/chooser_service.mojom';
|
||||
var mojomId = 'device/usb/public/mojom/chooser_service.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
}
|
||||
mojo.internal.markMojomLoaded(mojomId);
|
||||
|
||||
// TODO(yzshen): Define these aliases to minimize the differences between the
|
||||
// old/new modes. Remove them when the old mode goes away.
|
||||
var bindings = mojo;
|
||||
var associatedBindings = mojo;
|
||||
var codec = mojo.internal;
|
||||
|
@ -25,13 +21,13 @@
|
|||
mojo.internal.exposeNamespace('device.mojom');
|
||||
if (mojo.config.autoLoadMojomDeps) {
|
||||
mojo.internal.loadMojomIfNecessary(
|
||||
'device/usb/public/interfaces/device.mojom', 'device.mojom.js');
|
||||
'device/usb/public/mojom/device.mojom', 'device.mojom.js');
|
||||
}
|
||||
var device_manager$ =
|
||||
mojo.internal.exposeNamespace('device.mojom');
|
||||
if (mojo.config.autoLoadMojomDeps) {
|
||||
mojo.internal.loadMojomIfNecessary(
|
||||
'device/usb/public/interfaces/device_manager.mojom', 'device_manager.mojom.js');
|
||||
'device/usb/public/mojom/device_manager.mojom', 'device_manager.mojom.js');
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,7 +62,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbChooserService_GetPermission_Params.deviceFilters
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(device_manager$.UsbDeviceFilter), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -122,7 +117,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbChooserService_GetPermission_ResponseParams.result
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, device$.UsbDeviceInfo, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
|
|
@ -2,19 +2,15 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
var mojomId = 'device/usb/public/interfaces/device.mojom';
|
||||
var mojomId = 'device/usb/public/mojom/device.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
}
|
||||
mojo.internal.markMojomLoaded(mojomId);
|
||||
|
||||
// TODO(yzshen): Define these aliases to minimize the differences between the
|
||||
// old/new modes. Remove them when the old mode goes away.
|
||||
var bindings = mojo;
|
||||
var associatedBindings = mojo;
|
||||
var codec = mojo.internal;
|
||||
|
@ -25,7 +21,7 @@
|
|||
mojo.internal.exposeNamespace('mojo.common.mojom');
|
||||
if (mojo.config.autoLoadMojomDeps) {
|
||||
mojo.internal.loadMojomIfNecessary(
|
||||
'mojo/common/string16.mojom', '../../../../mojo/common/string16.mojom.js');
|
||||
'mojo/public/mojom/base/string16.mojom', '../../../../mojo/public/mojom/base/string16.mojom.js');
|
||||
}
|
||||
|
||||
|
||||
|
@ -212,14 +208,12 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbEndpointInfo.direction
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 4, UsbTransferDirection);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbEndpointInfo.type
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, UsbTransferType);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -297,14 +291,12 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbAlternateInterfaceInfo.interfaceName
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, string16$.String16, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbAlternateInterfaceInfo.endpoints
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 8, new codec.PointerTo(UsbEndpointInfo), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -380,7 +372,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbInterfaceInfo.alternates
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(UsbAlternateInterfaceInfo), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -455,14 +446,12 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbConfigurationInfo.configurationName
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, string16$.String16, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbConfigurationInfo.interfaces
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 8, new codec.PointerTo(UsbInterfaceInfo), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -552,7 +541,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceInfo.guid
|
||||
err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -570,21 +558,18 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceInfo.manufacturerName
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, string16$.String16, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceInfo.productName
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 32, string16$.String16, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceInfo.serialNumber
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, string16$.String16, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -592,7 +577,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceInfo.configurations
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 48, 8, new codec.PointerTo(UsbConfigurationInfo), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -688,14 +672,12 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbControlTransferParams.type
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbControlTransferType);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbControlTransferParams.recipient
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 4, UsbControlTransferRecipient);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -772,7 +754,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbIsochronousPacket.status
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, UsbTransferStatus);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -886,7 +867,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_Open_ResponseParams.error
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbOpenDeviceError);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -1814,7 +1794,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_ControlTransferIn_Params.params
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, UsbControlTransferParams, false);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -1877,16 +1856,14 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_ControlTransferIn_ResponseParams.status
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_ControlTransferIn_ResponseParams.data
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, true, [0], 0);
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
@ -1952,14 +1929,12 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_ControlTransferOut_Params.params
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, UsbControlTransferParams, false);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_ControlTransferOut_Params.data
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2028,7 +2003,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_ControlTransferOut_ResponseParams.status
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2165,16 +2139,14 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_GenericTransferIn_ResponseParams.status
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_GenericTransferIn_ResponseParams.data
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, true, [0], 0);
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
@ -2241,7 +2213,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_GenericTransferOut_Params.data
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2308,7 +2279,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_GenericTransferOut_ResponseParams.status
|
||||
err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2375,7 +2345,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_IsochronousTransferIn_Params.packetLengths
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 4, codec.Uint32, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2443,14 +2412,12 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_IsochronousTransferIn_ResponseParams.data
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, true, [0], 0);
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_IsochronousTransferIn_ResponseParams.packets
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(UsbIsochronousPacket), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2512,14 +2479,12 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_IsochronousTransferOut_Params.data
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_IsochronousTransferOut_Params.packetLengths
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 4, codec.Uint32, false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -2588,7 +2553,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDevice_IsochronousTransferOut_ResponseParams.packets
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(UsbIsochronousPacket), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
|
|
@ -2,19 +2,15 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
var mojomId = 'device/usb/public/interfaces/device_manager.mojom';
|
||||
var mojomId = 'device/usb/public/mojom/device_manager.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
}
|
||||
mojo.internal.markMojomLoaded(mojomId);
|
||||
|
||||
// TODO(yzshen): Define these aliases to minimize the differences between the
|
||||
// old/new modes. Remove them when the old mode goes away.
|
||||
var bindings = mojo;
|
||||
var associatedBindings = mojo;
|
||||
var codec = mojo.internal;
|
||||
|
@ -25,13 +21,13 @@
|
|||
mojo.internal.exposeNamespace('device.mojom');
|
||||
if (mojo.config.autoLoadMojomDeps) {
|
||||
mojo.internal.loadMojomIfNecessary(
|
||||
'device/usb/public/interfaces/device.mojom', 'device.mojom.js');
|
||||
'device/usb/public/mojom/device.mojom', 'device.mojom.js');
|
||||
}
|
||||
var string16$ =
|
||||
mojo.internal.exposeNamespace('mojo.common.mojom');
|
||||
if (mojo.config.autoLoadMojomDeps) {
|
||||
mojo.internal.loadMojomIfNecessary(
|
||||
'mojo/common/string16.mojom', '../../../../mojo/common/string16.mojom.js');
|
||||
'mojo/public/mojom/base/string16.mojom', '../../../../mojo/public/mojom/base/string16.mojom.js');
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,7 +82,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceFilter.serialNumber
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, string16$.String16, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -165,7 +160,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbEnumerationOptions.filters
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(UsbDeviceFilter), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -221,7 +215,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManager_GetDevices_Params.options
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, UsbEnumerationOptions, true);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -277,7 +270,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManager_GetDevices_ResponseParams.results
|
||||
err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(device$.UsbDeviceInfo), false, [0], 0);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -334,14 +326,12 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManager_GetDevice_Params.guid
|
||||
err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManager_GetDevice_Params.deviceRequest
|
||||
err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 8, false)
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -407,7 +397,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManager_SetClient_Params.client
|
||||
err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 0, false);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -463,7 +452,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManagerClient_OnDeviceAdded_Params.deviceInfo
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, device$.UsbDeviceInfo, false);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -519,7 +507,6 @@
|
|||
return err;
|
||||
|
||||
|
||||
|
||||
// validate UsbDeviceManagerClient_OnDeviceRemoved_Params.deviceInfo
|
||||
err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, device$.UsbDeviceInfo, false);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
'use strict';
|
||||
|
||||
(function() {
|
||||
var mojomId = 'device/bluetooth/public/interfaces/test/fake_bluetooth.mojom';
|
||||
var mojomId = 'device/bluetooth/public/mojom/test/fake_bluetooth.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
|
@ -21,7 +21,7 @@
|
|||
mojo.internal.exposeNamespace('bluetooth.mojom');
|
||||
if (mojo.config.autoLoadMojomDeps) {
|
||||
mojo.internal.loadMojomIfNecessary(
|
||||
'device/bluetooth/public/interfaces/uuid.mojom', '../uuid.mojom.js');
|
||||
'device/bluetooth/public/mojom/uuid.mojom', '../uuid.mojom.js');
|
||||
}
|
||||
|
||||
|
||||
|
@ -1256,7 +1256,7 @@
|
|||
|
||||
|
||||
FakeCentral_RemoveFakeService_Params.prototype.initDefaults_ = function() {
|
||||
this.identifier = null;
|
||||
this.serviceId = null;
|
||||
this.peripheralAddress = null;
|
||||
};
|
||||
FakeCentral_RemoveFakeService_Params.prototype.initFields_ = function(fields) {
|
||||
|
@ -1280,7 +1280,7 @@
|
|||
return err;
|
||||
|
||||
|
||||
// validate FakeCentral_RemoveFakeService_Params.identifier
|
||||
// validate FakeCentral_RemoveFakeService_Params.serviceId
|
||||
err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
@ -1301,7 +1301,7 @@
|
|||
var val = new FakeCentral_RemoveFakeService_Params();
|
||||
var numberOfBytes = decoder.readUint32();
|
||||
var version = decoder.readUint32();
|
||||
val.identifier = decoder.decodeStruct(codec.String);
|
||||
val.serviceId = decoder.decodeStruct(codec.String);
|
||||
val.peripheralAddress = decoder.decodeStruct(codec.String);
|
||||
return val;
|
||||
};
|
||||
|
@ -1310,7 +1310,7 @@
|
|||
var packed;
|
||||
encoder.writeUint32(FakeCentral_RemoveFakeService_Params.encodedSize);
|
||||
encoder.writeUint32(0);
|
||||
encoder.encodeStruct(codec.String, val.identifier);
|
||||
encoder.encodeStruct(codec.String, val.serviceId);
|
||||
encoder.encodeStruct(codec.String, val.peripheralAddress);
|
||||
};
|
||||
function FakeCentral_RemoveFakeService_ResponseParams(values) {
|
||||
|
@ -3017,9 +3017,9 @@
|
|||
.apply(this.ptr.getProxy(), arguments);
|
||||
};
|
||||
|
||||
FakeCentralProxy.prototype.removeFakeService = function(identifier, peripheralAddress) {
|
||||
FakeCentralProxy.prototype.removeFakeService = function(serviceId, peripheralAddress) {
|
||||
var params = new FakeCentral_RemoveFakeService_Params();
|
||||
params.identifier = identifier;
|
||||
params.serviceId = serviceId;
|
||||
params.peripheralAddress = peripheralAddress;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var builder = new codec.MessageV1Builder(
|
||||
|
@ -3285,8 +3285,8 @@
|
|||
FakeCentralStub.prototype.addFakeService = function(peripheralAddress, serviceUuid) {
|
||||
return this.delegate_ && this.delegate_.addFakeService && this.delegate_.addFakeService(peripheralAddress, serviceUuid);
|
||||
}
|
||||
FakeCentralStub.prototype.removeFakeService = function(identifier, peripheralAddress) {
|
||||
return this.delegate_ && this.delegate_.removeFakeService && this.delegate_.removeFakeService(identifier, peripheralAddress);
|
||||
FakeCentralStub.prototype.removeFakeService = function(serviceId, peripheralAddress) {
|
||||
return this.delegate_ && this.delegate_.removeFakeService && this.delegate_.removeFakeService(serviceId, peripheralAddress);
|
||||
}
|
||||
FakeCentralStub.prototype.addFakeCharacteristic = function(characteristicUuid, properties, serviceId, peripheralAddress) {
|
||||
return this.delegate_ && this.delegate_.addFakeCharacteristic && this.delegate_.addFakeCharacteristic(characteristicUuid, properties, serviceId, peripheralAddress);
|
||||
|
@ -3422,7 +3422,7 @@
|
|||
return true;
|
||||
case kFakeCentral_RemoveFakeService_Name:
|
||||
var params = reader.decodeStruct(FakeCentral_RemoveFakeService_Params);
|
||||
this.removeFakeService(params.identifier, params.peripheralAddress).then(function(response) {
|
||||
this.removeFakeService(params.serviceId, params.peripheralAddress).then(function(response) {
|
||||
var responseParams =
|
||||
new FakeCentral_RemoveFakeService_ResponseParams();
|
||||
responseParams.success = response.success;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
if ((typeof mojo !== 'undefined') && mojo.internal && mojo.config) {
|
||||
|
||||
(function() {
|
||||
var mojomId = 'mojo/common/string16.mojom';
|
||||
var mojomId = 'mojo/public/mojom/base/string16.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
|
@ -87,7 +87,7 @@ if ((typeof mojo !== 'undefined') && mojo.internal && mojo.config) {
|
|||
|
||||
if ((typeof mojo === 'undefined') || !mojo.internal || !mojo.config) {
|
||||
|
||||
define("mojo/common/string16.mojom", [
|
||||
define("mojo/public/mojom/base/string16.mojom", [
|
||||
"mojo/public/js/associated_bindings",
|
||||
"mojo/public/js/bindings",
|
||||
"mojo/public/js/codec",
|
||||
|
|
|
@ -5,15 +5,12 @@
|
|||
'use strict';
|
||||
|
||||
(function() {
|
||||
var mojomId = 'device/bluetooth/public/interfaces/uuid.mojom';
|
||||
var mojomId = 'device/bluetooth/public/mojom/uuid.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
}
|
||||
mojo.internal.markMojomLoaded(mojomId);
|
||||
|
||||
// TODO(yzshen): Define these aliases to minimize the differences between the
|
||||
// old/new modes. Remove them when the old mode goes away.
|
||||
var bindings = mojo;
|
||||
var associatedBindings = mojo;
|
||||
var codec = mojo.internal;
|
||||
|
|
|
@ -20,12 +20,12 @@ let internal = {
|
|||
};
|
||||
|
||||
// Converts an ECMAScript String object to an instance of
|
||||
// mojo.common.mojom.String16.
|
||||
// mojo_base.mojom.String16.
|
||||
function mojoString16ToString(string16) {
|
||||
return String.fromCharCode.apply(null, string16.data);
|
||||
}
|
||||
|
||||
// Converts an instance of mojo.common.mojom.String16 to an ECMAScript String.
|
||||
// Converts an instance of mojo_base.mojom.String16 to an ECMAScript String.
|
||||
function stringToMojoString16(string) {
|
||||
let array = new Array(string.length);
|
||||
for (var i = 0; i < string.length; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue