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

Side by Side Diff: tests/manifest_file/pm_pre_init_manifest_file_test.html

Issue 7745047: Enable browser tests with glibc. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 Copyright 2011 The Native Client Authors. All rights reserved. 2 Copyright 2011 The Native Client Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can 3 Use of this source code is governed by a BSD-style license that can
4 be found in the LICENSE file. 4 be found in the LICENSE file.
5 --> 5 -->
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
7 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 7 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8 <html> 8 <html>
9 <head> 9 <head>
10 <meta http-equiv="Pragma" content="no-cache" /> 10 <meta http-equiv="Pragma" content="no-cache" />
(...skipping 15 matching lines...) Expand all
26 style="background-color:gray" 26 style="background-color:gray"
27 type="application/x-nacl" /> 27 type="application/x-nacl" />
28 </div> 28 </div>
29 29
30 <script type="text/javascript"> 30 <script type="text/javascript">
31 //<![CDATA[ 31 //<![CDATA[
32 function setupTests(tester, plugin) { 32 function setupTests(tester, plugin) {
33 tester.addAsyncTest('Test_00_ManifestData', function(status) { 33 tester.addAsyncTest('Test_00_ManifestData', function(status) {
34 plugin.addEventListener('message', function(message_event) { 34 plugin.addEventListener('message', function(message_event) {
35 this.removeEventListener('message', arguments.callee, false); 35 this.removeEventListener('message', arguments.callee, false);
36 var golden = 'File Contents:\n// There should not be CRs in here, just LF termination!\n{\n "program": {\n "x86-32": {"url": "pm_pre_init_manifest_fil e_test_x86-32.nexe"},\n "x86-64": {"url": "pm_pre_init_manifest_file_test_x86 -64.nexe"},\n "arm": {"url": "pm_pre_init_manifest_file_test_arm.nexe"}\n },\n "files": {\n "nmf says hello world": {\n "x86-32": {"url": "pm_pr e_init_manifest_file_test_x86-32.nexe"},\n "x86-64": {"url": "pm_pre_init_m anifest_file_test_x86-64.nexe"},\n "arm": {"url": "pm_pre_init_manifest_ file_test_arm.nexe"}\n },\n "test_file": {\n "portable": {"url": "pm_ pre_init_manifest_file.nmf"}\n }\n }\n}\nOpening non-existent file:\nGot des criptor -1, status 0\n'; 36 var golden = 'File Contents:\nTest File Content\nOpening non-existent file :\nGot descriptor -1, status 0\n';
37 status.log('expecting golden: ' + golden); 37 status.log('expecting golden: ' + golden);
38 status.log('golden.length: ' + golden.length); 38 status.log('golden.length: ' + golden.length);
39 status.log('message_event.data.length: ' + message_event.data.length); 39 status.log('message_event.data.length: ' + message_event.data.length);
40 var min_length = Math.min(message_event.data.length, golden.length); 40 var min_length = Math.min(message_event.data.length, golden.length);
41 status.log('min_length = ' + min_length); 41 status.log('min_length = ' + min_length);
42 var i = 0; 42 var i = 0;
43 for (i = 0; i < min_length; i++) { 43 for (i = 0; i < min_length; i++) {
44 var mchar = message_event.data.charAt(i); 44 var mchar = message_event.data.charAt(i);
45 var gchar = golden.charAt(i); 45 var gchar = golden.charAt(i);
46 if (mchar != gchar) { 46 if (mchar != gchar) {
47 status.log('char at ' + i + ' differ: ' + mchar + ' != ' + gchar); 47 status.log('char at ' + i + ' differ: ' + mchar + ' != ' + gchar);
48 status.log('charcodes: ' + mchar.charCodeAt(0) + ' != ' + gchar.charCo deAt(0)); 48 status.log('charcodes: ' + mchar.charCodeAt(0) + ' != ' + gchar.charCo deAt(0));
49 } 49 }
50 } 50 }
51 status.assertEqual(message_event.data, golden); 51 status.assertEqual(message_event.data, golden);
52 status.pass(); 52 status.pass();
53 }, false); 53 }, false);
54 plugin.postMessage('manifest_data'); 54 plugin.postMessage('manifest_data');
55 }); 55 });
56 } 56 }
57 57
58 var tester = new Tester(); 58 var tester = new Tester();
59 setupTests(tester, $('naclModule')); 59 setupTests(tester, $('naclModule'));
60 tester.waitFor($('naclModule')); 60 tester.waitFor($('naclModule'));
61 tester.run(); 61 tester.run();
62 //]]> 62 //]]>
63 </script> 63 </script>
64 </body> 64 </body>
65 </html> 65 </html>
OLDNEW
« no previous file with comments | « tests/manifest_file/pm_pre_init_manifest_file_test.cc ('k') | tests/manifest_file/srpc_manifest_file_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698