Index: chrome/test/data/nacl/pnacl_debug_url/pnacl_debug_url.html |
diff --git a/chrome/test/data/nacl/pnacl_nmf_options/pnacl_options.html b/chrome/test/data/nacl/pnacl_debug_url/pnacl_debug_url.html |
similarity index 58% |
copy from chrome/test/data/nacl/pnacl_nmf_options/pnacl_options.html |
copy to chrome/test/data/nacl/pnacl_debug_url/pnacl_debug_url.html |
index 3f9ca6516f208fe04b52d03747814ea97a9b2aaa..1d1ac132216a74f2b815db715d39a0dab6a0185c 100644 |
--- a/chrome/test/data/nacl/pnacl_nmf_options/pnacl_options.html |
+++ b/chrome/test/data/nacl/pnacl_debug_url/pnacl_debug_url.html |
@@ -1,15 +1,15 @@ |
<html> |
<!-- |
-Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+Copyright (c) 2014 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>NaCl Load Test</title> |
+<title>PNaCl Debug URL test</title> |
<script type="text/javascript" src="nacltest.js"></script> |
</head> |
<body> |
-<h2>PNaCl Load Options Test</h2> |
+<h2>PNaCl Debug URL Test</h2> |
</body> |
<script> |
@@ -20,15 +20,22 @@ function report(msg) { |
domAutomationController.send(JSON.stringify(msg)); |
} |
-function create(manifest_prefix, manifest_opt) { |
+var tests_passed = 0; |
+var expected_tests = 2; |
+ |
+function create(nmf_url) { |
var embed = document.createElement("embed"); |
- var nmf_url = manifest_prefix + manifest_opt + ".nmf"; |
embed.src = nmf_url; |
embed.type = "application/x-pnacl"; |
embed.addEventListener("load", function(evt) { |
- report({type: "Shutdown", message: "1 test passed.", passed: true}); |
+ tests_passed++; |
+ if (tests_passed == expected_tests) { |
+ report({type: "Shutdown", |
+ message: expected_tests + " test passed.", |
+ passed: true}); |
+ } |
}, true); |
embed.addEventListener("error", function(evt) { |
@@ -39,9 +46,11 @@ function create(manifest_prefix, manifest_opt) { |
document.body.appendChild(embed); |
} |
-var nmf_to_test = getTestArguments( |
- {'use_nmf' : 'Unknown NMF choice'})['use_nmf']; |
+// Load an NMF w/ a special debug url. It should pick that and work. |
+// Load an NMF w/ no special debug url. It should fall back to the |
+// non-debug one and succeed. |
bradn
2014/02/27 00:14:42
So it seems like this should do the debug url if d
jvoung (off chromium)
2014/02/27 23:06:37
Added a test where the manifest has both choices,
|
+create("pnacl_has_debug.nmf"); |
+create("pnacl_no_debug.nmf"); |
-create("pnacl_", nmf_to_test); |
</script> |
</html> |