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

Test for specific cross-origin object exceptions #3699

Merged
merged 2 commits into from Nov 29, 2016

Conversation

annevk
Copy link
Member

@annevk annevk commented Sep 13, 2016

This adds a new test to test for specific cross-origin object
exceptions as discussed in whatwg/html#1727.

Once this test is more widely implemented the cross-origin-objects.html
resource can be replaced by it (as indicated within the resource).

@wpt-pr-bot
Copy link
Collaborator

Reviewers for this pull request are: @Ms2ger, @ayg, @gsnedders, @jdm, @jgraham, @plehegar, @sideshowbarker, @zcorpan, and @zqzhang.

@ayg ayg closed this Oct 26, 2016
@ayg ayg deleted the annevk-cross-origin-objects-exceptions branch October 26, 2016 17:38
@ayg ayg restored the annevk-cross-origin-objects-exceptions branch October 26, 2016 18:03
@ayg ayg reopened this Oct 26, 2016
@annevk
Copy link
Member Author

annevk commented Nov 29, 2016

@domenic @foolip this never ended up landing (or being reviewed), despite changes to the HTML Standard landing. Per https://github.com/w3c/web-platform-tests/commits/master/html/browsers/origin/cross-origin-objects/cross-origin-objects.html it seems some changes have been made to the copied resource as well.

I'm not sure what the best way forward is at this point.

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nits. I've compared with cross-origin-objects.html and the changes make sense.

It's a bit unusual to have two tests that test opposing things, but fine as long as they're eventually merged.

checkFunction(get_self_parent, Function.prototype);
checkFunction(get_parent_A, Function.prototype);
checkFunction(get_parent_B, B.Function.prototype);
}, "Same-origin obsevers get different accessors for cross-origin Window");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

346fbd3 fixed this typo

