haikuwebkit/LayoutTests/fullscreen/full-screen-iframe-allowed-...

21 lines
814 B
HTML
Raw Permalink Normal View History

Accept 'allowfullscreen' in addition to 'webkitallowfullscreen'. https://bugs.webkit.org/show_bug.cgi?id=110374 Reviewed by Adam Barth. Source/WebCore: The fullscreen API also includes a new HTML attribute for iframes which permits its use. That attribute, 'allowfullcreen' is now included in the HTML specification [1] and is stable enough to remove the webkit prefix. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-allowfullscreen Tests: fullscreen/full-screen-enabled-prefixed.html fullscreen/full-screen-iframe-allowed-prefixed.html fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html * dom/Document.cpp: (WebCore::isAttributeOnAllOwners): (WebCore::Document::fullScreenIsAllowedForElement): (WebCore::Document::webkitFullscreenEnabled): * html/HTMLAttributeNames.in: LayoutTests: Two previous tests duplicated to preserve testing webkitallowfullscreen and then modified to test allowfullscreen. A new test 'full-screen-iframe-with-mixed-allow-webkitallow-attribute.html' added to test a mixed nesting of iframs with both allowfullscreen and webkitallowfullscreen. * fullscreen/full-screen-enabled-prefixed-expected.txt: Added. * fullscreen/full-screen-enabled-prefixed.html: Copied from LayoutTests/fullscreen/full-screen-enabled.html. * fullscreen/full-screen-enabled.html: * fullscreen/full-screen-iframe-allowed-prefixed-expected.txt: Added. * fullscreen/full-screen-iframe-allowed-prefixed.html: Copied from LayoutTests/fullscreen/full-screen-iframe-allowed.html. * fullscreen/full-screen-iframe-allowed.html: * fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute-expected.txt: * fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html: Added. * fullscreen/resources/full-screen-iframe-with-mixed-allow-webkitallow-iframe1.html: Added. * fullscreen/resources/full-screen-iframe-with-mixed-allow-webkitallow-iframe2.html: Added. Canonical link: https://commits.webkit.org/128686@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-21 00:32:26 +00:00
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=56264">bug 56264</a>:
Handle entering full screen security restrictions</p>
<p>To test manually, click the "Go full screen" button - the page should enter full screen mode.</p>
<script src="full-screen-test.js"></script>
<script>
function runTest() {
var frame = document.getElementById('frame');
waitForEvent(frame.contentDocument, 'webkitfullscreenchange', function() {
test("document.getElementById('frame').contentDocument.width==document.width")
endTest();
});
runWithKeyDown(function() {
frame.contentDocument.documentElement.webkitRequestFullScreen();
});
}
</script>
<iframe id="frame" src="resources/inner.html" width="300" height="100" onload="runTest()" webkitallowfullscreen>
</iframe>