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

Unified Diff: test/mjsunit/debug-script.js

Issue 39333: Fix test to run in both snapshot and non-snapshot case (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-script.js
===================================================================
--- test/mjsunit/debug-script.js (revision 1443)
+++ test/mjsunit/debug-script.js (working copy)
@@ -33,28 +33,26 @@
RegExp();
// Count script types.
-var native_count = 0;
+var named_native_count = 0;
var extension_count = 0;
var normal_count = 0;
var scripts = Debug.scripts();
for (i = 0; i < scripts.length; i++) {
if (scripts[i].type == Debug.ScriptType.Native) {
- native_count++;
+ if (scripts[i].name) {
+ named_native_count++;
+ }
} else if (scripts[i].type == Debug.ScriptType.Extension) {
extension_count++;
} else if (scripts[i].type == Debug.ScriptType.Normal) {
- if (!scripts[i].name) print("X" + scripts[i].source + "X"); // empty script
- else {
- print(scripts[i].name);
- normal_count++;
- }
+ normal_count++;
} else {
assertUnreachable('Unexpected type ' + scripts[i].type);
}
}
// This has to be updated if the number of native scripts change.
-assertEquals(16, native_count);
+assertEquals(12, named_native_count);
// If no snapshot is used, only the 'gc' extension is loaded.
// If snapshot is used, all extensions are cached in the snapshot.
assertTrue(extension_count == 1 || extension_count == 5);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698