blob: 3a91f9eaecd400d4bf3d32e601b83b6e8fdb99b3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function log(m) {
var results = document.getElementById('results');
results.innerHTML += m + '<br>';
}
function testQuery(query, expected) {
var isTrue = window.styleMedia.matchMedium(query);
var message = '\"' + query + '\" evaluates to ' + (isTrue ? 'true' : 'false');
message = ((isTrue === expected) ? 'PASS: ' : 'FAIL: ') + message;
log(message);
}
function runTests() {
log("Enabling Inline Media Playback");
internals.settings.setAllowsInlineMediaPlayback(true);
testQuery('(-webkit-video-playable-inline)', true);
log("Disabling Inline Media Playback");
internals.settings.setAllowsInlineMediaPlayback(false);
testQuery('(-webkit-video-playable-inline)', false);
}
</script>
</head>
<body onload="runTests()">
<p>Tests the (-webkit-video-playable-inline) media query.</p>
<div id="results"></div>
</body>
</html>