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

Unified Diff: test/debugger/debug/debug-breakpoints.js

Issue 2497973002: [debug-wrapper] Further extend the debug wrapper (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/debugger/debug/debug-break-native.js ('k') | test/debugger/debug/debug-compile-event.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/debug/debug-breakpoints.js
diff --git a/test/mjsunit/debug-breakpoints.js b/test/debugger/debug/debug-breakpoints.js
similarity index 56%
rename from test/mjsunit/debug-breakpoints.js
rename to test/debugger/debug/debug-breakpoints.js
index c293eb313a42d73fac73c08565c22984ce7f44a0..4240e8f7629c11d21d1c1f2ac981cca8875072c2 100644
--- a/test/mjsunit/debug-breakpoints.js
+++ b/test/debugger/debug/debug-breakpoints.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-debug-as debug
-// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
Debug.setListener(function() {});
@@ -120,106 +118,3 @@ Debug.clearBreakPoint(bp3);
// b=2;
// }
assertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
-
-
-// Tests for setting break points by script id and position.
-function setBreakpointByPosition(f, position, opt_position_alignment)
-{
- var break_point = Debug.setBreakPointByScriptIdAndPosition(
- Debug.findScript(f).id,
- position + Debug.sourcePosition(f),
- "",
- true, opt_position_alignment);
- return break_point.number();
-}
-
-bp = setBreakpointByPosition(f, 0);
-assertEquals("() {[B0]a=1;b=2}", Debug.showBreakPoints(f));
-Debug.clearBreakPoint(bp);
-assertEquals("() {a=1;b=2}", Debug.showBreakPoints(f));
-bp1 = setBreakpointByPosition(f, 8);
-assertEquals("() {a=1;[B0]b=2}", Debug.showBreakPoints(f));
-bp2 = setBreakpointByPosition(f, 4);
-assertEquals("() {[B0]a=1;[B1]b=2}", Debug.showBreakPoints(f));
-bp3 = setBreakpointByPosition(f, 11);
-assertEquals("() {[B0]a=1;[B1]b=2[B2]}", Debug.showBreakPoints(f));
-Debug.clearBreakPoint(bp1);
-assertEquals("() {[B0]a=1;b=2[B1]}", Debug.showBreakPoints(f));
-Debug.clearBreakPoint(bp2);
-assertEquals("() {a=1;b=2[B0]}", Debug.showBreakPoints(f));
-Debug.clearBreakPoint(bp3);
-assertEquals("() {a=1;b=2}", Debug.showBreakPoints(f));
-
-bp = setBreakpointByPosition(g, 0);
-//function g() {
-//[B0]a=1;
-//b=2;
-//}
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
-Debug.clearBreakPoint(bp);
-//function g() {
-//a=1;
-//b=2;
-//}
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
-
-//Second test set and clear breakpoints on lines 1, 2 and 3 (column = 0).
-bp1 = setBreakpointByPosition(g, 12);
-//function g() {
-//a=1;
-//[B0]b=2;
-//}
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]b=2;") > 0);
-bp2 = setBreakpointByPosition(g, 5);
-//function g() {
-//[B0]a=1;
-//[B1]b=2;
-//}
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
-assertTrue(Debug.showBreakPoints(g).indexOf("[B1]b=2;") > 0);
-bp3 = setBreakpointByPosition(g, 19);
-//function g() {
-//[B0]a=1;
-//[B1]b=2;
-//}[B2]
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
-assertTrue(Debug.showBreakPoints(g).indexOf("[B1]b=2;") > 0);
-assertTrue(Debug.showBreakPoints(g).indexOf("[B2]}") > 0);
-Debug.clearBreakPoint(bp1);
-//function g() {
-//[B0]a=1;
-//b=2;
-//}[B1]
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
-assertTrue(Debug.showBreakPoints(g).indexOf("[B1]}") > 0);
-assertTrue(Debug.showBreakPoints(g).indexOf("[B2]") < 0);
-Debug.clearBreakPoint(bp2);
-//function g() {
-//a=1;
-//b=2;
-//}[B0]
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]}") > 0);
-assertTrue(Debug.showBreakPoints(g).indexOf("[B1]") < 0);
-Debug.clearBreakPoint(bp3);
-//function g() {
-//a=1;
-//b=2;
-//}
-assertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
-
-// Tests for setting break points without statement aligment.
-// (This may be sensitive to compiler break position map generation).
-function h() {a=f(f2(1,2),f3())+f3();b=f3();}
-var scenario = [
- [6, "{a=[B0]f("],
- [7, "{a=f([B0]f2("],
- [16, "f2(1,2),[B0]f3()"],
- [22, "+[B0]f3()"]
-];
-for(var i = 0; i < scenario.length; i++) {
- bp1 = setBreakpointByPosition(h, scenario[i][0],
- Debug.BreakPositionAlignment.BreakPosition);
- assertTrue(Debug.showBreakPoints(h, undefined,
- Debug.BreakPositionAlignment.BreakPosition).indexOf(scenario[i][1]) > 0);
- Debug.clearBreakPoint(bp1);
-}
« no previous file with comments | « test/debugger/debug/debug-break-native.js ('k') | test/debugger/debug/debug-compile-event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698