This test should make sure that the event is fired before the promise but it currently just ignores the order. Fix the test to make sure the event is fire before the promise per step 5.5.4 of readValue(): https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-readvalue
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04c5a1998f2c7079efca383a22e77e968251db4c commit 04c5a1998f2c7079efca383a22e77e968251db4c Author: ortuno <ortuno@chromium.org> Date: Wed Apr 26 07:24:58 2017 bluetooth: Check the order of event and promise resolution for readValue Introduces assert_promise_event_order_ that checks the order of promise resolution and events firing is correct. Makes assert_event_fires_after_promise and assert_event_fires_before_promise use this function. Also removes some obsolete TODOs. BUG= 697698 Review-Url: https://codereview.chromium.org/2825393004 Cr-Commit-Position: refs/heads/master@{#467261} [modify] https://crrev.com/04c5a1998f2c7079efca383a22e77e968251db4c/third_party/WebKit/LayoutTests/bluetooth/characteristic/notifications/add-multiple-event-listeners.html [modify] https://crrev.com/04c5a1998f2c7079efca383a22e77e968251db4c/third_party/WebKit/LayoutTests/bluetooth/characteristic/notifications/event-after-starting.html [modify] https://crrev.com/04c5a1998f2c7079efca383a22e77e968251db4c/third_party/WebKit/LayoutTests/bluetooth/characteristic/readValue/add-multiple-event-listeners.html [modify] https://crrev.com/04c5a1998f2c7079efca383a22e77e968251db4c/third_party/WebKit/LayoutTests/bluetooth/characteristic/readValue/event-is-fired.html [modify] https://crrev.com/04c5a1998f2c7079efca383a22e77e968251db4c/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js
Comment 1 by juncai@chromium.org
, Mar 14 2017