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

Side by Side Diff: test/cctest/test-debug.cc

Issue 7860035: Merge bleeding edge up to 9192 into the GC branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 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 | « test/cctest/test-compiler.cc ('k') | test/cctest/test-disasm-mips.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 int sbp2 = SetScriptBreakPointByNameFromJS("test.html", 1, -1); 2160 int sbp2 = SetScriptBreakPointByNameFromJS("test.html", 1, -1);
2161 int sbp3 = SetScriptBreakPointByNameFromJS("test.html", 5, -1); 2161 int sbp3 = SetScriptBreakPointByNameFromJS("test.html", 5, -1);
2162 2162
2163 // Compile the script and get the function. 2163 // Compile the script and get the function.
2164 break_point_hit_count = 0; 2164 break_point_hit_count = 0;
2165 v8::ScriptOrigin origin(v8::String::New("test.html"), v8::Integer::New(0)); 2165 v8::ScriptOrigin origin(v8::String::New("test.html"), v8::Integer::New(0));
2166 v8::Script::Compile(script, &origin)->Run(); 2166 v8::Script::Compile(script, &origin)->Run();
2167 f = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); 2167 f = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f")));
2168 g = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("g"))); 2168 g = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("g")));
2169 2169
2170 // Chesk that a break point was hit when the script was run. 2170 // Check that a break point was hit when the script was run.
2171 CHECK_EQ(1, break_point_hit_count); 2171 CHECK_EQ(1, break_point_hit_count);
2172 CHECK_EQ(0, StrLength(last_function_hit)); 2172 CHECK_EQ(0, StrLength(last_function_hit));
2173 2173
2174 // Call f and check that the script break point. 2174 // Call f and check that the script break point.
2175 f->Call(env->Global(), 0, NULL); 2175 f->Call(env->Global(), 0, NULL);
2176 CHECK_EQ(2, break_point_hit_count); 2176 CHECK_EQ(2, break_point_hit_count);
2177 CHECK_EQ("f", last_function_hit); 2177 CHECK_EQ("f", last_function_hit);
2178 2178
2179 // Call g and check that the script break point. 2179 // Call g and check that the script break point.
2180 g->Call(env->Global(), 0, NULL); 2180 g->Call(env->Global(), 0, NULL);
(...skipping 5107 matching lines...) Expand 10 before | Expand all | Expand 10 after
7288 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); 7288 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}");
7289 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); 7289 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}");
7290 7290
7291 // Get rid of the debug event listener. 7291 // Get rid of the debug event listener.
7292 v8::Debug::SetDebugEventListener(NULL); 7292 v8::Debug::SetDebugEventListener(NULL);
7293 CheckDebuggerUnloaded(); 7293 CheckDebuggerUnloaded();
7294 } 7294 }
7295 7295
7296 7296
7297 #endif // ENABLE_DEBUGGER_SUPPORT 7297 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-disasm-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698