git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-4235 JAL-3599 Try and report Eclipse Product Version for jalviewjsTranspile....
[jalview.git]
/
test
/
jalview
/
bin
/
HiDPISettingTest1.java
diff --git
a/test/jalview/bin/HiDPISettingTest1.java
b/test/jalview/bin/HiDPISettingTest1.java
index
137d3e1
..
49a721f
100644
(file)
--- a/
test/jalview/bin/HiDPISettingTest1.java
+++ b/
test/jalview/bin/HiDPISettingTest1.java
@@
-32,6
+32,7
@@
import jalview.gui.Desktop;
import jalview.gui.JvOptionPane;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
import jalview.gui.JvOptionPane;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.util.Platform;
/*
* Testing a HiDPI display is difficult without running in a HiDPI display.
/*
* Testing a HiDPI display is difficult without running in a HiDPI display.
@@
-84,7
+85,8
@@
public class HiDPISettingTest1
@AfterClass(alwaysRun = true)
public void tearDown()
{
@AfterClass(alwaysRun = true)
public void tearDown()
{
- Desktop.instance.closeAll_actionPerformed(null);
+ if (Desktop.instance != null)
+ Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" })
}
@Test(groups = { "Functional" })
@@
-107,20
+109,22
@@
public class HiDPISettingTest1
setMockScreen(1920, 1080, 96);
assertEquals(HiDPISetting.getScalePropertyArg(), null);
setMockScreen(1920, 1080, 96);
assertEquals(HiDPISetting.getScalePropertyArg(), null);
+ // currently HiDPISetting only operates for Linux
+
// 4K screen -- scale by 2
setMockScreen(3180, 2160, 80);
assertEquals(HiDPISetting.getScalePropertyArg(),
// 4K screen -- scale by 2
setMockScreen(3180, 2160, 80);
assertEquals(HiDPISetting.getScalePropertyArg(),
- "-D" + scalePropertyName + "=2");
+ Platform.isLinux() ? "-D" + scalePropertyName + "=2" : null);
// 4K screen with high dpi -- scale by 3
setMockScreen(3180, 2160, 450);
assertEquals(HiDPISetting.getScalePropertyArg(),
// 4K screen with high dpi -- scale by 3
setMockScreen(3180, 2160, 450);
assertEquals(HiDPISetting.getScalePropertyArg(),
- "-D" + scalePropertyName + "=3");
+ Platform.isLinux() ? "-D" + scalePropertyName + "=3" : null);
// stupidly big screen -- scale by 8
setMockScreen(19200, 10800, 72);
assertEquals(HiDPISetting.getScalePropertyArg(),
// stupidly big screen -- scale by 8
setMockScreen(19200, 10800, 72);
assertEquals(HiDPISetting.getScalePropertyArg(),
- "-D" + scalePropertyName + "=8");
+ Platform.isLinux() ? "-D" + scalePropertyName + "=8" : null);
}
}
}
}