Index: chrome/test/data/nacl/pnacl_mime_type/pnacl_mime_type.html |
diff --git a/chrome/test/data/nacl/pnacl_mime_type/pnacl_mime_type.html b/chrome/test/data/nacl/pnacl_mime_type/pnacl_mime_type.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cc648303ba24e97adc1926c76516ba36ce424212 |
--- /dev/null |
+++ b/chrome/test/data/nacl/pnacl_mime_type/pnacl_mime_type.html |
@@ -0,0 +1,56 @@ |
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
+<html> |
+<!-- Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+ Use of this source code is governed by a BSD-style license that can be |
+ found in the LICENSE file. --> |
+<head> |
+ <title>PNaCl Mime Type Availability Test</title> |
+ <meta HTTP-EQUIV="Pragma" CONTENT="no-cache" /> |
+ <meta HTTP-EQUIV="Expires" CONTENT="-1" /> |
+ <script type="text/javascript" src="nacltest.js"></script> |
+</head> |
+ |
+<body id="body"> |
+<script type="text/javascript"> |
+//<![CDATA[ |
+function report(msg) { |
+ domAutomationController.setAutomationId(0); |
+ // The automation controller seems to choke on Objects, so turn them into |
+ // strings. |
+ domAutomationController.send(JSON.stringify(msg)); |
+} |
+ |
+var is_pnacl = (getTestArguments()["pnacl"] !== undefined); |
+var tests = 0; |
+var errors = 0; |
+ |
+var pnacl_mime_type = "application/x-pnacl"; |
+if (is_pnacl && (navigator.mimeTypes[pnacl_mime_type] == undefined)) { |
+ report({type: "Log", message: "Error: could not find " + pnacl_mime_type}); |
+ errors++; |
+} else if (!is_pnacl && (navigator.mimeTypes[pnacl_mime_type] !== undefined)) { |
+ report({type: "Log", message: "Error: unexpected " + pnacl_mime_type}); |
+ errors++; |
+} |
+tests++; |
+ |
+var nacl_mime_type = "application/x-nacl"; |
+if (navigator.mimeTypes[nacl_mime_type] == undefined) { |
+ report({type: "Log", message: "Error: could not find " + nacl_mime_type}); |
+ errors++; |
+} |
+tests++; |
+ |
+if (errors == 0) { |
+ report({type: "Shutdown", message: "" + tests + " tests passed.", |
+ passed: true}); |
+} else { |
+ report({type: "Shutdown", |
+ message: "" + errors + "/" + tests + " tests failed.", |
+ passed: false}); |
+} |
+//]]> |
+</script> |
+</body> |
+</html> |