Skip to content

Commit 05dd087

Browse files
committed
Migrate Drag-and-Drop tests to JUnit 5 and provide basic DragOperations implementation
1 parent 6cf7b39 commit 05dd087

31 files changed

+83
-205
lines changed

tests/org.eclipse.ui.tests.performance/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Performance Plug-in
44
Bundle-SymbolicName: org.eclipse.ui.tests.performance;singleton:=true
5-
Bundle-Version: 1.6.600.qualifier
5+
Bundle-Version: 1.6.500.qualifier
66
Require-Bundle: org.eclipse.ui,
77
org.eclipse.core.runtime,
88
org.eclipse.core.tests.harness,

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/CollatorPerformanceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
import java.util.Comparator;
2020

2121
import org.eclipse.jface.util.Policy;
22-
import org.eclipse.test.performance.PerformanceTestCaseJunit4;
22+
import org.eclipse.ui.tests.performance.BasicPerformanceTest;
2323
import org.eclipse.ui.tests.performance.UIPerformanceTestRule;
2424
import org.junit.ClassRule;
2525
import org.junit.Test;
2626

2727
/**
2828
* @since 3.5
2929
*/
30-
public class CollatorPerformanceTest extends PerformanceTestCaseJunit4 {
30+
public class CollatorPerformanceTest extends BasicPerformanceTest {
3131

3232
@ClassRule
3333
public static final UIPerformanceTestRule uiPerformanceTestRule = new UIPerformanceTestRule();

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ComboViewerRefreshTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package org.eclipse.jface.tests.performance;
1616

1717
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
18-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1918

2019
import org.eclipse.jface.viewers.ComboViewer;
2120
import org.eclipse.jface.viewers.StructuredViewer;

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/FastTableViewerRefreshTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package org.eclipse.jface.tests.performance;
1515

1616
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
17-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1817

1918
import org.eclipse.swt.widgets.TableItem;
2019
import org.junit.Test;

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/FastTreeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package org.eclipse.jface.tests.performance;
1515

1616
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
17-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1817

1918
import java.util.ArrayList;
2019
import java.util.Collection;

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/FileImageDescriptorTest.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package org.eclipse.jface.tests.performance;
1616

1717
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
18-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1918

2019
import java.net.URL;
2120
import java.util.ArrayList;
@@ -26,9 +25,7 @@
2625
import org.eclipse.core.runtime.IPath;
2726
import org.eclipse.jface.resource.ImageDescriptor;
2827
import org.eclipse.swt.graphics.Image;
29-
import org.eclipse.test.performance.PerformanceTestCaseJunit4;
30-
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
31-
import org.junit.Rule;
28+
import org.eclipse.ui.tests.performance.BasicPerformanceTest;
3229
import org.junit.Test;
3330
import org.osgi.framework.Bundle;
3431
import org.osgi.framework.FrameworkUtil;
@@ -37,10 +34,7 @@
3734
* ComboViewerRefreshTest is a test of refreshes of difference size in the combo
3835
* viewer.
3936
*/
40-
public class FileImageDescriptorTest extends PerformanceTestCaseJunit4 {
41-
42-
@Rule
43-
public final CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();
37+
public class FileImageDescriptorTest extends BasicPerformanceTest {
4438

4539
protected static final String IMAGES_DIRECTORY = "/icons/imagetests";
4640

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ListPopulationTest.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,20 @@
1515
package org.eclipse.jface.tests.performance;
1616

1717
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
18-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1918

2019
import org.eclipse.swt.SWT;
2120
import org.eclipse.swt.layout.FillLayout;
2221
import org.eclipse.swt.widgets.Display;
2322
import org.eclipse.swt.widgets.List;
2423
import org.eclipse.swt.widgets.Shell;
25-
import org.eclipse.test.performance.PerformanceTestCaseJunit4;
26-
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
27-
import org.junit.Rule;
24+
import org.eclipse.ui.tests.performance.BasicPerformanceTest;
2825
import org.junit.Test;
2926

3027
/**
3128
* The ListPopulationTest is the test for simple
3229
* SWT lists.
3330
*/
34-
public class ListPopulationTest extends PerformanceTestCaseJunit4 {
35-
36-
@Rule
37-
public final CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();
31+
public class ListPopulationTest extends BasicPerformanceTest {
3832

3933
List list;
4034

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ListViewerRefreshTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package org.eclipse.jface.tests.performance;
1616

1717
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
18-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1918

2019
import org.eclipse.jface.viewers.ListViewer;
2120
import org.eclipse.jface.viewers.StructuredViewer;

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ProgressMonitorDialogPerformanceTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,19 @@
2020
import org.eclipse.jface.operation.IRunnableWithProgress;
2121
import org.eclipse.swt.widgets.Display;
2222
import org.eclipse.swt.widgets.Shell;
23-
import org.eclipse.test.performance.PerformanceTestCaseJunit4;
24-
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
23+
import org.eclipse.ui.tests.performance.BasicPerformanceTest;
2524
import org.eclipse.ui.tests.performance.UIPerformanceTestRule;
2625
import org.junit.ClassRule;
27-
import org.junit.Rule;
2826
import org.junit.Test;
2927

3028
/**
3129
* @since 3.3
3230
*/
33-
public class ProgressMonitorDialogPerformanceTest extends PerformanceTestCaseJunit4 {
31+
public class ProgressMonitorDialogPerformanceTest extends BasicPerformanceTest {
3432

3533
@ClassRule
3634
public static final UIPerformanceTestRule uiPerformanceTestRule = new UIPerformanceTestRule();
3735

38-
@Rule
39-
public final CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();
40-
4136
/**
4237
* Test the time for doing a refresh.
4338
*/

tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/SWTTreeTest.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package org.eclipse.jface.tests.performance;
1515

1616
import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents;
17-
import static org.eclipse.ui.tests.performance.UIPerformanceTestUtil.exercise;
1817

1918
import org.eclipse.core.runtime.CoreException;
2019
import org.eclipse.swt.SWT;
@@ -23,15 +22,10 @@
2322
import org.eclipse.swt.widgets.Shell;
2423
import org.eclipse.swt.widgets.Tree;
2524
import org.eclipse.swt.widgets.TreeItem;
26-
import org.eclipse.test.performance.PerformanceTestCaseJunit4;
27-
import org.eclipse.ui.tests.harness.util.CloseTestWindowsRule;
28-
import org.junit.Rule;
25+
import org.eclipse.ui.tests.performance.BasicPerformanceTest;
2926
import org.junit.Test;
3027

31-
public class SWTTreeTest extends PerformanceTestCaseJunit4 {
32-
33-
@Rule
34-
public final CloseTestWindowsRule closeTestWindows = new CloseTestWindowsRule();
28+
public class SWTTreeTest extends BasicPerformanceTest {
3529

3630
Shell browserShell;
3731

0 commit comments

Comments
 (0)