Skip to content

Commit e4ad062

Browse files
committed
Rewriting test for a script that returns recursive object to match W3C specification.
1 parent 96e46e6 commit e4ad062

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

java/client/test/org/openqa/selenium/ExecutingJavascriptTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import static org.junit.Assert.assertTrue;
3232
import static org.junit.Assert.fail;
3333
import static org.junit.Assume.assumeTrue;
34-
import static org.openqa.selenium.testing.Driver.ALL;
3534
import static org.openqa.selenium.testing.Driver.CHROME;
3635
import static org.openqa.selenium.testing.Driver.FIREFOX;
3736
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
@@ -569,12 +568,11 @@ public void shouldHandleObjectThatThatHaveToJSONMethod() {
569568
@Ignore(SAFARI)
570569
@Ignore(value = FIREFOX, issue = "540")
571570
@Ignore(HTMLUNIT)
572-
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/914")
573571
public void shouldHandleRecursiveStructures() {
574572
driver.get(pages.simpleTestPage);
575573

576-
Object value = executeScript("var obj1 = {}; var obj2 = {}; obj1['obj2'] = obj2; obj2['obj1'] = obj1; return obj1");
577-
578-
assertTrue(value instanceof Map);
574+
Throwable t = catchThrowable(() -> executeScript(
575+
"var obj1 = {}; var obj2 = {}; obj1['obj2'] = obj2; obj2['obj1'] = obj1; return obj1"));
576+
assertThat(t, instanceOf(JavascriptException.class));
579577
}
580578
}

0 commit comments

Comments
 (0)