@@ -32,6 +32,7 @@ public class WindowTest {
3232 private static final String DESKTOP_UUID = WindowTest .class .getName ();
3333 private static DesktopConnection desktopConnection ;
3434 private static final String child_window_url = "http://test.openf.in/test.html" ; // simple test app
35+ private static final String guest_url = "https://example.com" ;
3536
3637 @ BeforeClass
3738 public static void setup () throws Exception {
@@ -452,7 +453,7 @@ public void navigate() throws Exception {
452453 Application application = TestUtils .runApplication (options , desktopConnection );
453454 Window window = application .getWindow ();
454455 CountDownLatch latch = new CountDownLatch (1 );
455- window .navigate ("https://openfin.co" , new AckListener () {
456+ window .navigate (guest_url , new AckListener () {
456457 @ Override
457458 public void onSuccess (Ack ack ) {
458459 if (ack .isSuccessful ()) {
@@ -466,9 +467,9 @@ public void onError(Ack ack) {
466467
467468 latch .await (5 , TimeUnit .SECONDS );
468469 assertEquals ("Window.navigate timeout" , latch .getCount (), 0 );
469- Thread .sleep (1000 ); // give time for https://openfin.co to load
470+ Thread .sleep (1000 ); // give time for guest_url to load
470471 window .executeJavaScript ("location.href" , result -> {
471- if (result != null && result .toString ().equals ("https://openfin.co" )) {
472+ if (result != null && result .toString ().equals (guest_url )) {
472473 latch .countDown ();
473474 }
474475 }, null );
@@ -484,7 +485,7 @@ public void navigateBack() throws Exception {
484485 Application application = TestUtils .runApplication (options , desktopConnection );
485486 Window window = application .getWindow ();
486487 CountDownLatch latch = new CountDownLatch (1 );
487- window .navigate ("https://openfin.co" , new AckListener () {
488+ window .navigate (guest_url , new AckListener () {
488489 @ Override
489490 public void onSuccess (Ack ack ) {
490491 if (ack .isSuccessful ()) {
@@ -520,9 +521,9 @@ public void onError(Ack ack) {
520521
521522 latch .await (5 , TimeUnit .SECONDS );
522523 assertEquals ("Window.navigate timeout" , latch .getCount (), 0 );
523- Thread .sleep (1000 ); // give time for https://openfin.co to load
524+ Thread .sleep (1000 ); // give time for guest_url to load
524525 window .executeJavaScript ("location.href" , result -> {
525- if (result != null && result .toString ().equals ("https://openfin.co" )) {
526+ if (result != null && result .toString ().equals (guest_url )) {
526527 latch .countDown ();
527528 }
528529 }, null );
@@ -542,7 +543,7 @@ public void navigateForward() throws Exception {
542543 @ Override
543544 public void onSuccess (Ack ack ) {
544545 if (ack .isSuccessful ()) {
545- window .navigate ("https://openfin.co" , new AckListener () {
546+ window .navigate (guest_url , new AckListener () {
546547 @ Override
547548 public void onSuccess (Ack ack ) {
548549 if (ack .isSuccessful ()) {
@@ -582,9 +583,9 @@ public void onError(Ack ack) {
582583
583584 latch .await (5 , TimeUnit .SECONDS );
584585 assertEquals ("Window.navigate timeout" , latch .getCount (), 0 );
585- Thread .sleep (1000 ); // give time for https://openfin.co to load
586+ Thread .sleep (1000 ); // give time for guest_url to load
586587 window .executeJavaScript ("location.href" , result -> {
587- if (result != null && result .toString ().equals ("https://openfin.co" )) {
588+ if (result != null && result .toString ().equals (guest_url )) {
588589 latch .countDown ();
589590 }
590591 }, null );
@@ -600,7 +601,7 @@ public void stopNavigate() throws Exception {
600601 Application application = TestUtils .runApplication (options , desktopConnection );
601602 Window window = application .getWindow ();
602603 CountDownLatch latch = new CountDownLatch (1 );
603- window .navigate ("https://openfin.co" , new AckListener () {
604+ window .navigate (guest_url , new AckListener () {
604605 @ Override
605606 public void onSuccess (Ack ack ) {
606607 if (ack .isSuccessful ()) {
@@ -628,7 +629,7 @@ public void onError(Ack ack) {
628629 assertEquals ("Window.navigate timeout" , latch .getCount (), 0 );
629630 Thread .sleep (1000 );
630631 window .executeJavaScript ("location.href" , result -> {
631- if (result != null && result .toString ().equals ("https://openfin.co" )) {
632+ if (result != null && result .toString ().equals (guest_url )) {
632633 latch .countDown ();
633634 }
634635 }, null );
0 commit comments