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

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

Issue 8773037: Fix flaky debugger test (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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 | « no previous file | 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 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 6851 matching lines...) Expand 10 before | Expand all | Expand 10 after
6862 // Set the debug break flag before calling the code using function.apply. 6862 // Set the debug break flag before calling the code using function.apply.
6863 v8::Debug::DebugBreak(); 6863 v8::Debug::DebugBreak();
6864 6864
6865 // Limit the number of debug breaks. This is a regression test for issue 493 6865 // Limit the number of debug breaks. This is a regression test for issue 493
6866 // where this test would enter an infinite loop. 6866 // where this test would enter an infinite loop.
6867 break_point_hit_count = 0; 6867 break_point_hit_count = 0;
6868 max_break_point_hit_count = 10000; // 10000 => infinite loop. 6868 max_break_point_hit_count = 10000; // 10000 => infinite loop.
6869 foo->Call(env->Global(), 0, NULL); 6869 foo->Call(env->Global(), 0, NULL);
6870 6870
6871 // When keeping the debug break several break will happen. 6871 // When keeping the debug break several break will happen.
6872 CHECK_EQ(3, break_point_hit_count); 6872 CHECK(break_point_hit_count > 1);
6873 6873
6874 v8::Debug::SetDebugEventListener(NULL); 6874 v8::Debug::SetDebugEventListener(NULL);
6875 CheckDebuggerUnloaded(); 6875 CheckDebuggerUnloaded();
6876 } 6876 }
6877 6877
6878 6878
6879 v8::Handle<v8::Context> debugee_context; 6879 v8::Handle<v8::Context> debugee_context;
6880 v8::Handle<v8::Context> debugger_context; 6880 v8::Handle<v8::Context> debugger_context;
6881 6881
6882 6882
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
7286 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); 7286 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}");
7287 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); 7287 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}");
7288 7288
7289 // Get rid of the debug event listener. 7289 // Get rid of the debug event listener.
7290 v8::Debug::SetDebugEventListener(NULL); 7290 v8::Debug::SetDebugEventListener(NULL);
7291 CheckDebuggerUnloaded(); 7291 CheckDebuggerUnloaded();
7292 } 7292 }
7293 7293
7294 7294
7295 #endif // ENABLE_DEBUGGER_SUPPORT 7295 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698