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
50 lines
1.4 KiB
HTML
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>
|