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

Several fixes to manual fullscreen tests #13102

Merged
merged 5 commits into from
Sep 27, 2018

Conversation

upsuper
Copy link
Member

@upsuper upsuper commented Sep 20, 2018

These tests are made to start after onload so that iframe content
doesn't change anymore:

  • fullscreen/api/element-ready-check-containing-iframe-manual.html
  • fullscreen/api/element-ready-check-not-allowed-manual.html
  • fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html
  • fullscreen/model/move-to-fullscreen-iframe-manual.html

fullscreen/rendering/ua-style-iframe-manual.html is updated to check
each subproperties individually rather than shorthand properties.

fullscreen/api/element-request-fullscreen-timing-manual.html is changed
so that the second test starts after an animation frame to work around
Gecko throttling rAF before the first paint.

@@ -20,7 +20,7 @@
const events = [];
const callback = t.step_func(event => {
// fullscreenElement should have changed before either event is fired.
assert_equals(document.fullscreenElement, null, `fullscreenElement in {event.type} event`);
assert_equals(document.fullscreenElement, null, `fullscreenElement in ${event.type} event`);
Copy link
Member

Choose a reason for hiding this comment

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

Oops :)

iframes[1].contentDocument.onfullscreenerror = t.unreached_func("fullscreenchange error");
});
});
window.onload = function() {
Copy link
Member

Choose a reason for hiding this comment

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

Per spec, is it really possible for the iframe content to change, given that there's nothing to load? I don't think it is. If there's an interop problem here, can you check if there's another test targeting that specifically, and link to that here to make clear that waiting for load is a workaround?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea. Maybe worth opening an issue and looping in some other people as I'm not very familiar with the processing model.

Copy link
Member Author

Choose a reason for hiding this comment

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

I filed a Gecko bug for this. Hopefully DOM people would figure that out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on the discussion with bz, it seems the spec is clear on this case that the content document shouldn't be changed, because iframe without src shouldn't navigate after its initial handling. I've submitted #13236 for testing that.

Since this test is unrelated, I think we can have this workaround to help improve test coverage.

// if promises aren't supported treat it as executed.
promise_executed = true;
}
requestAnimationFrame(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment about this extra step is needed, something similar to the description. Also wrap in t.step_func in case something within throws an exception.

async_test(t => {
const ancestor = document.getElementById('ancestor');
const iframe = ancestor.firstChild;

const initialStyle = getComputedStyle(iframe);
assert_equals(initialStyle.border, '1px solid rgb(0, 0, 255)', 'initial border style');
Copy link
Member

Choose a reason for hiding this comment

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

If this didn't work, that's also because of a pre-existing interop issue. Do you know which behavior is correct per spec, and can you make sure there's another test that fails in whichever browser got this wrong?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is still an ongoing debate, and the spec isn't super clear about this (as many other things like in CSSOM). So I don't think we need to worry about the test here.

Copy link
Member

Choose a reason for hiding this comment

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

Do you have a link to where the debate is happening?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like the working group had resolved on the behavior of Blink, but the issue is still open. Hopefully there will be a wpt test added with the spec change.

Copy link
Member

Choose a reason for hiding this comment

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

I sent #13238 to keep track of that.

These tests are made to start after onload so that iframe content
doesn't change anymore:
* fullscreen/api/element-ready-check-containing-iframe-manual.html
* fullscreen/api/element-ready-check-not-allowed-manual.html
* fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html
* fullscreen/model/move-to-fullscreen-iframe-manual.html

fullscreen/rendering/ua-style-iframe-manual.html is updated to check
each subproperties individually rather than shorthand properties.

fullscreen/api/element-request-fullscreen-timing-manual.html is changed
so that the second test starts after an animation frame to work around
Gecko throttling rAF before the first paint.
foolip added a commit that referenced this pull request Sep 27, 2018
This discrepency was discovered in a Fullscreen test:
#13102

The spec issue for resolving this is:
w3c/csswg-drafts#2529
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.

Thanks for the fixes! I added links to https://bugzil.la/1493878 to explain the extra wait, but now ready to merge.

@upsuper
Copy link
Member Author

upsuper commented Sep 27, 2018

Thanks!

@foolip foolip merged commit b3c7bf4 into web-platform-tests:master Sep 27, 2018
@upsuper upsuper deleted the fullscreen-fix branch September 27, 2018 10:40
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.

3 participants