Skip to content

Commit 8845e70

Browse files
committed
Edge: correct URL to local resource in tests eclipse-platform#1670
The URL used for the `test_setUrl_Local()` browser test case currently only consists of a file path when provided via the `PLUGIN_PATH` environment variable, e.g., during I-Build test execution. Edge does, however, require a valid URL with an according protocol prefix. Currently, the drive prefix of the file path is erroneously treated as the protocol. This change properly converts the path to a URL. Fixes eclipse-platform#1670
1 parent 49fd6b0 commit 8845e70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ private String getValidUrl() {
762762
testLogAppend("PLUGIN_PATH: " + pluginPath);
763763
// When test is run via Ant, URL needs to be acquired differently. In that case the PLUGIN_PATH property is set and used.
764764
if (pluginPath != null) {
765-
return pluginPath + "/data/testWebsiteWithTitle.html";
765+
return Path.of(pluginPath, "data/testWebsiteWithTitle.html").toUri().toString();
766766
} else {
767767
// used when ran from Eclipse gui.
768768
return Test_org_eclipse_swt_browser_Browser.class.getClassLoader().getResource("testWebsiteWithTitle.html").toString();

0 commit comments

Comments
 (0)