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

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

Issue 1574223002: Revert of [builtins] Refactor the remaining Date builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « test/cctest/test-date.cc ('k') | test/mjsunit/messages.js » ('j') | 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // This script and mjsunit.js has been loaded. If using d8, d8 loads 78 // This script and mjsunit.js has been loaded. If using d8, d8 loads
79 // a normal script during startup too. 79 // a normal script during startup too.
80 assertTrue(normal_count == 2 || normal_count == 3); 80 assertTrue(normal_count == 2 || normal_count == 3);
81 81
82 // Test a builtins script. 82 // Test a builtins script.
83 var math_script = Debug.findScript('native math.js'); 83 var math_script = Debug.findScript('native math.js');
84 assertEquals('native math.js', math_script.name); 84 assertEquals('native math.js', math_script.name);
85 assertEquals(Debug.ScriptType.Native, math_script.type); 85 assertEquals(Debug.ScriptType.Native, math_script.type);
86 86
87 // Test a builtins delay loaded script. 87 // Test a builtins delay loaded script.
88 var date_delay_script = Debug.findScript('native json.js'); 88 var date_delay_script = Debug.findScript('native date.js');
89 assertEquals('native json.js', date_delay_script.name); 89 assertEquals('native date.js', date_delay_script.name);
90 assertEquals(Debug.ScriptType.Native, date_delay_script.type); 90 assertEquals(Debug.ScriptType.Native, date_delay_script.type);
91 91
92 // Test a debugger script. 92 // Test a debugger script.
93 var debug_delay_script = Debug.findScript('native debug.js'); 93 var debug_delay_script = Debug.findScript('native debug.js');
94 assertEquals('native debug.js', debug_delay_script.name); 94 assertEquals('native debug.js', debug_delay_script.name);
95 assertEquals(Debug.ScriptType.Native, debug_delay_script.type); 95 assertEquals(Debug.ScriptType.Native, debug_delay_script.type);
96 96
97 // Test an extension script. 97 // Test an extension script.
98 var extension_gc_script = Debug.findScript('v8/gc'); 98 var extension_gc_script = Debug.findScript('v8/gc');
99 if (extension_gc_script) { 99 if (extension_gc_script) {
100 assertEquals('v8/gc', extension_gc_script.name); 100 assertEquals('v8/gc', extension_gc_script.name);
101 assertEquals(Debug.ScriptType.Extension, extension_gc_script.type); 101 assertEquals(Debug.ScriptType.Extension, extension_gc_script.type);
102 } 102 }
103 103
104 // Test a normal script. 104 // Test a normal script.
105 var debug_script = Debug.findScript(/debug-script.js/); 105 var debug_script = Debug.findScript(/debug-script.js/);
106 assertTrue(/debug-script.js/.test(debug_script.name)); 106 assertTrue(/debug-script.js/.test(debug_script.name));
107 assertEquals(Debug.ScriptType.Normal, debug_script.type); 107 assertEquals(Debug.ScriptType.Normal, debug_script.type);
108 108
109 // Check a nonexistent script. 109 // Check a nonexistent script.
110 var dummy_script = Debug.findScript('dummy.js'); 110 var dummy_script = Debug.findScript('dummy.js');
111 assertTrue(typeof dummy_script == 'undefined'); 111 assertTrue(typeof dummy_script == 'undefined');
112 112
113 Debug.setListener(null); 113 Debug.setListener(null);
OLDNEW
« no previous file with comments | « test/cctest/test-date.cc ('k') | test/mjsunit/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698