Package com.google.collide.client.document.linedimensions.LineDimensionsCalculatorTests

Examples of com.google.collide.client.document.linedimensions.LineDimensionsCalculatorTests.TestMeasurementProvider


    assertFalse(LineDimensionsUtils.needsOffset(line.getNextLine()));
  }

  public void testInsertionSpecialMultilineAtTheEndOfLine() {
    Document doc = Document.createFromString("\t123");
    LineDimensionsCalculator.createWithCustomProvider(new TestMeasurementProvider(0))
        .handleDocumentChange(doc);
    Line line = doc.getFirstLine();
    assertFalse(LineDimensionsUtils.needsOffset(line));
    doc.insertText(line, 0, 4, "一二三\n\tText");
    assertTrue(LineDimensionsUtils.needsOffset(line));
View Full Code Here


    assertFalse(LineDimensionsUtils.needsOffset(line.getNextLine()));
  }

  public void testInsertionThatMakesNextLineSpecial() {
    Document doc = Document.createFromString("\t123");
    LineDimensionsCalculator.createWithCustomProvider(new TestMeasurementProvider(0))
        .handleDocumentChange(doc);
    Line line = doc.getFirstLine();
    assertFalse(LineDimensionsUtils.needsOffset(line));
    doc.insertText(line, 0, 1, "一二三\n \t");
    assertTrue(LineDimensionsUtils.needsOffset(line));
View Full Code Here

    assertTrue(LineDimensionsUtils.needsOffset(line.getNextLine()));
  }

  public void testInsertionOfLineBreakAtTheEndOfLastLine() {
    Document doc = Document.createFromString("\t123");
    LineDimensionsCalculator.createWithCustomProvider(new TestMeasurementProvider(0))
        .handleDocumentChange(doc);
    Line line = doc.getFirstLine();
    assertFalse(LineDimensionsUtils.needsOffset(line));
    doc.insertText(line, 0, 4, "\n");
    assertFalse(LineDimensionsUtils.needsOffset(line));
View Full Code Here

    assertFalse(LineDimensionsUtils.needsOffset(line.getNextLine()));
  }

  public void testInsertionOfLineBreakAtTheEndOfLine() {
    Document doc = Document.createFromString("\t123\n456");
    LineDimensionsCalculator.createWithCustomProvider(new TestMeasurementProvider(0))
        .handleDocumentChange(doc);
    Line line = doc.getFirstLine();
    assertFalse(LineDimensionsUtils.needsOffset(line));
    doc.insertText(line, 0, 4, "\n");
    assertFalse(LineDimensionsUtils.needsOffset(line));
View Full Code Here

TOP

Related Classes of com.google.collide.client.document.linedimensions.LineDimensionsCalculatorTests.TestMeasurementProvider

Copyright © 2018 www.massapicom. 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.