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

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

Issue 43008: Make unique id to all scripts work with snapshot (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap-inl.h ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 function testArguments(dcp, arguments, success, is_script) { 52 function testArguments(dcp, arguments, success, is_script) {
53 var request = '{' + base_request + ',"arguments":' + arguments + '}' 53 var request = '{' + base_request + ',"arguments":' + arguments + '}'
54 var json_response = dcp.processDebugJSONRequest(request); 54 var json_response = dcp.processDebugJSONRequest(request);
55 var response = safeEval(json_response); 55 var response = safeEval(json_response);
56 if (success) { 56 if (success) {
57 assertTrue(response.success, json_response); 57 assertTrue(response.success, json_response);
58 if (is_script) { 58 if (is_script) {
59 assertEquals('scriptName', response.body.type, json_response); 59 assertEquals('scriptName', response.body.type, json_response);
60 } else { 60 } else {
61 assertEquals('scriptId', response.body.type, json_response); 61 assertEquals('scriptId', response.body.type, json_response);
62 print(response.body.script_id);
63 } 62 }
64 } else { 63 } else {
65 assertFalse(response.success, json_response); 64 assertFalse(response.success, json_response);
66 } 65 }
67 } 66 }
68 67
69 function listener(event, exec_state, event_data, data) { 68 function listener(event, exec_state, event_data, data) {
70 try { 69 try {
71 if (event == Debug.DebugEvent.Break) { 70 if (event == Debug.DebugEvent.Break) {
72 // Get the debug command processor. 71 // Get the debug command processor.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 assertTrue(g_line > 0, "invalid line for g"); 144 assertTrue(g_line > 0, "invalid line for g");
146 assertTrue(f_line < g_line); 145 assertTrue(f_line < g_line);
147 assertEquals(h_line, 0, "invalid line for h"); 146 assertEquals(h_line, 0, "invalid line for h");
148 147
149 // Set a break point and call to invoke the debug event listener. 148 // Set a break point and call to invoke the debug event listener.
150 Debug.setBreakPoint(g, 0, 0); 149 Debug.setBreakPoint(g, 0, 0);
151 g(); 150 g();
152 151
153 // Make sure that the debug event listener vas invoked. 152 // Make sure that the debug event listener vas invoked.
154 assertTrue(listenerComplete, "listener did not run to completion: " + exception) ; 153 assertTrue(listenerComplete, "listener did not run to completion: " + exception) ;
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698