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

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

Issue 1094014: Merge the partial_snapshots branch back into bleeding_edge. For... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } else if (scripts[i].type == Debug.ScriptType.Extension) { 45 } else if (scripts[i].type == Debug.ScriptType.Extension) {
46 extension_count++; 46 extension_count++;
47 } else if (scripts[i].type == Debug.ScriptType.Normal) { 47 } else if (scripts[i].type == Debug.ScriptType.Normal) {
48 normal_count++; 48 normal_count++;
49 } else { 49 } else {
50 assertUnreachable('Unexpected type ' + scripts[i].type); 50 assertUnreachable('Unexpected type ' + scripts[i].type);
51 } 51 }
52 } 52 }
53 53
54 // This has to be updated if the number of native scripts change. 54 // This has to be updated if the number of native scripts change.
55 assertEquals(13, named_native_count); 55 assertEquals(14, named_native_count);
56 // If no snapshot is used, only the 'gc' extension is loaded. 56 // If no snapshot is used, only the 'gc' extension is loaded.
57 // If snapshot is used, all extensions are cached in the snapshot. 57 // If snapshot is used, all extensions are cached in the snapshot.
58 assertTrue(extension_count == 1 || extension_count == 5); 58 assertTrue(extension_count == 1 || extension_count == 5);
59 // This script and mjsunit.js has been loaded. If using d8, d8 loads 59 // This script and mjsunit.js has been loaded. If using d8, d8 loads
60 // a normal script during startup too. 60 // a normal script during startup too.
61 assertTrue(normal_count == 2 || normal_count == 3); 61 assertTrue(normal_count == 2 || normal_count == 3);
62 62
63 // Test a builtins script. 63 // Test a builtins script.
64 var math_script = Debug.findScript('native math.js'); 64 var math_script = Debug.findScript('native math.js');
65 assertEquals('native math.js', math_script.name); 65 assertEquals('native math.js', math_script.name);
(...skipping 17 matching lines...) Expand all
83 } 83 }
84 84
85 // Test a normal script. 85 // Test a normal script.
86 var mjsunit_js_script = Debug.findScript(/mjsunit.js/); 86 var mjsunit_js_script = Debug.findScript(/mjsunit.js/);
87 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name)); 87 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name));
88 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type); 88 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type);
89 89
90 // Check a nonexistent script. 90 // Check a nonexistent script.
91 var dummy_script = Debug.findScript('dummy.js'); 91 var dummy_script = Debug.findScript('dummy.js');
92 assertTrue(typeof dummy_script == 'undefined'); 92 assertTrue(typeof dummy_script == 'undefined');
OLDNEW
« src/x64/stub-cache-x64.cc ('K') | « test/cctest/test-serialize.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698