Community
Participate
Working Groups
As per: Bug 505591 – Add test cases for Browser.evaluate() to browser test suite. https://bugs.eclipse.org/bugs/show_bug.cgi?id=505591 Disabling the newly added test on Win32 because fixing requires longer investigation and is not that important for now. Someday it wouldn't hurt to fix this issue thou. > Leo Ufimtsev: > It appears newly added test_evaluate_invalid_return_value fails on Win32. > ... > I'm refering to Javadoc of Browser.evaluate(): > > * An <code>SWTException</code> is thrown if the return value has an > * unsupported type, or if evaluating the script causes a javascript > * error to be thrown. > > The following exceptions are thrown by this method: > - ERROR_FAILED_EVALUATE when the script evaluation causes a javascript error to be thrown > - ERROR_INVALID_RETURN_VALUE when the script returns a value of unsupported type > > Only the following are supported: > > - javascript null or undefined -> null > - javascript number -> jDouble > - javascript string -> jString > - javascript boolean -> Boolean > - javascript array whose elements are all of supported types > > A new Date() is an unsupported type, unless I'm mistaken somewhere, it follows that the call should be throwing an SWTException. > > In general, I found that there is some inconsistency in this. Webkit1 returns ERROR_FAILED_EVALUATE instead of ERROR_INVALID_RETURN_VALUE. I don't know for sure what Cocoa does. > Niraj: > Yes, can notice similar inconsistency between various versions of Mozilla XULRunner on Windows. This particular test-case passes only with XULRunner10 where-as with Mozilla XULRunner24 and XULRunner31 it's fails with below stack-trance on Win7: > java.lang.IllegalArgumentException: Argument not valid > at org.eclipse.swt.SWT.error(SWT.java:4514) > at org.eclipse.swt.SWT.error(SWT.java:4448) > at org.eclipse.swt.SWT.error(SWT.java:4419) > at org.eclipse.swt.browser.External.convertToJava(External.java:304) > at org.eclipse.swt.browser.Mozilla.evaluateInWindow(Mozilla.java:1479) > at org.eclipse.swt.browser.Mozilla.evaluate(Mozilla.java:1394) > at org.eclipse.swt.browser.Browser.evaluate(Browser.java:663) > at org.eclipse.swt.browser.Browser.evaluate(Browser.java:610) > at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser$15.completed(Test_org_eclipse_swt_browser_Browser.java:871)
New Gerrit change created: https://git.eclipse.org/r/85789
Gerrit change https://git.eclipse.org/r/85789 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8c41bddf04fb4b5fc35ed6485089bcaa03693417
(In reply to Eclipse Genie from comment #2) > Gerrit change https://git.eclipse.org/r/85789 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=8c41bddf04fb4b5fc35ed6485089bcaa03693417 Newly added test case dissabled on windows for now.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.