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

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

Issue 1937: Enabling a few tests when using snapshots.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
« no previous file with comments | « test/cctest/test-api.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(12, native_count);
58 // If no snapshot is used, only the 'gc' extension is loaded.
59 // If snapshot is used, all extensions are cached in the snapshot.
60 assertTrue(extension_count == 1 || extension_count == 5);
58 assertEquals(2, normal_count); // This script and mjsunit.js. 61 assertEquals(2, normal_count); // This script and mjsunit.js.
59 62
60 // Test a builtins script. 63 // Test a builtins script.
61 var math_script = Debug.findScript('native math.js'); 64 var math_script = Debug.findScript('native math.js');
62 assertEquals('native math.js', math_script.name); 65 assertEquals('native math.js', math_script.name);
63 assertEquals(Debug.ScriptType.Native, math_script.type); 66 assertEquals(Debug.ScriptType.Native, math_script.type);
64 67
65 // Test a builtins delay loaded script. 68 // Test a builtins delay loaded script.
66 var date_delay_script = Debug.findScript('native date.js'); 69 var date_delay_script = Debug.findScript('native date.js');
67 assertEquals('native date.js', date_delay_script.name); 70 assertEquals('native date.js', date_delay_script.name);
(...skipping 12 matching lines...) Expand all
80 } 83 }
81 84
82 // Test a normal script. 85 // Test a normal script.
83 var mjsunit_js_script = Debug.findScript(/mjsunit.js/); 86 var mjsunit_js_script = Debug.findScript(/mjsunit.js/);
84 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name)); 87 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name));
85 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type); 88 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type);
86 89
87 // Check a nonexistent script. 90 // Check a nonexistent script.
88 var dummy_script = Debug.findScript('dummy.js'); 91 var dummy_script = Debug.findScript('dummy.js');
89 assertTrue(typeof dummy_script == 'undefined'); 92 assertTrue(typeof dummy_script == 'undefined');
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698