mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1775499 - update user_timing_dying_global test for performance.measure. r=sefeng
Root cause of test failure: the updates in this bug caused performance.measure to throw an exception if there is a dying global. However, the test didn't try to catch the exception so it failed with an uncaught exception. I updated the test to handle this case which it was already doing for performance.mark. Additionally, I corrected some indentation. Depends on D151960 Differential Revision: https://phabricator.services.mozilla.com/D152814
This commit is contained in:
parent
bd58669a22
commit
90e0d5b6e0
@ -40,13 +40,17 @@
|
||||
ok(true, 'new PerformanceMark() on dying global did not crash');
|
||||
|
||||
try {
|
||||
dyingWindow.performance.mark('markMethod', {detail: 'markMethodDetail'});
|
||||
dyingWindow.performance.mark('markMethod', {detail: 'markMethodDetail'});
|
||||
} catch (e) {
|
||||
is(e.code, e.INVALID_STATE_ERR, 'performance.mark on dying global threw expected exception');
|
||||
is(e.code, e.INVALID_STATE_ERR, 'performance.mark on dying global threw expected exception');
|
||||
}
|
||||
ok(true, 'performance.mark on dying global did not crash');
|
||||
|
||||
dyingWindow.performance.measure('measureMethod');
|
||||
try {
|
||||
dyingWindow.performance.measure('measureMethod');
|
||||
} catch (e) {
|
||||
is(e.code, e.INVALID_STATE_ERR, 'performance.measure on dying global threw expected exception');
|
||||
}
|
||||
ok(true, 'performance.measure on dying global did not crash');
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user