Skip to content

Several fixes to manual fullscreen tests - #13102

Merged
foolip merged 5 commits into
web-platform-tests:masterfrom
upsuper-forks:fullscreen-fix
Sep 27, 2018
Merged

foolip merged 5 commits into
web-platform-tests:masterfrom
upsuper-forks:fullscreen-fix

Conversation

@upsuper

@upsuper upsuper commented Sep 20, 2018 •

Copy link
Copy Markdown
Member

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.

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

const iframe = ancestor.firstChild;

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

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.

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

Choose a reason for hiding this comment

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

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

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

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

@upsuper

upsuper commented Sep 27, 2018

Copy link
Copy Markdown
Member Author

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