fixes delete key binding to be routed thru e4 framework
This commit is contained in:
1 parent
336aef269d
commit
000578d72a
6 files changed
+58
-16
No files matched your search
@@ -5,5 +5,9 @@ Bundle-SymbolicName: com.minres.scviewer.e4.application.test
|
||||
Bundle-Version: 2.20.0
|
||||
Fragment-Host: com.minres.scviewer.e4.application
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-17
|
||||
Require-Bundle: org.junit
|
||||
Require-Bundle: org.eclipse.equinox.http.jetty,
|
||||
org.eclipse.equinox.http.registry,
|
||||
org.eclipse.equinox.jsp.jasper.registry,
|
||||
org.eclipse.jdt.core,
|
||||
org.junit
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
<version>${tycho-version}</version>
|
||||
<configuration>
|
||||
<useUIHarness>false</useUIHarness>
|
||||
<bundleStartLevel>
|
||||
<bundle><id>org.eclipse.equinox.http.registry</id><level>4</level><autoStart>true</autoStart></bundle>
|
||||
<bundle><id>org.eclipse.equinox.jsp.jasper.registry</id><level>4</level><autoStart>true</autoStart></bundle>
|
||||
</bundleStartLevel>
|
||||
<useUIThread>false</useUIThread>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.minres.scviewer.e4.application.handlers;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class HelpServerTest {
|
||||
@Test
|
||||
public void helpIndexCompilesAndLoads() throws Exception {
|
||||
org.eclipse.help.internal.base.BaseHelpSystem.ensureWebappRunning();
|
||||
String url = "http://" + org.eclipse.help.internal.server.WebappManager.getHost()
|
||||
+ ":" + org.eclipse.help.internal.server.WebappManager.getPort() + "/help/index.jsp";
|
||||
java.net.HttpURLConnection connection = (java.net.HttpURLConnection) new java.net.URL(url).openConnection();
|
||||
connection.setConnectTimeout(10000); connection.setReadTimeout(10000);
|
||||
int status = connection.getResponseCode();
|
||||
var input = status >= 400 ? connection.getErrorStream() : connection.getInputStream();
|
||||
String body;
|
||||
try (input) { body = new String(input.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8); }
|
||||
finally { connection.disconnect(); }
|
||||
|
||||
assertEquals(body, 200, status);
|
||||
assertTrue(body.contains("<html"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user