gecko/dom/tv/test/mochitest/test_tv_non_permitted_app.html
Sean Lin a79f77fa4f Bug 1088310 - [Stingray] Add more tests to TV Manager API. r=ehsan
--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
2014-10-22 23:15:24 +08:00

50 lines
1.4 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>Test Non-Permitted Application for TV API</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript" src="./head.js"></script>
<script type="application/javascript">
var tests = [
function() {
SpecialPowers.pushPrefEnv({"set": [["dom.tv.enabled", true]]}, function() {
SpecialPowers.pushPermissions(
[{ "type": "browser", "allow": true, "context": document },
{ "type": "embed-apps", "allow": true, "context": document },
{ "type": "webapps-manage", "allow": true, "context": document }],
function() {
SpecialPowers.setAllAppsLaunchable(true);
SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
// No confirmation needed when an app is installed and uninstalled.
SpecialPowers.autoConfirmAppInstall(() => {
SpecialPowers.autoConfirmAppUninstall(runTest);
});
});
});
},
// Installing the app
installApp.bind(this, "file_tv_non_permitted_app.html", "file_app.template.webapp"),
// Run tests in app
testApp,
// Uninstall the app
uninstallApp
];
SimpleTest.waitForExplicitFinish();
runTest();
</script>
</pre>
</body>
</html>