Examples of BreakpointInfoImpl


Examples of com.google.collide.client.code.debugging.DebuggerState.BreakpointInfoImpl

  public void testSetBreakpointWhenNotActive() {
    Breakpoint breakpoint = createBreakpoint();
    debuggerState.setBreakpoint(breakpoint);

    BreakpointInfoImpl breakpointInfo = debuggerState.findBreakpointInfo(breakpoint);
    assertNull(breakpointInfo);

    debuggerState.removeBreakpoint(breakpoint);
    assertFlags(false, false);
  }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerState.BreakpointInfoImpl

    doSetBreakpoint();
  }

  public void testRemoveBreakpoint() {
    doRunDebugger();
    BreakpointInfoImpl breakpointInfo = doSetBreakpoint();
    doRemoveBreakpoint(breakpointInfo.getBreakpoint());
  }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerState.BreakpointInfoImpl

    doRemoveBreakpoint(breakpointInfo.getBreakpoint());
  }

  public void testUpdateBreakpoint() {
    doRunDebugger();
    BreakpointInfoImpl breakpointInfo = doSetBreakpoint();

    JsonArray<Location> locations = JsonCollections.createArray();
    final Location location1 = createLocation(1, 10, "source_id_1");
    final Location location2 = createLocation(2, 20, "source_id_2");
    locations.add(location1);
    locations.add(location2);
    debuggerApiStub.dispatchOnBreakpointResolvedEvent(SESSION_ID, breakpointInfo, locations);

    assertEquals(2, breakpointInfo.getLocations().size());
    assertEquals(location1, breakpointInfo.getLocations().get(0));
    assertEquals(location2, breakpointInfo.getLocations().get(1));

    // Update with no breakpointInfo.
    locations = JsonCollections.createArray();
    final Location location3 = createLocation(3, 30, "source_id_3");
    locations.add(location3);
    debuggerApiStub.dispatchOnBreakpointResolvedEvent(SESSION_ID, null,
        breakpointInfo.getBreakpointId(), locations);

    assertEquals(3, breakpointInfo.getLocations().size());
    assertEquals(location3, breakpointInfo.getLocations().get(2));
  }
View Full Code Here

Examples of com.google.collide.client.code.debugging.DebuggerState.BreakpointInfoImpl

  private BreakpointInfoImpl doSetBreakpoint() {
    Breakpoint breakpoint = createBreakpoint();
    debuggerState.setBreakpoint(breakpoint);

    BreakpointInfoImpl breakpointInfo = debuggerState.findBreakpointInfo(breakpoint);
    assertNotNull(breakpointInfo);
    assertEquals(breakpoint, breakpointInfo.getBreakpoint());
    assertNotNull(breakpointInfo.getBreakpointId());
    assertEquals(BREAKPOINT_LINE_NUMBER, breakpointInfo.getLineNumber());
    assertEquals(BREAKPOINT_CONDITION, breakpointInfo.getCondition());
    assertEquals(0, breakpointInfo.getLocations().size());

    String url = breakpointInfo.getUrl();
    String urlRegex = breakpointInfo.getUrlRegex();

    if (url != null) {
      assertNull(urlRegex);
      assertEquals(BASE_URI + applicationPath.getPathString(), breakpointInfo.getUrl());
    } else {
      assertNotNull(urlRegex);
      assertTrue(RegExp.compile(urlRegex).test(BASE_URI + applicationPath.getPathString()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.