Closed Bug 753621 Opened 13 years ago Closed 13 years ago

test-content-worker.test:setTimeout are unregistered on content unload: failure

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86_64
Windows 8
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: ochameau)

References

Details

Attachments

(1 file)

When bug 752877 landed, it made this test start failing, turning our (recently-turned green) testrun orange. info: executing 'test-content-worker.test:setTimeout are unregistered on content unload' info: pass: New document has not been modified info: pass: Nor previous one error: TEST FAILED: test-content-worker.test:setTimeout are unregistered on content unload (failure) error: fail: function failed to throw exception info: Traceback (most recent call last): File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/timer.js", line 28, in notify callback.apply(null, args); File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/tests/test-content-worker.js", line 478, in null }, "can't access dead object"); File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/unit-test.js", line 113, in assertRaises this.fail("function failed to throw exception"); File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/unit-test.js", line 69, in fail this.console.trace(); console: [JavaScript Warning: "ReferenceError: reference to undefined property "failure"" {file: "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/cuddlefish.js -> resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/unit-test.js" line: 46}]
Attached file Pull request 435
I'm not able to reproduce it by testing against today's nightly or inbound builds. But we can get rid of this test. This exception is now fired after window destroy event so that it shouldn't hurt us anymore.
Assignee: nobody → poirot.alex
Attachment #622730 - Flags: review?(rFobic)
I can reproduce with today's Nightly using github master here on Windows. Haven't tried Linux.
If you want to fix the test rather than removing it, I imagine a setTimeout 0 would make it pass again.
Attachment #622730 - Flags: review?(rFobic) → review+
(In reply to Jesse Ruderman from comment #3) > If you want to fix the test rather than removing it, I imagine a setTimeout > 0 would make it pass again. After changing either/both of the setTimeout()s in that test to 0, the test is still failing with the same error. (39 out of 40 tests pass in test-content-worker) After applying Alex's patch to remove the test (with both setTimeout()s still set to 100), 39/39 tests pass in test-content-worker.
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/8e801428f6d8f1e9f06f18aa2142f0596d48cf9f Bug 753621: Remove explicit test of "dead object" exception as it is now harder to test and have a better behavior thanks to bug 752877. https://github.com/mozilla/addon-sdk/commit/01c75a6089bf6ee957e7b889b89e03ca15c2af94 Merge pull request #435 from ochameau/bug/753621-fix-test-content-worker Bug 753621: Remove explicit test of "dead object" exception r=@gozala
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
(In reply to Wes Kocher (:KWierso) from comment #4) > (In reply to Jesse Ruderman from comment #3) > > If you want to fix the test rather than removing it, I imagine a setTimeout > > 0 would make it pass again. > > After changing either/both of the setTimeout()s in that test to 0, the test > is still failing with the same error. (39 out of 40 tests pass in > test-content-worker) > > After applying Alex's patch to remove the test (with both setTimeout()s > still set to 100), 39/39 tests pass in test-content-worker. I don't mean changing timeouts from 100 to 0. I mean adding a new setTimeout 0 (a return to the event loop) to account for the change in bug 752877.
Commits pushed to stabilization at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/8e801428f6d8f1e9f06f18aa2142f0596d48cf9f Bug 753621: Remove explicit test of "dead object" exception as it is now harder https://github.com/mozilla/addon-sdk/commit/01c75a6089bf6ee957e7b889b89e03ca15c2af94 Merge pull request #435 from ochameau/bug/753621-fix-test-content-worker
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: