diff options
author | Mickael Istria | 2018-03-14 16:42:47 +0000 |
---|---|---|
committer | Mickael Istria | 2018-03-14 16:42:47 +0000 |
commit | 712b897f6cb221dc13a1d9e71ff0fedae4f7fdf1 (patch) | |
tree | 4ca94ffa225eeed3cd8f45cd626b6883feb4648d /tests | |
parent | 2ef119e594da0ed9e93c88f3b32b03e82863870c (diff) | |
download | eclipse.platform.swt-712b897f6cb221dc13a1d9e71ff0fedae4f7fdf1.tar.gz eclipse.platform.swt-712b897f6cb221dc13a1d9e71ff0fedae4f7fdf1.tar.xz eclipse.platform.swt-712b897f6cb221dc13a1d9e71ff0fedae4f7fdf1.zip |
Revert "Bug 532173 - [StyledText] Wrong caret bounds with variable height"
This reverts commit 2ef119e594da0ed9e93c88f3b32b03e82863870c.
Change-Id: Ida4a0312d3a46498cff147982463ee933a508e80
Diffstat (limited to 'tests')
-rw-r--r-- | tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java index 7ed2c0c66c..c5fceeec25 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java @@ -48,7 +48,6 @@ import org.eclipse.swt.events.VerifyListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.graphics.GlyphMetrics; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.graphics.Rectangle; @@ -4888,44 +4887,6 @@ public void test_clickUpdatesCaretPosition() { } @Test -public void test_caretSizeAndPositionVariableGlyphMetrics() { - text.setText("abcd"); - text.setMargins(2, 0, 0, 0); // keep leftMargin as it affects behavior - text.setLineSpacing(0); - StyleRange range = new StyleRange(2, 1, null, null); - range.metrics = new GlyphMetrics(100, 0, 10); - text.setStyleRange(range); - text.setCaretOffset(0); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - // +5: caret takes 5 more pixels - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); - text.setCaretOffset(1); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); - text.setCaretOffset(2); - assertEquals(text.getLineHeight(0), text.getCaret().getSize().y); - assertEquals(0, text.getCaret().getBounds().y); - text.setCaretOffset(3); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); - text.setCaretOffset(4); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); - text.setCaretOffset(3); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); - text.setCaretOffset(2); - assertEquals(text.getLineHeight(0), text.getCaret().getSize().y); - assertEquals(0, text.getCaret().getBounds().y); - text.setCaretOffset(1); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); - text.setCaretOffset(0); - assertEquals(text.getLineHeight(), text.getCaret().getSize().y); - assertEquals(text.getLineHeight(0) - text.getCaret().getSize().y, text.getCaret().getBounds().y); -} - -@Test public void test_doubleClickSelectsWord() { text.setText("Test1 Test2"); |