Revision dac45e99114a10fae7dbc8105076aaef582f2bdc authored by Takayoshi Kochi on 26 April 2016, 12:42:20 UTC, committed by Hayato Ito on 26 April 2016, 12:42:20 UTC
Document attributes that returns HTMLCollection (document.all, document.forms, etc.) should not leak any elements in shadow tree. In this test, these attributes are tested: - document.scripts - document.all - document.forms - document.images - document.links - document.anchors - document.embeds - document.plugins - document.applets
1 parent db4eb13
onchange-event-subframe.html
<!DOCTYPE html>
<html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="testIframe" sandbox="allow-scripts allow-same-origin" style="display:none">
</iframe>
<script>
var test = async_test("Test subframes receive orientation change events");
var orientations = [
'portrait-primary',
'portrait-secondary',
'landscape-primary',
'landscape-secondary'
];
var currentIndex = orientations.indexOf(window.screen.orientation.type);
var eventsReceived = 0;
function getNextIndex() {
return (currentIndex + 1) % orientations.length;
}
function changeOrientation() {
screen.orientation.lock(orientations[getNextIndex()]).then(function () {}, function () {});
currentIndex = getNextIndex();
}
window.onmessage = test.step_func(function (ev) {
assert_equals(ev.data, orientations[currentIndex], "subframe receives orientation change event");
++eventsReceived;
if (eventsReceived < orientations.length)
changeOrientation()
else
test.done();
});
var testIframe = document.getElementById("testIframe");
testIframe.src = "resources/iframe-listen-orientation-change.html";
testIframe.onload = changeOrientation;
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...