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

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

Issue 39322: Mark special internal scripts as native scripts (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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 | « src/runtime.cc ('k') | no next file » | 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 else { 47 else {
48 print(scripts[i].name); 48 print(scripts[i].name);
49 normal_count++; 49 normal_count++;
50 } 50 }
51 } else { 51 } else {
52 assertUnreachable('Unexpected type ' + scripts[i].type); 52 assertUnreachable('Unexpected type ' + scripts[i].type);
53 } 53 }
54 } 54 }
55 55
56 // This has to be updated if the number of native scripts change. 56 // This has to be updated if the number of native scripts change.
57 assertEquals(12, native_count); 57 assertEquals(16, native_count);
58 // If no snapshot is used, only the 'gc' extension is loaded. 58 // If no snapshot is used, only the 'gc' extension is loaded.
59 // If snapshot is used, all extensions are cached in the snapshot. 59 // If snapshot is used, all extensions are cached in the snapshot.
60 assertTrue(extension_count == 1 || extension_count == 5); 60 assertTrue(extension_count == 1 || extension_count == 5);
61 // This script and mjsunit.js has been loaded. If using d8, d8 loads 61 // This script and mjsunit.js has been loaded. If using d8, d8 loads
62 // a normal script during startup too. 62 // a normal script during startup too.
63 assertTrue(normal_count == 2 || normal_count == 3); 63 assertTrue(normal_count == 2 || normal_count == 3);
64 64
65 // Test a builtins script. 65 // Test a builtins script.
66 var math_script = Debug.findScript('native math.js'); 66 var math_script = Debug.findScript('native math.js');
67 assertEquals('native math.js', math_script.name); 67 assertEquals('native math.js', math_script.name);
(...skipping 17 matching lines...) Expand all
85 } 85 }
86 86
87 // Test a normal script. 87 // Test a normal script.
88 var mjsunit_js_script = Debug.findScript(/mjsunit.js/); 88 var mjsunit_js_script = Debug.findScript(/mjsunit.js/);
89 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name)); 89 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name));
90 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type); 90 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type);
91 91
92 // Check a nonexistent script. 92 // Check a nonexistent script.
93 var dummy_script = Debug.findScript('dummy.js'); 93 var dummy_script = Debug.findScript('dummy.js');
94 assertTrue(typeof dummy_script == 'undefined'); 94 assertTrue(typeof dummy_script == 'undefined');
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698