Bug 1582024 [wpt PR 19128] - Convert SensorClient to new Mojo types, a=testonly
authorMiyoung Shin <myid.shin@igalia.com>
Mon, 23 Sep 2019 12:24:41 +0000
changeset 494843 37bfc7e918d606e53d29542c2763984efecd6b6a
parent 494842 ac3809482e8cbd4f0068d4c6f2f05e6d108e52d0
child 494844 8ba086cf6967fa3c88c20f21e800cec464da7d4c
push id36615
push usercsabou@mozilla.com
push dateWed, 25 Sep 2019 09:50:53 +0000
treeherdermozilla-central@c31591e0b66f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1582024, 19128, 955171, 978694, 1809127, 698392
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1582024 [wpt PR 19128] - Convert SensorClient to new Mojo types, a=testonly Automatic update from web-platform-tests Convert SensorClient to new Mojo types This CL converts SensorClient{Ptr, Request} in device, services and blink to the new Mojo type, and uses pending_receiver<SensorClient> in sensor_provider.mojom. Bug: 955171, 978694 Change-Id: I6a231623f86c6ce258e71dd2fba281324ec0ca09 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809127 Commit-Queue: Miyoung Shin <myid.shin@igalia.com> Reviewed-by: Dominick Ng <dominickn@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Philip J├Ągenstedt <foolip@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Cr-Commit-Position: refs/heads/master@{#698392} -- wpt-commits: 08a1f9b86ae7875a631981f4a0def2069fa32418 wpt-pr: 19128
testing/web-platform/tests/resources/chromium/generic_sensor_mocks.js
testing/web-platform/tests/resources/chromium/sensor_provider.mojom.js
--- a/testing/web-platform/tests/resources/chromium/generic_sensor_mocks.js
+++ b/testing/web-platform/tests/resources/chromium/generic_sensor_mocks.js
@@ -195,17 +195,17 @@ var GenericSensorTest = (() => {
       // services/device/public/cpp/generic_sensor/sensor_traits.h)
       if (type == device.mojom.SensorType.AMBIENT_LIGHT ||
           type == device.mojom.SensorType.MAGNETOMETER) {
         this.maxFrequency_ = Math.min(10, this.maxFrequency_);
       }
 
       const initParams = new device.mojom.SensorInitParams({
         sensor: sensorPtr,
-        clientRequest: mojo.makeRequest(this.activeSensors_.get(type).client_),
+        clientReceiver: mojo.makeRequest(this.activeSensors_.get(type).client_),
         memory: rv.handle,
         bufferOffset: offset,
         mode: reportingMode,
         defaultConfiguration: defaultConfig,
         minimumFrequency: this.minFrequency_,
         maximumFrequency: this.maxFrequency_
       });
 
--- a/testing/web-platform/tests/resources/chromium/sensor_provider.mojom.js
+++ b/testing/web-platform/tests/resources/chromium/sensor_provider.mojom.js
@@ -52,17 +52,17 @@
     this.initDefaults_();
     this.initFields_(values);
   }
 
 
   SensorInitParams.kReadBufferSizeForTests = 48;
   SensorInitParams.prototype.initDefaults_ = function() {
     this.sensor = new sensor$.SensorPtr();
-    this.clientRequest = new bindings.InterfaceRequest();
+    this.clientReceiver = new bindings.InterfaceRequest();
     this.memory = null;
     this.bufferOffset = 0;
     this.mode = 0;
     this.defaultConfiguration = null;
     this.maximumFrequency = 0;
     this.minimumFrequency = 0;
   };
   SensorInitParams.prototype.initFields_ = function(fields) {
@@ -87,17 +87,17 @@
 
 
     // validate SensorInitParams.sensor
     err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 0, false);
     if (err !== validator.validationError.NONE)
         return err;
 
 
-    // validate SensorInitParams.clientRequest
+    // validate SensorInitParams.clientReceiver
     err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 8, false)
     if (err !== validator.validationError.NONE)
         return err;
 
 
     // validate SensorInitParams.memory
     err = messageValidator.validateHandle(offset + codec.kStructHeaderSize + 12, false)
     if (err !== validator.validationError.NONE)
@@ -124,17 +124,17 @@
   SensorInitParams.encodedSize = codec.kStructHeaderSize + 56;
 
   SensorInitParams.decode = function(decoder) {
     var packed;
     var val = new SensorInitParams();
     var numberOfBytes = decoder.readUint32();
     var version = decoder.readUint32();
     val.sensor = decoder.decodeStruct(new codec.Interface(sensor$.SensorPtr));
-    val.clientRequest = decoder.decodeStruct(codec.InterfaceRequest);
+    val.clientReceiver = decoder.decodeStruct(codec.InterfaceRequest);
     val.memory = decoder.decodeStruct(codec.Handle);
     val.bufferOffset = decoder.decodeStruct(codec.Uint64);
     val.mode = decoder.decodeStruct(codec.Int32);
     decoder.skip(1);
     decoder.skip(1);
     decoder.skip(1);
     decoder.skip(1);
     val.defaultConfiguration = decoder.decodeStructPointer(sensor$.SensorConfiguration);
@@ -143,17 +143,17 @@
     return val;
   };
 
   SensorInitParams.encode = function(encoder, val) {
     var packed;
     encoder.writeUint32(SensorInitParams.encodedSize);
     encoder.writeUint32(0);
     encoder.encodeStruct(new codec.Interface(sensor$.SensorPtr), val.sensor);
-    encoder.encodeStruct(codec.InterfaceRequest, val.clientRequest);
+    encoder.encodeStruct(codec.InterfaceRequest, val.clientReceiver);
     encoder.encodeStruct(codec.Handle, val.memory);
     encoder.encodeStruct(codec.Uint64, val.bufferOffset);
     encoder.encodeStruct(codec.Int32, val.mode);
     encoder.skip(1);
     encoder.skip(1);
     encoder.skip(1);
     encoder.skip(1);
     encoder.encodeStructPointer(sensor$.SensorConfiguration, val.defaultConfiguration);