Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Unified Diff: chrome/test/data/nacl/pnacl_mime_type/pnacl_mime_type.html

Issue 16296005: Split pnacl and nacl mime types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: After (hopefully) last rebase. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698