Skip to content

Commit 2a18432

Browse files
committed
Add some debug output
1 parent 6c42431 commit 2a18432

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ void setupBrowser(int hr, long pv) {
596596
error(SWT.ERROR_THREAD_INVALID_ACCESS, hr);
597597
break;
598598
default:
599+
System.err.println("WebView instantiation failed with result: " + hr);
599600
containingEnvironment.instances().remove(this);
600601
error(SWT.ERROR_NO_HANDLES, hr);
601602
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ public void test_LocationListener_LocationListener_ordered_changing () {
740740
String url = getValidUrl();
741741
browser.setUrl(url);
742742
waitForPassCondition(() -> locations.size() == 2);
743-
assertTrue("Change of locations do not fire in order.", locations.get(0).equals("about:blank") && locations.get(1).contains("testWebsiteWithTitle.html"));
743+
assertTrue("Change of locations do not fire in order: " + locations.toString(), locations.get(0).equals("about:blank") && locations.get(1).contains("testWebsiteWithTitle.html"));
744744
}
745745

746746
private String getValidUrl() {
@@ -1940,6 +1940,7 @@ public void test_evaluate_null() {
19401940
// Boolen only used as dummy placeholder so the object is not null.
19411941
final AtomicReference<Object> returnValue = new AtomicReference<>(true);
19421942
browser.addProgressListener(completedAdapter(event -> {
1943+
returnValue.set(false);
19431944
Object evalResult = browser.evaluate("return null");
19441945
returnValue.set(evalResult);
19451946
if (debug_verbose_output)
@@ -1949,7 +1950,7 @@ public void test_evaluate_null() {
19491950
browser.setText("<html><body>HelloWorld</body></html>");
19501951
shell.open();
19511952
boolean passed = waitForPassCondition(() -> returnValue.get() == null);
1952-
assertTrue("Evaluate did not return a null. Timed out.", passed);
1953+
assertTrue("Evaluate did not return a null (current value: " + returnValue.get() + "). Timed out.", passed);
19531954
}
19541955

19551956
/**

0 commit comments

Comments
 (0)