Closed
Bug 939637
Opened 11 years ago
Closed 11 years ago
B2G Bluetooth: add test cases for navigator.BluetoothManager.onadapteradded
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 C1/1.4 S1(20dec)
People
(Reporter: vicamo, Assigned: vicamo)
References
Details
Attachments
(1 file, 1 obsolete file)
6.57 KB,
patch
|
echou
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=0dab94f942c0
Attachment #8333638 -
Flags: review?(echou)
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 8333638 [details] [diff] [review] patch Review of attachment 8333638 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth/tests/marionette/test_dom_BluetoothManager_adapteradded.js @@ +9,5 @@ > + > +startBluetoothTest(function testCaseMain(aAdapter) { > + log("Checking adapter attributes ..."); > + is(aAdapter.name, "Full Android on Emulator", "adapter.name"); > + is(aAdapter.class, 0, "adapter.class"); Racing condition for |adapter.class|. It seems this attribute is edited as 5767692 soon after onadapteradded event is emitted. Most of the time we got 0, but it should be 5767692 at the end.
Attachment #8333638 -
Flags: review?(echou)
Assignee | ||
Comment 3•11 years ago
|
||
$ adb shell hciconfig /dev/ttyS2 class hci0: Type: BR/EDR Bus: UART BD Address: 56:34:12:00:54:52 ACL MTU: 512:1 SCO MTU: 0:0 Class: 0x58020c Service Classes: Capturing, Object Transfer, Telephony Device Class: Phone, Smart phone
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #2) > ::: dom/bluetooth/tests/marionette/test_dom_BluetoothManager_adapteradded.js > > + is(aAdapter.class, 0, "adapter.class"); > > Racing condition for |adapter.class|. It seems this attribute is edited as > 5767692 soon after onadapteradded event is emitted. Most of the time we got > 0, but it should be 5767692 at the end. See bug 932914 comment 22, 23. Sometimes PropertyChange events come after onadapteradded.
Assignee | ||
Comment 5•11 years ago
|
||
1) add a 3 seconds time delay before returning |aAdapter|. 2) refactor |startBluetoothTest| a little bit more so that it still works with either value of 'bluetooth.enabled'.
Attachment #8333638 -
Attachment is obsolete: true
Attachment #8333760 -
Flags: review?
Assignee | ||
Comment 6•11 years ago
|
||
See also bug 912930, "stop using adapteradded event".
Assignee | ||
Updated•11 years ago
|
Attachment #8333760 -
Flags: review? → review?(echou)
Comment 7•11 years ago
|
||
Comment on attachment 8333760 [details] [diff] [review] patch : v2 Review of attachment 8333760 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Thanks.
Attachment #8333760 -
Flags: review?(echou) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/fc6d66e72c59
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fc6d66e72c59
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → 1.3 C1/1.4 S1(20dec)
You need to log in
before you can comment on or make changes to this bug.
Description
•