Bug 1507486 [wpt PR 14072] - Automate one fullscreen test using `test_driver.bless`, a=testonly

Automatic update from web-platform-testsAutomate one fullscreen test using `test_driver.bless` (#14072)

Part of https://github.com/web-platform-tests/wpt/issues/7281.
--

wpt-commits: 39e6009b920f632e6c2fee6cd3d96418d677d04f
wpt-pr: 14072
This commit is contained in:
Philip Jägenstedt 2018-11-30 16:53:47 +00:00 коммит произвёл James Graham
Родитель 2c5781d0e9
Коммит 1dd329e9f5
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2,11 +2,14 @@
<title>Element#requestFullscreen()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../trusted-click.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<div id="log"></div>
<script>
async_test(function(t)
{
t.add_cleanup(() => { document.exitFullscreen() });
var div = document.querySelector("div");
document.addEventListener("fullscreenchange", t.step_func(function(event)
@ -18,6 +21,7 @@ async_test(function(t)
t.done();
}));
trusted_request(t, div);
test_driver.bless("fullscreen", () => div.requestFullscreen())
.catch(t.step_func(assert_unreached));
});
</script>