Closed Bug 1415797 Opened 2 years ago Closed 2 years ago

Fix failures in dom/network/tests/ with comformant Promise handling

Categories

(Core :: DOM: Device Interfaces, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: bevis, Assigned: bevis)

References

Details

Attachments

(1 file)

This is a follow-up of the try result in bug 1193394 comment 58:
(C2 in Android 4.3 API16+ debug build: https://treeherder.mozilla.org/logviewer.html#?job_id=143221100&repo=try&lineNumber=2488)
(C1 in Android 4.3 API16+ opt build)

102 INFO TEST-UNEXPECTED-FAIL | dom/network/tests/test_tcpsocket_client_and_server_basics.html | The client should get a close event when it closes itself. - got "error", expected "close"
174 INFO TEST-UNEXPECTED-FAIL | dom/network/tests/test_tcpsocket_jsm.html | The client should get a close event when it closes itself. - got "error", expected "close"
Summary: Fix failures in dom/network/tests/ with comformant Promise handling → Fix failures in dom/network/tests/ on Android with comformant Promise handling
Priority: -- → P2
It's failed on all platform instead. Update the summary properly.
Summary: Fix failures in dom/network/tests/ on Android with comformant Promise handling → Fix failures in dom/network/tests/ with comformant Promise handling
Take this bug to follow up.
Assignee: nobody → btseng
I'd like to fix it from the implementation instead of the test case because, from the API perspective, it shall be reasonable to close a socket immediately without an error right after it was opened successfully:
https://searchfox.org/mozilla-central/rev/b0098afaeaad24a6752aa418ca3e86eade5fab17/dom/network/tests/test_tcpsocket_client_and_server_basics.js#311-324

BTW, TCPSocket seems not part of HTML standard and the only use case is only available in ppapi:
https://searchfox.org/mozilla-central/rev/b0098afaeaad24a6752aa418ca3e86eade5fab17/browser/extensions/mortar/host/common/ppapi-runtime.jsm#1200

(Ask for your review of this change because the owner of this module seems no longer available.)

Try result looks fine with/without the new microtask scheduling:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1e011c7b00e8782af07f421f32bfef144df565ce
https://treeherder.mozilla.org/#/jobs?repo=try&revision=67a348f553a15c822b984b5d8c1f448011fdddb6
Attachment #8936700 - Flags: review?(bugs)
Comment on attachment 8936700 [details] [diff] [review]
(v1) Patch: Fix failures in dom/network/tests/ with comformant Promise handling.

Interesting. Hmm, did I have this in some of my patches and forgot to upload.
Attachment #8936700 - Flags: review?(bugs) → review+
Here is what you did in your wip patch:
   // -- Client closes the connection
   clientSocket.close();
   is(clientSocket.readyState, 'closing',
      'client readyState should be losing immediately after calling close');
 
+  is((yield clientQueue.waitForEvent()).type, 'error',
+     'The client should get a error event.');
   is((yield clientQueue.waitForEvent()).type, 'close',
      'The client should get a close event when it closes itself.');
Pushed by btseng@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a0dce3b206fa
Fix failures in dom/network/tests/ with comformant Promise handling. r=smaug
https://hg.mozilla.org/mozilla-central/rev/a0dce3b206fa
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.