2012-06-29 15:52:43 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
|
|
|
|
<!--
|
2012-08-14 15:27:26 -07:00
|
|
|
This is a sample WebappRT content mochitest. Since its name is prefixed with
|
|
|
|
webapprt_, this file is picked up by the Mochitest harness. It's just a plain
|
|
|
|
mochitest that runs in the app browser within an app window.
|
2012-06-29 15:52:43 -07:00
|
|
|
-->
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2012-08-14 15:27:26 -07:00
|
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p id="display">
|
|
|
|
This is the sample WebappRT content mochitest.
|
|
|
|
</p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
<script>
|
2012-06-29 15:52:43 -07:00
|
|
|
|
2012-08-14 15:27:26 -07:00
|
|
|
SimpleTest.waitForExplicitFinish();
|
2012-06-29 15:52:43 -07:00
|
|
|
|
2012-08-14 15:27:26 -07:00
|
|
|
ok(true, "true is true!");
|
|
|
|
|
|
|
|
var self = navigator.mozApps.getSelf();
|
|
|
|
self.onsuccess = function () {
|
|
|
|
ok(true, "onsuccess should be called");
|
|
|
|
ok(self.result, "result should be nonnull");
|
|
|
|
ok(self.result.manifest, "manifest should be nonnull");
|
|
|
|
is(self.result.manifest.name, "WebappRT Mochitest Webapp",
|
|
|
|
"manifest.name");
|
|
|
|
SimpleTest.finish();
|
|
|
|
};
|
|
|
|
self.onerror = function () {
|
|
|
|
ok(false, "onerror should not be called");
|
|
|
|
SimpleTest.finish();
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
2012-06-29 15:52:43 -07:00
|
|
|
</body>
|
|
|
|
</html>
|