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

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

Issue 15059009: Enable native implementation of array buffer and typed arrays in d8 and tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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
« test/cctest/test-heap.cc ('K') | « test/cctest/test-heap.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } else if (scripts[i].type == Debug.ScriptType.Extension) { 53 } else if (scripts[i].type == Debug.ScriptType.Extension) {
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(14, named_native_count); 63 assertEquals(16, named_native_count);
64 // If no snapshot is used, only the 'gc' extension is loaded. 64 // If no snapshot is used, only the 'gc' extension is loaded.
65 // If snapshot is used, all extensions are cached in the snapshot. 65 // If snapshot is used, all extensions are cached in the snapshot.
66 assertTrue(extension_count == 1 || extension_count == 5); 66 assertTrue(extension_count == 1 || extension_count == 5);
67 // This script and mjsunit.js has been loaded. If using d8, d8 loads 67 // This script and mjsunit.js has been loaded. If using d8, d8 loads
68 // a normal script during startup too. 68 // a normal script during startup too.
69 assertTrue(normal_count == 2 || normal_count == 3); 69 assertTrue(normal_count == 2 || normal_count == 3);
70 70
71 // Test a builtins script. 71 // Test a builtins script.
72 var math_script = Debug.findScript('native math.js'); 72 var math_script = Debug.findScript('native math.js');
73 assertEquals('native math.js', math_script.name); 73 assertEquals('native math.js', math_script.name);
(...skipping 17 matching lines...) Expand all
91 } 91 }
92 92
93 // Test a normal script. 93 // Test a normal script.
94 var mjsunit_js_script = Debug.findScript(/mjsunit.js/); 94 var mjsunit_js_script = Debug.findScript(/mjsunit.js/);
95 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name)); 95 assertTrue(/mjsunit.js/.test(mjsunit_js_script.name));
96 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type); 96 assertEquals(Debug.ScriptType.Normal, mjsunit_js_script.type);
97 97
98 // Check a nonexistent script. 98 // Check a nonexistent script.
99 var dummy_script = Debug.findScript('dummy.js'); 99 var dummy_script = Debug.findScript('dummy.js');
100 assertTrue(typeof dummy_script == 'undefined'); 100 assertTrue(typeof dummy_script == 'undefined');
OLDNEW
« test/cctest/test-heap.cc ('K') | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698