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

Side by Side Diff: test/mjsunit/debug-script.js

Issue 18187006: Change mjsunit tests to work with and without the i18n extension (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« no previous file with comments | « test/mjsunit/date.js ('k') | test/mjsunit/function-call.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 extension_count++; 54 extension_count++;
55 } else if (scripts[i].type == Debug.ScriptType.Normal) { 55 } else if (scripts[i].type == Debug.ScriptType.Normal) {
56 normal_count++; 56 normal_count++;
57 } else { 57 } else {
58 assertUnreachable('Unexpected type ' + scripts[i].type); 58 assertUnreachable('Unexpected type ' + scripts[i].type);
59 } 59 }
60 } 60 }
61 61
62 // This has to be updated if the number of native scripts change. 62 // This has to be updated if the number of native scripts change.
63 assertEquals(16, named_native_count); 63 assertEquals(16, named_native_count);
64 // If no snapshot is used, only the 'gc' extension is loaded. 64 // Only the 'gc' and (depending on flags) the 'i18n' extensions are loaded.
65 // If snapshot is used, all extensions are cached in the snapshot. 65 assertTrue(extension_count == 1 || extension_count == 2);
66 assertTrue(extension_count == 1 || extension_count == 5);
67 // This script and mjsunit.js has been loaded. If using d8, d8 loads 66 // This script and mjsunit.js has been loaded. If using d8, d8 loads
68 // a normal script during startup too. 67 // a normal script during startup too.
69 assertTrue(normal_count == 2 || normal_count == 3); 68 assertTrue(normal_count == 2 || normal_count == 3);
70 69
71 // Test a builtins script. 70 // Test a builtins script.
72 var math_script = Debug.findScript('native math.js'); 71 var math_script = Debug.findScript('native math.js');
73 assertEquals('native math.js', math_script.name); 72 assertEquals('native math.js', math_script.name);
74 assertEquals(Debug.ScriptType.Native, math_script.type); 73 assertEquals(Debug.ScriptType.Native, math_script.type);
75 74
76 // Test a builtins delay loaded script. 75 // Test a builtins delay loaded script.
(...skipping 14 matching lines...) Expand all
91 } 90 }
92 91
93 // Test a normal script. 92 // Test a normal script.
94 var mjsunit_js_script = Debug.findScript(/mjsunit.js/); 93 var mjsunit_js_script = Debug.findScript(/mjsunit.js/);
95 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name)); 94 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name));
96 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type); 95 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type);
97 96
98 // Check a nonexistent script. 97 // Check a nonexistent script.
99 var dummy_script = Debug.findScript('dummy.js'); 98 var dummy_script = Debug.findScript('dummy.js');
100 assertTrue(typeof dummy_script == 'undefined'); 99 assertTrue(typeof dummy_script == 'undefined');
OLDNEW
« no previous file with comments | « test/mjsunit/date.js ('k') | test/mjsunit/function-call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698