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

Side by Side Diff: test/mjsunit/debug-set-variable-value.js

Issue 1005053004: Debugger: remove unused JS Debugger API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 11 matching lines...) Expand all
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 // Flags: --expose-debug-as debug 28 // Flags: --expose-debug-as debug
29 29
30 // Get the Debug object exposed from the debug context global object. 30 // Get the Debug object exposed from the debug context global object.
31 var Debug = debug.Debug; 31 var Debug = debug.Debug;
32 var DebugCommandProcessor = debug.DebugCommandProcessor;
32 33
33 // Accepts a function/closure 'fun' that must have a debugger statement inside. 34 // Accepts a function/closure 'fun' that must have a debugger statement inside.
34 // A variable 'variable_name' must be initialized before debugger statement 35 // A variable 'variable_name' must be initialized before debugger statement
35 // and returned after the statement. The test will alter variable value when 36 // and returned after the statement. The test will alter variable value when
36 // on debugger statement and check that returned value reflects the change. 37 // on debugger statement and check that returned value reflects the change.
37 function RunPauseTest(scope_number, expected_old_result, variable_name, 38 function RunPauseTest(scope_number, expected_old_result, variable_name,
38 new_value, expected_new_result, fun) { 39 new_value, expected_new_result, fun) {
39 var actual_old_result = fun(); 40 var actual_old_result = fun();
40 assertEquals(expected_old_result, actual_old_result); 41 assertEquals(expected_old_result, actual_old_result);
41 42
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 debugger; 285 debugger;
285 return p; 286 return p;
286 } 287 }
287 return A(5); 288 return A(5);
288 } 289 }
289 })()); 290 })());
290 291
291 292
292 // Test value description protocol JSON 293 // Test value description protocol JSON
293 294
294 assertEquals(true, Debug.TestApi.CommandProcessorResolveValue({value: true})); 295 assertEquals(true, DebugCommandProcessor.resolveValue_({value: true}));
295 296
296 assertSame(null, Debug.TestApi.CommandProcessorResolveValue({type: "null"})); 297 assertSame(null, DebugCommandProcessor.resolveValue_({type: "null"}));
297 assertSame(undefined, 298 assertSame(undefined,
298 Debug.TestApi.CommandProcessorResolveValue({type: "undefined"})); 299 DebugCommandProcessor.resolveValue_({type: "undefined"}));
299 300
300 assertSame("123", Debug.TestApi.CommandProcessorResolveValue( 301 assertSame("123", DebugCommandProcessor.resolveValue_(
301 {type: "string", stringDescription: "123"})); 302 {type: "string", stringDescription: "123"}));
302 assertSame(123, Debug.TestApi.CommandProcessorResolveValue( 303 assertSame(123, DebugCommandProcessor.resolveValue_(
303 {type: "number", stringDescription: "123"})); 304 {type: "number", stringDescription: "123"}));
304 305
305 assertSame(Number, Debug.TestApi.CommandProcessorResolveValue( 306 assertSame(Number, DebugCommandProcessor.resolveValue_(
306 {handle: Debug.MakeMirror(Number).handle()})); 307 {handle: Debug.MakeMirror(Number).handle()}));
307 assertSame(RunClosureTest, Debug.TestApi.CommandProcessorResolveValue( 308 assertSame(RunClosureTest, DebugCommandProcessor.resolveValue_(
308 {handle: Debug.MakeMirror(RunClosureTest).handle()})); 309 {handle: Debug.MakeMirror(RunClosureTest).handle()}));
OLDNEW
« no previous file with comments | « test/mjsunit/debug-liveedit-check-stack.js ('k') | test/mjsunit/es6/generators-debug-liveedit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698