-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Enumerate fewer cross-origin properties #8045
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
Conversation
See whatwg/html#3186 for context.
So the one thing I don't get is that in https://bug1412741.bmoattachments.org/attachment.cgi?id=8924054 @bzbarsky also marked the [[OwnPropertyKeys]] test as having changed results. I don't see how that follows from the standard. |
Build PASSEDStarted: 2017-11-03 10:59:45 View more information about this build on: |
The test in question is http://searchfox.org/mozilla-central/rev/423b2522c48e1d654e30ffc337164d677f934ec3/testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html#283-296 (or https://github.com/w3c/web-platform-tests/blob/26cc7b48a87800a0e28ea765e3630b1c929cf1c9/html/browsers/origin/cross-origin-objects/cross-origin-objects.html#L283-L296 if you prefer). It tests the two obvious spec entrypoints that exercise I didn't want to just change the test before the spec changes, so I just marked it as failing for now, but of course we'll want to update the test... |
Thanks, I'll fix that one too. I suspect it would be better for @cdumez et al if we fixed it here straight away given that there's still some (significant) delay if we land web-platform-tests changes from the Firefox side. |
Pushed a fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
"Object.keys() gives the right answer for cross-origin Window"); | ||
assert_array_equals(Object.getOwnPropertyNames(C.location).sort(), | ||
whitelistedLocationPropNames, | ||
"Object.getOwnPropertyNames() gives the right answer for cross-origin Location"); | ||
assert_array_equals(Object.keys(C.location).sort(), | ||
whitelistedLocationPropNames, | ||
assert_equals(Object.keys(C.location).length, 0, | ||
"Object.keys() gives the right answer for cross-origin Location"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the indent here?
There are no owners for this pull request. Please reach out on W3C's irc server (irc.w3.org, port 6665) on channel #testing (web client) to get help with this. Thank you! |
https://bugs.webkit.org/show_bug.cgi?id=179289 Reviewed by Darin Adler. LayoutTests/imported/w3c: Re-sync WPT test after: - web-platform-tests/wpt#8045 Rebaseline a couple of WPT tests now that more checks are passing. * web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: * web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html: * web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt: Source/WebCore: Index properties on cross origin Window objects should be enumerable: - whatwg/html#3186 - web-platform-tests/wpt#8045 All exposed properties used to be enumerable but we had to revert this in r224287 because it was not Web-compatible. The HTML specification has now been updated so that only index properties are enumerable cross origin. No new tests, rebaselined existing tests. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): (WebCore::JSDOMWindow::getOwnPropertyNames): LayoutTests: Update / rebaseline existing test to match new expected behavior. * js/dom/getOwnPropertyDescriptor-expected.txt: * js/resources/getOwnPropertyDescriptor.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@224464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
In 205659f we made all properties on cross-origin objects enumerable, equivalent to their same-origin object counterparts. However, this turned out not be web-compatible. This makes them non-enumerable again with the exception of array index property names, which need to be enumerable. Tests: web-platform-tests/wpt#8045 Fixes #3183.
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE
In 205659f we made all properties on cross-origin objects enumerable, equivalent to their same-origin object counterparts. However, this turned out not be web-compatible. This makes them non-enumerable again with the exception of array index property names, which need to be enumerable. Tests: web-platform-tests/wpt#8045 Fixes whatwg#3183.
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE UltraBlame original commit: 2a5a80d284b5ef958298cf515867ffbe420478c0
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE UltraBlame original commit: 2a5a80d284b5ef958298cf515867ffbe420478c0
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE UltraBlame original commit: 2a5a80d284b5ef958298cf515867ffbe420478c0
https://bugs.webkit.org/show_bug.cgi?id=179289 Reviewed by Darin Adler. LayoutTests/imported/w3c: Re-sync WPT test after: - web-platform-tests/wpt#8045 Rebaseline a couple of WPT tests now that more checks are passing. * web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: * web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html: * web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt: Source/WebCore: Index properties on cross origin Window objects should be enumerable: - whatwg/html#3186 - web-platform-tests/wpt#8045 All exposed properties used to be enumerable but we had to revert this in r224287 because it was not Web-compatible. The HTML specification has now been updated so that only index properties are enumerable cross origin. No new tests, rebaselined existing tests. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): (WebCore::JSDOMWindow::getOwnPropertyNames): LayoutTests: Update / rebaseline existing test to match new expected behavior. * js/dom/getOwnPropertyDescriptor-expected.txt: * js/resources/getOwnPropertyDescriptor.js: Canonical link: https://commits.webkit.org/195389@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…erty enumerability. r=peterv Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE
See whatwg/html#3186 for context.