8c1df3c3acfec2388e3aa92b5561045500a47043
[platform/framework/web/crosswalk.git] / src / xwalk / application / test / data / api / test.html
1 <html>
2 <head>
3 <title></title>
4 </head>
5 <body>
6   <script>
7   var assert = xwalk.app.test.assert;
8   var getManifestTest = function(resolve) {
9     xwalk.app.runtime.getManifest(function(manifest) {
10       assert(manifest);
11       assert(manifest.name === "xwalk.app API Test");
12       assert(manifest.version === "1.0");
13       assert(manifest.manifest_version === 1);
14       resolve();
15     });
16   };
17
18   var getMainDocumentTest = function(resolve) {
19     xwalk.app.runtime.getMainDocument(function(main) {
20       assert(main);
21       assert(main.initialized);
22       resolve();
23     });
24   };
25
26   var tests = [
27     getManifestTest,
28     getMainDocumentTest,
29   ];
30
31   // Wait at most 10 seconds, see commen in eventapi/main.js
32   xwalk.app.test.runTests(tests, 10000);
33   </script>
34 </body>
35 </html>