Skip to content

Commit

Permalink
Rewriting test for a script that returns recursive object to match W3…
Browse files Browse the repository at this point in the history
…C specification.
  • Loading branch information
barancev committed Dec 8, 2017
1 parent 96e46e6 commit e4ad062
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;
import static org.openqa.selenium.testing.Driver.ALL;
import static org.openqa.selenium.testing.Driver.CHROME;
import static org.openqa.selenium.testing.Driver.FIREFOX;
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
Expand Down Expand Up @@ -569,12 +568,11 @@ public void shouldHandleObjectThatThatHaveToJSONMethod() {
@Ignore(SAFARI)
@Ignore(value = FIREFOX, issue = "540")
@Ignore(HTMLUNIT)
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/914")
public void shouldHandleRecursiveStructures() {
driver.get(pages.simpleTestPage);

Object value = executeScript("var obj1 = {}; var obj2 = {}; obj1['obj2'] = obj2; obj2['obj1'] = obj1; return obj1");

assertTrue(value instanceof Map);
Throwable t = catchThrowable(() -> executeScript(
"var obj1 = {}; var obj2 = {}; obj1['obj2'] = obj2; obj2['obj1'] = obj1; return obj1"));
assertThat(t, instanceOf(JavascriptException.class));
}
}

0 comments on commit e4ad062

Please sign in to comment.