mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
a79f77fa4f
--HG-- rename : dom/tv/test/file_app.sjs => dom/tv/test/mochitest/file_app.sjs rename : dom/tv/test/file_app.template.webapp => dom/tv/test/mochitest/file_app.template.webapp rename : dom/tv/test/file_tv_non_permitted_app.html => dom/tv/test/mochitest/file_tv_non_permitted_app.html rename : dom/tv/test/mochitest.ini => dom/tv/test/mochitest/mochitest.ini rename : dom/tv/test/test_tv_non_permitted_app.html => dom/tv/test/mochitest/test_tv_non_permitted_app.html
39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test GetTuners for TV API</title>
|
|
</head>
|
|
<body>
|
|
<div id="content"></div>
|
|
<script type="application/javascript" src="./test_helpers.js"></script>
|
|
<script type="application/javascript;version=1.7">
|
|
|
|
ok('tv' in navigator, "navigator.tv should exist.");
|
|
|
|
navigator.tv.getTuners().then(
|
|
function(aTuners) {
|
|
ok(aTuners.length > 0, "Got at least 1 tuner.");
|
|
for (var i = 0; i < aTuners.length; i++) {
|
|
var tuner = aTuners[i];
|
|
ok(tuner instanceof TVTuner, "Tuner " + i + " should be in the right type.");
|
|
ok('id' in tuner, "Tuner " + i + " should have an ID.");
|
|
ok(tuner.getSupportedSourceTypes().length > 0,
|
|
"Tuner " + i + " should have supported source type(s).");
|
|
ok(!tuner.currentSource,
|
|
"Tuner " + i + " should have no current source by default.");
|
|
ok(!tuner.stream, "Tuner " + i + " should have no stream by default.");
|
|
}
|
|
|
|
finish();
|
|
},
|
|
function(aError) {
|
|
ok(false, "Error occurred when getting tuners: " + aError);
|
|
finish();
|
|
}
|
|
);
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|