Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a missing PerformanceTiming readonly attribute name #4714

Conversation

JosephPecoraro
Copy link
Contributor

Any PerformanceTiming interface readonly attribute name should cause a SyntaxError when used by performance.mark in Window. Although this attribute is specially optional, it is a readonly attribute in the interface, so it should be tested.


Spec for performance.mark:

  1. If the global object is a Window object and markName uses the same name as a read only attribute in the PerformanceTiming interface [NAVIGATION-TIMING-2], throw a SyntaxError.

Spec for PerformanceTiming:

interface PerformanceTiming {
    ...
    readonly attribute unsigned long long secureConnectionStart;
}

Spec for secureConnectionStart:

secureConnectionStart
This attribute is optional. User agents that don't have this attribute available must set it as undefined. [...]


Firefox does not appear to support secureConnectionStart yet. So adding this attributes causes Firefox to fail a few tests.

An alternative solution would be to only add "secureConnectionStart" to this list if it is supported by the browser, but I'm not sure that matters given the spec text above. Any read only attribute should throw a SyntaxError. I don't think supported or not matters.

Any PerformanceTiming interface readonly attribute name should cause a
SyntaxError when used by performance.mark in Window. Although this
attribute is specially optional, it is a readonly attribute in the
interface, so it should be tested.
@wpt-pr-bot
Copy link
Collaborator

Notifying @igrigorik, @plehegar, and @toddreifsteck. (Learn how reviewing works.)

These tests will be available shortly on w3c-test.org.

w3c-test:do-not-mirror (What's this?)

@JosephPecoraro
Copy link
Contributor Author

Hmm, the existing test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html does attempt to special case this optional attribute.

I'll leave it up to reviewers to suggest the path forward here. Should we special case this attribute in all tests or not.

@igrigorik
Copy link
Member

I think this is blocked on w3c/user-timing#22.

@plehegar
Copy link
Member

The attribute was added in #5247, so feel free to close this PR.

@igrigorik
Copy link
Member

sgtm, thanks!

@igrigorik igrigorik closed this Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants