Closed Bug 313899 Opened 20 years ago Closed 20 years ago

history.forward() fails

Categories

(Rhino Graveyard :: E4X, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: srikanth.mohan, Assigned: igor)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 I am using Rhino for my jWebUnit testing. I found a problem while using javascript:window.history.forward(1); Following error is thrown, when rhino executes history.forward(); javascript:window.history.forward(1); failed: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "forward" of undefined (httpunit#1) (httpunit#3) at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException(JavaScript.java:202) Does Rhino support history objects? Reproducible: Always Actual Results: javascript:window.history.forward(1); //' failed: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "forward" of undefined (httpunit#1) (httpunit#3) at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException(JavaScript.java:202) at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.evaluateScriptExpression(JavaScript.java:189) at com.meterware.httpunit.scripting.ScriptableDelegate.evaluateExpression(ScriptableDelegate.java:74) at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:167) at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128) at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121) at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:110) at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:253) at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:232) at com.meterware.httpunit.WebLink.click(WebLink.java:98) at net.sourceforge.jwebunit.HttpUnitDialog.submitRequest(HttpUnitDialog.java:573) at net.sourceforge.jwebunit.HttpUnitDialog.clickLinkWithText(HttpUnitDialog.java:655) at net.sourceforge.jwebunit.WebTester.clickLinkWithText(WebTester.java:885) at net.sourceforge.jwebunit.WebTestCase.clickLinkWithText(WebTestCase.java:359) Expected Results: Rhino not to throw exceptions Executing history.forward() outside the browser environment, wont have access to history objects which are browsers specific. In this case, rhino can go soft and should not throw exception. Throwing exceptions causes, test cases to fail. It should ignore processing on history objects which are browser specific objects not available in the testing environment.
This isn't a Rhino bug. Please check in either httpunit or jWebUnit forums, or file a bug with whichever of those projects are to blame. Rhino doesn't implement window, let alone window.history, so obviously it doesn't implement window.history.forward().
Resoving as invalid per above.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.