New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment
link

Issue 914441: [UserTimingL2] Return undefined for mark, measure API

Reported by maxlg@chromium.org, Dec 12 Project Member

Issue description

Reproduction steps:
1.performance.mark(1)
2.performance.mark(2)
3.performance.measure(3, 1, 2), check the return

Expectation:
The result should be undefined

Actual:
The result is null
 

Comment 1 by maxlg@chromium.org, Dec 12

Description: Show this description

Comment 2 by npm@chromium.org, Dec 12

Bug filed as found by discussion at https://github.com/w3c/user-timing/pull/46
The test mark-measure-return-null.html must be changed.

Comment 3 by maxlg@google.com, Dec 14

Status: Started (was: Assigned)

Comment 4 by maxlg@chromium.org, Dec 14

Draw back to assigned. Discussed with Nicolas, we should change the tests to check undefined instead of null. The change will cause Chrome to fail, but the failure will go away when we ship L3. Also, I am not sure whether we can define the API to return undefined (instead of null) and an object.

Comment 5 by maxlg@chromium.org, Dec 14

Status: Assigned (was: Started)

Comment 6 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb87be9f5c8801ba7ebb5478ad7f3dd447a33f3c

commit fb87be9f5c8801ba7ebb5478ad7f3dd447a33f3c
Author: Nicolas Pena <npm@chromium.org>
Date: Fri Dec 14 16:59:56 2018

[UserTiming] Fix mark-measure-return-null test

The test was incorrect per L2 spec: a void method 'returns' an undefined
value, not a null object. This CL changes the test to show how to
perform feature detection and compares L2 and L3 behavior.

Bug: 914441
Change-Id: Id7173b2693d5bd42013dcdd25266d64fa8956e6a
Reviewed-on: https://chromium-review.googlesource.com/c/1377129
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616712}
[modify] https://crrev.com/fb87be9f5c8801ba7ebb5478ad7f3dd447a33f3c/third_party/blink/renderer/core/timing/performance.idl
[modify] https://crrev.com/fb87be9f5c8801ba7ebb5478ad7f3dd447a33f3c/third_party/blink/web_tests/TestExpectations
[add] https://crrev.com/fb87be9f5c8801ba7ebb5478ad7f3dd447a33f3c/third_party/blink/web_tests/external/wpt/user-timing/mark-measure-feature-detection.html
[delete] https://crrev.com/3810f7e7bd1e65e6508e3cda6578cfa66b14e72d/third_party/blink/web_tests/external/wpt/user-timing/mark-measure-return-null.html

Sign in to add a comment