tenfourfox/dom/ipc/tests/test_permission_for_nested_oop_app.html
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

75 lines
2.0 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1114507
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1114507</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1114507">Mozilla Bug1114507</a>
<p id="display"></p>
<div id="container" style="display: none"></div>
<script type="text/javascript" src="test_permission_helper.js"></script>
<script type="application/javascript">
// Put all the tests in order
var tests = [
// Setup preferences and permissions
setupPrefsAndPermissions,
// ****************************************************
// Setup the enviroment for testing nested-oop cases: *
// test 3,4,5 *
// ****************************************************
// Install the app
installApp,
// Allow permission for embedApp to open mozbrowser and mozapp
function() {
var appId = gAppsService.getAppLocalIdByManifestURL(embedAppHostedManifestURL);
var context = { url: embedApp.origin,
originAttributes: { appId: appId } };
setupOpenAppPermission(context, runTests);
},
// +-------------------------------------------+
// | Test 3: Open a test-target-app on 3rd |
// | level child-process then close it |
// +-------------------------------------------+
//
// level
// 1 chrome process
// |
// 2 child process
// |
// 3 child process <-- app is here
// Add permission to app
function() {
addPermissionToApp(APP_URL, APP_MANIFEST);
},
test3,
// Remove the child-process on 2nd level
function() {
var afterShutdown = function() {
runTests();
};
afterContentShutdown(1, afterShutdown);
removeAppFrame(APP_IFRAME_ID);
},
uninstallApp
];
runTests();
</script>
</body>
</html>