- add sources.
[platform/framework/web/crosswalk.git] / src / ppapi / native_client / tests / ppapi_browser / extension_mime_handler / ppapi_extension_mime_handler.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4   <!-- Copyright 2011 Google Inc.  All rights reserved. -->
5   <head>
6     <script type="text/javascript" src="nacltest.js"></script>
7     <script type="application/x-javascript">
8       //<![CDATA[
9       function iframe_loaded() {
10         var iframe_doc = window.frames['iframe_id'].document;
11         var iframe_body = iframe_doc.body;
12         var tester = new Tester();
13         // 'plugin' is the name given to the embed by webkit
14         var plugin = iframe_doc.getElementsByName('plugin')[0];
15
16         function addTest(test_name, responses) {
17           if (responses === undefined) {
18             responses = [];
19           }
20           var expected_messages = [test_name + ':PASSED'].concat(responses);
21           tester.addAsyncTest(test_name, function(test) {
22             test.expectMessageSequence(plugin, expected_messages);
23             plugin.postMessage(test_name)
24           });
25         }
26
27         addTest('TestHandleDocumentLoad');
28         addTest('TestIsFullFrame');
29         tester.waitFor(plugin);
30         tester.run();
31       }
32       //]]>
33     </script>
34     <title>PPAPI Extension MIME Type Test</title>
35   </head>
36   <body>
37     <h1>PPAPI Extension MIME Type Test</h1>
38     <iframe src='mime_test_data.dat'
39             id='iframe_id'
40             width='100'
41             height='100'
42             onload='iframe_loaded()'>
43     </iframe>
44   </body>
45 </html>