Skip to content

Commit e5ca0ad

Browse files
authored
Test failing on Mac - test_LocationListener_ProgressListener_cancledLoad (#470)
#103 Added OS check for Cocoa for the failing test
1 parent 2b4fb94 commit e5ca0ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,13 @@ public void changed(LocationEvent event) {
558558
// For stability, wait 1000 ms.
559559
waitForMilliseconds(1000);
560560

561-
boolean passed = locationChanging.get() && !unexpectedLocationChanged.get() && !unexpectedProgressCompleted.get();
561+
boolean passed = false;
562+
if (SwtTestUtil.isCocoa) {
563+
// On Cocoa, while setting html text, setting doit=false in location changing event doesn't cancel loading the text.
564+
passed = locationChanging.get();
565+
} else {
566+
passed = locationChanging.get() && !unexpectedLocationChanged.get() && !unexpectedProgressCompleted.get();
567+
}
562568
String errMsg = "\nUnexpected event fired. \n"
563569
+ "LocationChanging (should be true): " + locationChanging.get() + "\n"
564570
+ "LocationChanged unexpectedly (should be false): " + unexpectedLocationChanged.get() + "\n"

0 commit comments

Comments
 (0)