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

Side by Side Diff: test/mjsunit/debug-stepin-function-call.js

Issue 23513023: Support stepin for combination of apply and bound function (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: format Created 7 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 | « src/debug.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 var yetAnotherLocal = 10; 135 var yetAnotherLocal = 10;
136 } 136 }
137 137
138 // Test step into bound function. 138 // Test step into bound function.
139 function bind1() { 139 function bind1() {
140 var bound = g.bind(null, 3); 140 var bound = g.bind(null, 3);
141 debugger; 141 debugger;
142 bound(); 142 bound();
143 } 143 }
144 144
145 // Test step into apply of bound function.
146 function applyAndBind1() {
147 var bound = g.bind(null, 3);
148 debugger;
149 bound.apply(null, [3]);
150 var aLocalVar = 'test';
151 var anotherLocalVar = g(aLocalVar) + 's';
152 var yetAnotherLocal = 10;
153 }
154
145 var testFunctions = 155 var testFunctions =
146 [call1, call2, call3, call4, apply1, apply2, apply3, apply4, bind1]; 156 [call1, call2, call3, call4, apply1, apply2, apply3, apply4, bind1,
157 applyAndBind1];
147 158
148 for (var i = 0; i < testFunctions.length; i++) { 159 for (var i = 0; i < testFunctions.length; i++) {
149 state = 0; 160 state = 0;
150 testFunctions[i](); 161 testFunctions[i]();
151 assertNull(exception); 162 assertNull(exception);
152 assertEquals(3, state); 163 assertEquals(3, state);
153 } 164 }
154 165
155 // Test global bound function. 166 // Test global bound function.
156 state = 0; 167 state = 0;
157 var globalBound = g.bind(null, 3); 168 var globalBound = g.bind(null, 3);
158 debugger; 169 debugger;
159 globalBound(); 170 globalBound();
160 assertNull(exception); 171 assertNull(exception);
161 assertEquals(3, state); 172 assertEquals(3, state);
162 173
163 // Get rid of the debug event listener. 174 // Get rid of the debug event listener.
164 Debug.setListener(null); 175 Debug.setListener(null);
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698