Closed Bug 1189681 Opened 9 years ago Closed 9 years ago

"Harness status: ERROR" when running "oninstall-script-error.https.html" test

Categories

(Testing :: web-platform-tests, defect)

defect
Not set
normal

Tracking

(firefox42 affected, firefox45 fixed)

RESOLVED FIXED
mozilla45
Tracking Status
firefox42 --- affected
firefox45 --- fixed

People

(Reporter: noemi, Assigned: bkelly)

References

Details

Attachments

(1 file)

Test run such as |./mach web-platform-tests _mozilla/service-workers/service-worker/oninstall-script-error.https.html| Actual Result: Harness status: Error Error: error at level 1 Found 5 tests 3 Pass 2 Fail Details: Pass install handler throws an error Pass install handler throws an error, error handler does not cancel Pass install handler dispatches an event that throws an error Fail install handler throws an error that is cancelled assert_equals: The worker was installed expected true but got false make_test/</<@https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:26:1 Promise*make_test/<@https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:21:14 Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:1371:20 promise_test/tests.promise_tests<@https://web-platform.test:8443/resources/testharness.js:527:36 Promise*promise_test@https://web-platform.test:8443/resources/testharness.js:526:31 make_test@https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:19:1 @https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:59:5 @https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:32:1 Fail install handler throws an error and prevents default assert_equals: The worker was installed expected true but got false make_test/</<@https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:26:1 Promise*make_test/<@https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:21:14 Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:1371:20 promise_test/tests.promise_tests<@https://web-platform.test:8443/resources/testharness.js:527:36 Promise*promise_test@https://web-platform.test:8443/resources/testharness.js:526:31 make_test@https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:19:1 @https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:59:5 @https://web-platform.test:8443/_mozilla/service-workers/service-worker/oninstall-script-error.https.html:32:1 Traces: https://pastebin.mozilla.org/8838614
Olli, I would like to detect when a dispatched event raised an error in the handler. For that I am using the mExceptionHasBeenRisen flag. Unfortunately, in WebIDL bindings we do actual error handling in the CallSetup destructor. This means that the event dispatch itself (HandleEventSubType) returns false even if the JS Error Reporter on workers fired "error" events which were then canceled by script. So the mExceptionHasBeenRisen is set to true even if the script canceled error dispatch. Is there some way to deal with this? Otherwise I'll have to use a member variable to track this.
Flags: needinfo?(bugs)
(In reply to Nikhil Marathe [:nsm] (please needinfo?) from comment #1) > Olli, > > I would like to detect when a dispatched event raised an error in the > handler. So add event listener for "error"? Though, can be a bit tricky if there is some nested event dispatching happening. > For that I am using the mExceptionHasBeenRisen flag. > Unfortunately, > in WebIDL bindings we do actual error handling in the CallSetup destructor. > This means that the event dispatch itself (HandleEventSubType) returns false Don't understand what this means. HandleEventSubType doesn't return bool. I guess you mean 'return failure' > even if the JS Error Reporter on workers fired "error" events which were > then canceled by script. So the mExceptionHasBeenRisen is set to true even > if the script canceled error dispatch. > Is there some way to deal with this? I can't think of any easy way.
Flags: needinfo?(bugs)
Blocks: 1189023
No longer blocks: 1180638
The test was wrong. I verified in a spec issue that our behavior is correct.
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Attachment #8684588 - Flags: review?(amarchesini)
Attachment #8684588 - Flags: review?(amarchesini) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: