Skip to content

Update tests for fullscreen event targets (element or document)#6017

Merged
foolip merged 3 commits into
masterfrom
fullscreen-event-target
Jun 1, 2017
Merged

Update tests for fullscreen event targets (element or document)#6017
foolip merged 3 commits into
masterfrom
fullscreen-event-target

Conversation

@foolip

@foolip foolip commented May 22, 2017

Copy link
Copy Markdown
Member

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision 1cb8ea1
Using browser at version BuildID 20170531100318; SourceStamp 7b8937970f9ca85db88cb2496f2112175fd847c8
Starting 10 test iterations
All results were stable

All results

2 tests ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children
/fullscreen/interfaces.html
Subtest Results Messages
OK
Test driver PASS
Document interface: attribute fullscreenEnabled PASS
Document interface: attribute fullscreen PASS
Document interface: operation exitFullscreen() FAIL assert_unreached: Throws "TypeError: 'exitFullscreen' called on an object that does not implement interface Document." instead of rejecting promise Reached unreachable code
Document interface: attribute onfullscreenchange PASS
Document interface: attribute onfullscreenerror PASS
Document interface: attribute fullscreenElement PASS
Document must be primary interface of new Document PASS
Stringification of new Document PASS
Document interface: new Document must inherit property "fullscreenEnabled" with the proper type (29) PASS
Document interface: new Document must inherit property "fullscreen" with the proper type (30) PASS
Document interface: new Document must inherit property "exitFullscreen" with the proper type (31) PASS
Document interface: new Document must inherit property "onfullscreenchange" with the proper type (32) PASS
Document interface: new Document must inherit property "onfullscreenerror" with the proper type (33) PASS
Document interface: new Document must inherit property "fullscreenElement" with the proper type (35) PASS
ShadowRoot interface: attribute fullscreenElement FAIL assert_true: The prototype object must have a property "fullscreenElement" expected true got false
Element interface: operation requestFullscreen() FAIL assert_unreached: Throws "TypeError: 'requestFullscreen' called on an object that does not implement interface Element." instead of rejecting promise Reached unreachable code
Element interface: attribute onfullscreenchange FAIL assert_true: The prototype object must have a property "onfullscreenchange" expected true got false
Element interface: attribute onfullscreenerror FAIL assert_true: The prototype object must have a property "onfullscreenerror" expected true got false
Element must be primary interface of document.createElementNS(null, "test") PASS
Stringification of document.createElementNS(null, "test") PASS
Element interface: document.createElementNS(null, "test") must inherit property "requestFullscreen" with the proper type (34) PASS
Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenchange" with the proper type (35) FAIL assert_inherits: property "onfullscreenchange" not found in prototype chain
Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type (36) FAIL assert_inherits: property "onfullscreenerror" not found in prototype chain

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision 2e09fc8
Using browser at version BuildID 20170521100319; SourceStamp 5b74bbf20e803e299790d266fc6ebf5d53b7a1b7
Starting 10 test iterations
All results were stable

All results

1 test ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Sauce (safari)

Testing web-platform-tests at revision 1cb8ea1
Using browser at version 10.0
Starting 10 test iterations
All results were stable

All results

2 tests ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL div.requestFullscreen is not a function. (In 'div.requestFullscreen()', 'div.requestFullscreen' is undefined)
/fullscreen/interfaces.html
Subtest Results Messages
OK
Test driver FAIL Can't find variable: fetch

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Sauce (safari)

Testing web-platform-tests at revision 2e09fc8
Using browser at version 10.0
Starting 10 test iterations
All results were stable

All results

1 test ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL div.requestFullscreen is not a function. (In 'div.requestFullscreen()', 'div.requestFullscreen' is undefined)

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 1cb8ea1
Using browser at version 60.0.3112.7 dev
Starting 10 test iterations
All results were stable

All results

2 tests ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL div.requestFullscreen is not a function
/fullscreen/interfaces.html
Subtest Results Messages
OK
Test driver PASS
Document interface: attribute fullscreenEnabled FAIL assert_true: The prototype object must have a property "fullscreenEnabled" expected true got false
Document interface: attribute fullscreen FAIL assert_true: The prototype object must have a property "fullscreen" expected true got false
Document interface: operation exitFullscreen() FAIL assert_own_property: interface prototype object missing non-static operation expected property "exitFullscreen" missing
Document interface: attribute onfullscreenchange FAIL assert_true: The prototype object must have a property "onfullscreenchange" expected true got false
Document interface: attribute onfullscreenerror FAIL assert_true: The prototype object must have a property "onfullscreenerror" expected true got false
Document interface: attribute fullscreenElement FAIL assert_true: The prototype object must have a property "fullscreenElement" expected true got false
Document must be primary interface of new Document PASS
Stringification of new Document PASS
Document interface: new Document must inherit property "fullscreenEnabled" with the proper type (29) FAIL assert_inherits: property "fullscreenEnabled" not found in prototype chain
Document interface: new Document must inherit property "fullscreen" with the proper type (30) FAIL assert_inherits: property "fullscreen" not found in prototype chain
Document interface: new Document must inherit property "exitFullscreen" with the proper type (31) FAIL assert_inherits: property "exitFullscreen" not found in prototype chain
Document interface: new Document must inherit property "onfullscreenchange" with the proper type (32) FAIL assert_inherits: property "onfullscreenchange" not found in prototype chain
Document interface: new Document must inherit property "onfullscreenerror" with the proper type (33) FAIL assert_inherits: property "onfullscreenerror" not found in prototype chain
Document interface: new Document must inherit property "fullscreenElement" with the proper type (35) FAIL assert_inherits: property "fullscreenElement" not found in prototype chain
ShadowRoot interface: attribute fullscreenElement FAIL assert_true: The prototype object must have a property "fullscreenElement" expected true got false
Element interface: operation requestFullscreen() FAIL assert_own_property: interface prototype object missing non-static operation expected property "requestFullscreen" missing
Element interface: attribute onfullscreenchange FAIL assert_true: The prototype object must have a property "onfullscreenchange" expected true got false
Element interface: attribute onfullscreenerror FAIL assert_true: The prototype object must have a property "onfullscreenerror" expected true got false
Element must be primary interface of document.createElementNS(null, "test") PASS
Stringification of document.createElementNS(null, "test") PASS
Element interface: document.createElementNS(null, "test") must inherit property "requestFullscreen" with the proper type (34) FAIL assert_inherits: property "requestFullscreen" not found in prototype chain
Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenchange" with the proper type (35) FAIL assert_inherits: property "onfullscreenchange" not found in prototype chain
Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type (36) FAIL assert_inherits: property "onfullscreenerror" not found in prototype chain

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 59f2307
Using browser at version 60.0.3100.0 dev
Starting 10 test iterations
All results were stable

All results

1 test ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL div.requestFullscreen is not a function

@ghost

ghost commented May 22, 2017

Copy link
Copy Markdown

View the complete job log.

Sauce (MicrosoftEdge)

Testing web-platform-tests at revision 1cb8ea1
Using browser at version 14.14393
Starting 10 test iterations
All results were stable

All results

2 tests ran
/fullscreen/api/element-request-fullscreen-not-allowed.html
Subtest Results Messages
OK
Element#requestFullscreen() when not allowed to request fullscreen FAIL Object doesn't support property or method 'requestFullscreen'
/fullscreen/interfaces.html
Subtest Results Messages
OK
Test driver PASS
Document interface: attribute fullscreenEnabled FAIL assert_true: The prototype object must have a property "fullscreenEnabled" expected true got false
Document interface: attribute fullscreen FAIL assert_true: The prototype object must have a property "fullscreen" expected true got false
Document interface: operation exitFullscreen() FAIL assert_own_property: interface prototype object missing non-static operation expected property "exitFullscreen" missing
Document interface: attribute onfullscreenchange FAIL assert_true: The prototype object must have a property "onfullscreenchange" expected true got false
Document interface: attribute onfullscreenerror FAIL assert_true: The prototype object must have a property "onfullscreenerror" expected true got false
Document interface: attribute fullscreenElement FAIL assert_true: The prototype object must have a property "fullscreenElement" expected true got false
Document must be primary interface of new Document FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Stringification of new Document FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Document interface: new Document must inherit property "fullscreenEnabled" with the proper type (29) FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Document interface: new Document must inherit property "fullscreen" with the proper type (30) FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Document interface: new Document must inherit property "exitFullscreen" with the proper type (31) FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Document interface: new Document must inherit property "onfullscreenchange" with the proper type (32) FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Document interface: new Document must inherit property "onfullscreenerror" with the proper type (33) FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
Document interface: new Document must inherit property "fullscreenElement" with the proper type (35) FAIL assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: Function expected"
ShadowRoot interface: attribute fullscreenElement FAIL assert_own_property: self does not have own property "ShadowRoot" expected property "ShadowRoot" missing
Element interface: operation requestFullscreen() FAIL assert_own_property: interface prototype object missing non-static operation expected property "requestFullscreen" missing
Element interface: attribute onfullscreenchange FAIL assert_true: The prototype object must have a property "onfullscreenchange" expected true got false
Element interface: attribute onfullscreenerror FAIL assert_true: The prototype object must have a property "onfullscreenerror" expected true got false
Element must be primary interface of document.createElementNS(null, "test") PASS
Stringification of document.createElementNS(null, "test") PASS
Element interface: document.createElementNS(null, "test") must inherit property "requestFullscreen" with the proper type (34) FAIL assert_inherits: property "requestFullscreen" not found in prototype chain
Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenchange" with the proper type (35) FAIL assert_inherits: property "onfullscreenchange" not found in prototype chain
Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type (36) FAIL assert_inherits: property "onfullscreenerror" not found in prototype chain

@foolip

foolip commented May 22, 2017

Copy link
Copy Markdown
Member Author

@bobholt, the result comments are duplicated on this PR, is this a known issue?

foolip added a commit to whatwg/fullscreen that referenced this pull request May 22, 2017
@bobholt

bobholt commented May 22, 2017

Copy link
Copy Markdown
Contributor

@foolip: Not a known issue. As far as I can tell, it hasn't happened before (or in the PR since).

For this to have happened, prbuildbot would have had to been invoked twice within very short order (otherwise the comments would have existed, and the bot's check for existing comments would have caught them). I think we can see this born out in the matching timestamps in the duplicate comments. The only way I could explain that occurrence is if Travis somehow fired the webhook twice.

@foolip

foolip commented May 22, 2017

Copy link
Copy Markdown
Member Author

The only way I could explain that occurrence is if Travis somehow fired the webhook twice.

Presumably that can happen? If the server is very slow to respond, maybe it retries after a while, but the first request actually reached the system as well and just didn't get a reply?

@bobholt

bobholt commented May 22, 2017

Copy link
Copy Markdown
Contributor

Presumably that can happen? If the server is very slow to respond, maybe it retries after a while, but the first request actually reached the system as well and just didn't get a reply?

I've seen Travis (rarely) respond twice to commands that are only invoked once in the build script, so it's not outside the realm of possibility to me that it could have fired 2 webhook POSTs.

If it waited any appreciable time between the two webhooks, we should only have seen one comment, as the previous comments would have already been in place (and found and edited by the script).

That said, I doubt Travis does any kind of webhook retry. It seems very "fire and forget." It's hard to tell, though, because they don't provide a UI into sent webhooks like GitHub does.

@foolip foolip force-pushed the fullscreen-event-target branch from 2e32b23 to 24e3a1c Compare May 24, 2017 08:25
@foolip

foolip commented May 30, 2017

Copy link
Copy Markdown
Member Author

@upsuper, would you mind reviewing this as well?

@foolip foolip requested a review from zcorpan May 31, 2017 08:36
foolip added a commit to whatwg/fullscreen that referenced this pull request May 31, 2017

@zcorpan zcorpan 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, but could have more coverage, in particular: if element is connected but its node document is not document, is not tested, is it?

assert_equals(iframeDoc.fullscreenElement, null);
assert_equals(document.fullscreenElement, null, "outer fullscreen element");
assert_equals(iframeDoc.fullscreenElement, null, "inner fullscreen element");
assert_equals(event.target, document, "event target");

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.

@zcorpan, this and the same bit in element-request-fullscreen-and-remove-manual.html tests the event targeting.

@upsuper

upsuper commented May 31, 2017

Copy link
Copy Markdown
Member

Is there test for checking what happens when the fullscreen element or any of its ancestor is removed from the document?

@foolip

foolip commented May 31, 2017

Copy link
Copy Markdown
Member Author

No, I'm now updating tests under model/ for that.

@foolip

foolip commented May 31, 2017

Copy link
Copy Markdown
Member Author

OK, I've tweaked the existing tests under model/ and added one new one. Please take another look.

@upsuper

upsuper commented May 31, 2017

Copy link
Copy Markdown
Member

Will have a look tomorrow (hopefully).

@foolip foolip merged commit 61057da into master Jun 1, 2017
@foolip foolip deleted the fullscreen-event-target branch June 1, 2017 08:15
@zcorpan

zcorpan commented Jun 1, 2017

Copy link
Copy Markdown
Member

Thanks. LGTM

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.

5 participants