addTest(function() {
// Note: we do not check location.host as its default port semantics are hard to reflect statically
assert_equals(location.hostname, host_info.ORIGINAL_HOST, 'Need to run the top-level test from domain ' + host_info.ORIGINAL_HOST);
assert_equals(location.port, host_info.HTTP_PORT, 'Need to run the top-level test from port ' + host_info.HTTP_PORT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a512b86#diff-3653aadabc8cf51dc268d3124880e58b makes it get_port(location)

@annevk
Copy link
Member Author

annevk commented Nov 29, 2016

Yeah, it's two tests because @bholley wants to distinguish between "needs to throw" and "needs to throw the correct exception", at least for now. I couldn't find a good way to do that within the same resource.

This adds a new test to test for specific cross-origin object
exceptions as discussed in whatwg/html#1727.

Once this test is more widely implemented the cross-origin-objects.html
resource can be replaced by it (as indicated within the resource).
@annevk annevk force-pushed the annevk-cross-origin-objects-exceptions branch from 9f7520e to fccf6a1 Compare November 29, 2016 13:19
@wpt-stability-bot
Copy link

Firefox

Testing revision f4000c6
Starting 10 test iterations
All results were stable

All results

/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html

Subtest Results
OK
[[OwnPropertyKeys]] should return all properties from cross-origin objects PASS
Basic sanity-checking FAIL
Only whitelisted properties are accessible cross-origin FAIL
[[Enumerate]] should return an empty iterator PASS
[[Delete]] Should throw on cross-origin objects FAIL
`[[GetOwnProperty]] - Properties on cross-origin objects should be reported own
Same-origin obsevers get different accessors for cross-origin Window PASS
Cross-origin Window accessors get local Function.prototype PASS
[[PreventExtensions]] should throw for cross-origin objects PASS
A and B jointly observe the same identity for cross-origin Window and Location PASS
Same-origin observers get different accessors for cross-origin Location PASS
[[GetOwnProperty]] - Property descriptors for cross-origin properties should be set up correctly PASS
Same-origin observers get different functions for cross-origin objects PASS
[[GetPrototypeOf]] should return null FAIL
Cross-origin functions get local Function.prototype PASS
[[DefineOwnProperty]] Should throw for cross-origin objects FAIL
[[IsExtensible]] should return true for cross-origin objects PASS
[[SetPrototypeOf]] should throw FAIL

@annevk
Copy link
Member Author

annevk commented Nov 29, 2016

@foolip okay now?

@wpt-stability-bot
Copy link

Chrome

Testing revision 0ab5333
Starting 10 test iterations
All results were stable

All results

/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html

Subtest Results
OK
Same-origin observers get different accessors for cross-origin Window FAIL
[[OwnPropertyKeys]] should return all properties from cross-origin objects FAIL
Basic sanity-checking FAIL
Only whitelisted properties are accessible cross-origin FAIL
[[Enumerate]] should return an empty iterator PASS
[[Delete]] Should throw on cross-origin objects PASS
`[[GetOwnProperty]] - Properties on cross-origin objects should be reported own
Cross-origin Window accessors get local Function.prototype FAIL
[[PreventExtensions]] should throw for cross-origin objects FAIL
A and B jointly observe the same identity for cross-origin Window and Location PASS
Same-origin observers get different accessors for cross-origin Location FAIL
[[GetOwnProperty]] - Property descriptors for cross-origin properties should be set up correctly FAIL
Same-origin observers get different functions for cross-origin objects FAIL
[[GetPrototypeOf]] should return null PASS
Cross-origin functions get local Function.prototype PASS
[[DefineOwnProperty]] Should throw for cross-origin objects PASS
[[IsExtensible]] should return true for cross-origin objects PASS
[[SetPrototypeOf]] should throw FAIL

1 similar comment
@wpt-stability-bot
Copy link

Chrome

Testing revision 0ab5333
Starting 10 test iterations
All results were stable

All results

/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html

Subtest Results
OK
Same-origin observers get different accessors for cross-origin Window FAIL
[[OwnPropertyKeys]] should return all properties from cross-origin objects FAIL
Basic sanity-checking FAIL
Only whitelisted properties are accessible cross-origin FAIL
[[Enumerate]] should return an empty iterator PASS
[[Delete]] Should throw on cross-origin objects PASS
`[[GetOwnProperty]] - Properties on cross-origin objects should be reported own
Cross-origin Window accessors get local Function.prototype FAIL
[[PreventExtensions]] should throw for cross-origin objects FAIL
A and B jointly observe the same identity for cross-origin Window and Location PASS
Same-origin observers get different accessors for cross-origin Location FAIL
[[GetOwnProperty]] - Property descriptors for cross-origin properties should be set up correctly FAIL
Same-origin observers get different functions for cross-origin objects FAIL
[[GetPrototypeOf]] should return null PASS
Cross-origin functions get local Function.prototype PASS
[[DefineOwnProperty]] Should throw for cross-origin objects PASS
[[IsExtensible]] should return true for cross-origin objects PASS
[[SetPrototypeOf]] should throw FAIL

@wpt-stability-bot
Copy link

Firefox

Testing revision 0ab5333
Starting 10 test iterations
All results were stable

All results

/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html

Subtest Results
OK
Same-origin observers get different accessors for cross-origin Window PASS
[[OwnPropertyKeys]] should return all properties from cross-origin objects PASS
Basic sanity-checking FAIL
Only whitelisted properties are accessible cross-origin FAIL
[[Enumerate]] should return an empty iterator PASS
[[Delete]] Should throw on cross-origin objects FAIL
`[[GetOwnProperty]] - Properties on cross-origin objects should be reported own
Cross-origin Window accessors get local Function.prototype PASS
[[PreventExtensions]] should throw for cross-origin objects PASS
A and B jointly observe the same identity for cross-origin Window and Location PASS
Same-origin observers get different accessors for cross-origin Location PASS
[[GetOwnProperty]] - Property descriptors for cross-origin properties should be set up correctly PASS
Same-origin observers get different functions for cross-origin objects PASS
[[GetPrototypeOf]] should return null FAIL
Cross-origin functions get local Function.prototype PASS
[[DefineOwnProperty]] Should throw for cross-origin objects FAIL
[[IsExtensible]] should return true for cross-origin objects PASS
[[SetPrototypeOf]] should throw FAIL

@foolip foolip merged commit 7326f8c into master Nov 29, 2016
@foolip foolip deleted the annevk-cross-origin-objects-exceptions branch November 29, 2016 14:00
meyerweb added a commit to meyerweb/wpt that referenced this pull request Jul 28, 2021
dbaron added a commit that referenced this pull request Oct 6, 2023
Tests for :dir() and shadow DOM for issue #3699

Co-authored-by: Brian Kardell <bkardell@gmail.com>
Co-authored-by: L. David Baron <dbaron@chromium.org>
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Oct 11, 2023
Tests for :dir() and shadow DOM for issue web-platform-tests#3699

Co-authored-by: Brian Kardell <bkardell@gmail.com>
Co-authored-by: L. David Baron <dbaron@chromium.org>
Lightning00Blade pushed a commit to Lightning00Blade/wpt that referenced this pull request Dec 11, 2023
Tests for :dir() and shadow DOM for issue web-platform-tests#3699

Co-authored-by: Brian Kardell <bkardell@gmail.com>
Co-authored-by: L. David Baron <dbaron@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants