mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38
This commit is contained in:
parent
e4657c1496
commit
81f079c722
77 changed files with 2043 additions and 524 deletions
|
@ -109,7 +109,7 @@ var GenericSensorTest = (() => {
|
|||
this.readingSizeInBytes_ =
|
||||
device.mojom.SensorInitParams.kReadBufferSizeForTests;
|
||||
this.sharedBufferSizeInBytes_ = this.readingSizeInBytes_ *
|
||||
(device.mojom.SensorType.RELATIVE_ORIENTATION_QUATERNION + 1);
|
||||
(device.mojom.SensorType.MAX_VALUE + 1);
|
||||
let rv = Mojo.createSharedBuffer(this.sharedBufferSizeInBytes_);
|
||||
assert_equals(rv.result, Mojo.RESULT_OK, "Failed to create buffer");
|
||||
this.sharedBufferHandle_ = rv.handle;
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
SensorType.ABSOLUTE_ORIENTATION_QUATERNION = SensorType.ABSOLUTE_ORIENTATION_EULER_ANGLES + 1;
|
||||
SensorType.RELATIVE_ORIENTATION_EULER_ANGLES = SensorType.ABSOLUTE_ORIENTATION_QUATERNION + 1;
|
||||
SensorType.RELATIVE_ORIENTATION_QUATERNION = SensorType.RELATIVE_ORIENTATION_EULER_ANGLES + 1;
|
||||
SensorType.MIN_VALUE = 0,
|
||||
SensorType.MAX_VALUE = 10,
|
||||
|
||||
SensorType.isKnownEnumValue = function(value) {
|
||||
switch (value) {
|
||||
|
@ -60,6 +62,8 @@
|
|||
var ReportingMode = {};
|
||||
ReportingMode.ON_CHANGE = 0;
|
||||
ReportingMode.CONTINUOUS = ReportingMode.ON_CHANGE + 1;
|
||||
ReportingMode.MIN_VALUE = 0,
|
||||
ReportingMode.MAX_VALUE = 1,
|
||||
|
||||
ReportingMode.isKnownEnumValue = function(value) {
|
||||
switch (value) {
|
||||
|
@ -688,13 +692,13 @@
|
|||
};
|
||||
|
||||
SensorProxy.prototype.getDefaultConfiguration = function() {
|
||||
var params = new Sensor_GetDefaultConfiguration_Params();
|
||||
var params_ = new Sensor_GetDefaultConfiguration_Params();
|
||||
return new Promise(function(resolve, reject) {
|
||||
var builder = new codec.MessageV1Builder(
|
||||
kSensor_GetDefaultConfiguration_Name,
|
||||
codec.align(Sensor_GetDefaultConfiguration_Params.encodedSize),
|
||||
codec.kMessageExpectsResponse, 0);
|
||||
builder.encodeStruct(Sensor_GetDefaultConfiguration_Params, params);
|
||||
builder.encodeStruct(Sensor_GetDefaultConfiguration_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.acceptAndExpectResponse(message).then(function(message) {
|
||||
var reader = new codec.MessageReader(message);
|
||||
|
@ -712,14 +716,14 @@
|
|||
};
|
||||
|
||||
SensorProxy.prototype.addConfiguration = function(configuration) {
|
||||
var params = new Sensor_AddConfiguration_Params();
|
||||
params.configuration = configuration;
|
||||
var params_ = new Sensor_AddConfiguration_Params();
|
||||
params_.configuration = configuration;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var builder = new codec.MessageV1Builder(
|
||||
kSensor_AddConfiguration_Name,
|
||||
codec.align(Sensor_AddConfiguration_Params.encodedSize),
|
||||
codec.kMessageExpectsResponse, 0);
|
||||
builder.encodeStruct(Sensor_AddConfiguration_Params, params);
|
||||
builder.encodeStruct(Sensor_AddConfiguration_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.acceptAndExpectResponse(message).then(function(message) {
|
||||
var reader = new codec.MessageReader(message);
|
||||
|
@ -737,12 +741,12 @@
|
|||
};
|
||||
|
||||
SensorProxy.prototype.removeConfiguration = function(configuration) {
|
||||
var params = new Sensor_RemoveConfiguration_Params();
|
||||
params.configuration = configuration;
|
||||
var params_ = new Sensor_RemoveConfiguration_Params();
|
||||
params_.configuration = configuration;
|
||||
var builder = new codec.MessageV0Builder(
|
||||
kSensor_RemoveConfiguration_Name,
|
||||
codec.align(Sensor_RemoveConfiguration_Params.encodedSize));
|
||||
builder.encodeStruct(Sensor_RemoveConfiguration_Params, params);
|
||||
builder.encodeStruct(Sensor_RemoveConfiguration_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.accept(message);
|
||||
};
|
||||
|
@ -752,11 +756,11 @@
|
|||
};
|
||||
|
||||
SensorProxy.prototype.suspend = function() {
|
||||
var params = new Sensor_Suspend_Params();
|
||||
var params_ = new Sensor_Suspend_Params();
|
||||
var builder = new codec.MessageV0Builder(
|
||||
kSensor_Suspend_Name,
|
||||
codec.align(Sensor_Suspend_Params.encodedSize));
|
||||
builder.encodeStruct(Sensor_Suspend_Params, params);
|
||||
builder.encodeStruct(Sensor_Suspend_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.accept(message);
|
||||
};
|
||||
|
@ -766,11 +770,11 @@
|
|||
};
|
||||
|
||||
SensorProxy.prototype.resume = function() {
|
||||
var params = new Sensor_Resume_Params();
|
||||
var params_ = new Sensor_Resume_Params();
|
||||
var builder = new codec.MessageV0Builder(
|
||||
kSensor_Resume_Name,
|
||||
codec.align(Sensor_Resume_Params.encodedSize));
|
||||
builder.encodeStruct(Sensor_Resume_Params, params);
|
||||
builder.encodeStruct(Sensor_Resume_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.accept(message);
|
||||
};
|
||||
|
@ -780,12 +784,12 @@
|
|||
};
|
||||
|
||||
SensorProxy.prototype.configureReadingChangeNotifications = function(enabled) {
|
||||
var params = new Sensor_ConfigureReadingChangeNotifications_Params();
|
||||
params.enabled = enabled;
|
||||
var params_ = new Sensor_ConfigureReadingChangeNotifications_Params();
|
||||
params_.enabled = enabled;
|
||||
var builder = new codec.MessageV0Builder(
|
||||
kSensor_ConfigureReadingChangeNotifications_Name,
|
||||
codec.align(Sensor_ConfigureReadingChangeNotifications_Params.encodedSize));
|
||||
builder.encodeStruct(Sensor_ConfigureReadingChangeNotifications_Params, params);
|
||||
builder.encodeStruct(Sensor_ConfigureReadingChangeNotifications_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.accept(message);
|
||||
};
|
||||
|
@ -967,11 +971,11 @@
|
|||
};
|
||||
|
||||
SensorClientProxy.prototype.raiseError = function() {
|
||||
var params = new SensorClient_RaiseError_Params();
|
||||
var params_ = new SensorClient_RaiseError_Params();
|
||||
var builder = new codec.MessageV0Builder(
|
||||
kSensorClient_RaiseError_Name,
|
||||
codec.align(SensorClient_RaiseError_Params.encodedSize));
|
||||
builder.encodeStruct(SensorClient_RaiseError_Params, params);
|
||||
builder.encodeStruct(SensorClient_RaiseError_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.accept(message);
|
||||
};
|
||||
|
@ -981,11 +985,11 @@
|
|||
};
|
||||
|
||||
SensorClientProxy.prototype.sensorReadingChanged = function() {
|
||||
var params = new SensorClient_SensorReadingChanged_Params();
|
||||
var params_ = new SensorClient_SensorReadingChanged_Params();
|
||||
var builder = new codec.MessageV0Builder(
|
||||
kSensorClient_SensorReadingChanged_Name,
|
||||
codec.align(SensorClient_SensorReadingChanged_Params.encodedSize));
|
||||
builder.encodeStruct(SensorClient_SensorReadingChanged_Params, params);
|
||||
builder.encodeStruct(SensorClient_SensorReadingChanged_Params, params_);
|
||||
var message = builder.finish();
|
||||
this.receiver_.accept(message);
|
||||
};
|
||||
|
@ -1067,4 +1071,4 @@
|
|||
exports.SensorClient = SensorClient;
|
||||
exports.SensorClientPtr = SensorClientPtr;
|
||||
exports.SensorClientAssociatedPtr = SensorClientAssociatedPtr;
|
||||
})();
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue