Skip to content

Test for specific cross-origin object exceptions - #3699

Merged
foolip merged 2 commits into
masterfrom
annevk-cross-origin-objects-exceptions
Nov 29, 2016
Merged

foolip merged 2 commits into
masterfrom
annevk-cross-origin-objects-exceptions

Conversation

@annevk

@annevk annevk commented Sep 13, 2016

Copy link
Copy Markdown
Member

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
Copy Markdown
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

annevk commented Nov 29, 2016

Copy link
Copy Markdown
Member Author

@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.

@foolip foolip left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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

annevk commented Nov 29, 2016

Copy link
Copy Markdown
Member Author

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
Copy Markdown

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

annevk commented Nov 29, 2016

Copy link
Copy Markdown
Member Author

@foolip okay now?

@wpt-stability-bot

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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 <[email protected]>
Co-authored-by: L. David Baron <[email protected]>
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 <[email protected]>
Co-authored-by: L. David Baron <[email protected]>
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 <[email protected]>
Co-authored-by: L. David Baron <[email protected]>
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.

5 participants