Bug 1788646 [wpt PR 35650] - sensor mocks: Document MockSensor.buffer_'s layout....
commitdd67767503d4e2e5d1203e0dfa514e3bce63c716
authorRaphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Sat, 3 Sep 2022 15:19:15 +0000 (3 15:19 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sun, 4 Sep 2022 18:01:04 +0000 (4 18:01 +0000)
tree82b7627d06743537ff5672a589f22c2d9a683adf
parent253d94bb9ce33a7c2660ae3058c464aa4c254d35
Bug 1788646 [wpt PR 35650] - sensor mocks: Document MockSensor.buffer_'s layout., a=testonly

Automatic update from web-platform-tests
sensor mocks: Document MockSensor.buffer_'s layout.

Explain why we use certain offsets in |buffer_| to refer to timestamp
and readings as well as why the browser-side shared memory
implementation that relies on a OneWriterSeqLock that we never create
when using the JS mocks actually works.

While here, replace the magic numbers we were using as offsets in
|buffer_| with meaningful constants.

Change-Id: If60fc10e11bdbbaa64d8ac15199d390c4e6dac37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3859630
Auto-Submit: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1041228}

--

wpt-commits: 4f4345a6259e8fa1665d01be37b961a75277ab8d
wpt-pr: 35650
testing/web-platform/tests/resources/chromium/generic_sensor_mocks.js