1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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
6 found in the LICENSE file. -->
8 <title>PNaCl Mime Type Availability Test</title>
9 <meta HTTP-EQUIV="Pragma" CONTENT="no-cache" />
10 <meta HTTP-EQUIV="Expires" CONTENT="-1" />
11 <script type="text/javascript" src="nacltest.js"></script>
15 <script type="text/javascript">
17 function report(msg) {
18 domAutomationController.setAutomationId(0);
19 // The automation controller seems to choke on Objects, so turn them into
21 domAutomationController.send(JSON.stringify(msg));
24 var pnacl_disabled = (getTestArguments()["pnacl_disabled"] !== undefined);
28 var pnacl_mime_type = "application/x-pnacl";
29 if (!pnacl_disabled && (navigator.mimeTypes[pnacl_mime_type] == undefined)) {
30 report({type: "Log", message: "Error: could not find " + pnacl_mime_type});
32 } else if (pnacl_disabled &&
33 (navigator.mimeTypes[pnacl_mime_type] !== undefined)) {
34 report({type: "Log", message: "Error: unexpected " + pnacl_mime_type});
39 var nacl_mime_type = "application/x-nacl";
40 if (navigator.mimeTypes[nacl_mime_type] == undefined) {
41 report({type: "Log", message: "Error: could not find " + nacl_mime_type});
47 report({type: "Shutdown", message: "" + tests + " tests passed.",
50 report({type: "Shutdown",
51 message: "" + errors + "/" + tests + " tests failed.",