Closed Bug 1573921 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 17427 - [UserTimingL3] Checking against malformed performance.measure options.

Categories

(Core :: Performance, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 17427 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/17427
Details from upstream follow.

Tom McKee <tommckee@chromium.org> wrote:

[UserTimingL3] Checking against malformed performance.measure options.

In the User Timing L3 spec
(https://w3c.github.io/user-timing/#measure-method), the
performance.measure function can take an options dictionary as its
second argument. If a non-empty dictionary is passed but neither of the
'start' nor 'end' members is present, a TypeError must be thrown.

This change adds checks for this case and raises the appropriate errors.
WPT coverage is also extended to check that user agents raise TypeErrors
as specified.

Change-Id: If47cf5803886cafb9dfab79c2cee1b6b572dbd3b
Bug: 982385
Reviewed-on: https://chromium-review.googlesource.com/1669643
WPT-Export-Revision: 9bd25be2fe0815bf7f6246e1844a3ca0b71fc59c

Component: web-platform-tests → Performance
Product: Testing → Core
Ran 5 tests and 37 subtests
OK     : 5
PASS   : 8
FAIL   : 29

New tests that have failures or other problems:
/user-timing/measure_exception.html
    Invocation of performance.measure("Exception8", {"detail": "non-empty"}) should throw TypeError Exception.: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1055276ce2c
[wpt PR 17427] - [UserTimingL3] Checking against malformed performance.measure options., a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/21105524b4bd
[wpt PR 17427] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.