| OLD | NEW |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 <html> | 3 <html> |
| 4 <!-- Copyright (c) 2013 The Chromium Authors. All rights reserved. | 4 <!-- Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
| 6 found in the LICENSE file. --> | 6 found in the LICENSE file. --> |
| 7 <head> | 7 <head> |
| 8 <title>PNaCl Mime Type Availability Test</title> | 8 <title>PNaCl Mime Type Availability Test</title> |
| 9 <meta HTTP-EQUIV="Pragma" CONTENT="no-cache" /> | 9 <meta HTTP-EQUIV="Pragma" CONTENT="no-cache" /> |
| 10 <meta HTTP-EQUIV="Expires" CONTENT="-1" /> | 10 <meta HTTP-EQUIV="Expires" CONTENT="-1" /> |
| 11 <script type="text/javascript" src="nacltest.js"></script> | 11 <script type="text/javascript" src="nacltest.js"></script> |
| 12 </head> | 12 </head> |
| 13 | 13 |
| 14 <body id="body"> | 14 <body id="body"> |
| 15 <script type="text/javascript"> | 15 <script type="text/javascript"> |
| 16 //<![CDATA[ | 16 //<![CDATA[ |
| 17 function report(msg) { | 17 function report(msg) { |
| 18 domAutomationController.setAutomationId(0); | 18 domAutomationController.send(msg); |
| 19 // The automation controller seems to choke on Objects, so turn them into | |
| 20 // strings. | |
| 21 domAutomationController.send(JSON.stringify(msg)); | |
| 22 } | 19 } |
| 23 | 20 |
| 24 var tests = 0; | 21 var tests = 0; |
| 25 var errors = 0; | 22 var errors = 0; |
| 26 | 23 |
| 27 var pnacl_mime_type = "application/x-pnacl"; | 24 var pnacl_mime_type = "application/x-pnacl"; |
| 28 if (navigator.mimeTypes[pnacl_mime_type] == undefined) { | 25 if (navigator.mimeTypes[pnacl_mime_type] == undefined) { |
| 29 report({type: "Log", message: "Error: could not find " + pnacl_mime_type}); | 26 report({type: "Log", message: "Error: could not find " + pnacl_mime_type}); |
| 30 errors++; | 27 errors++; |
| 31 } | 28 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 43 passed: true}); | 40 passed: true}); |
| 44 } else { | 41 } else { |
| 45 report({type: "Shutdown", | 42 report({type: "Shutdown", |
| 46 message: "" + errors + "/" + tests + " tests failed.", | 43 message: "" + errors + "/" + tests + " tests failed.", |
| 47 passed: false}); | 44 passed: false}); |
| 48 } | 45 } |
| 49 //]]> | 46 //]]> |
| 50 </script> | 47 </script> |
| 51 </body> | 48 </body> |
| 52 </html> | 49 </html> |
| OLD | NEW |