Hi All,
I have still not been able to pinpoint what's the problem. But when we submit a form and that we are doing javascript.
<form onsubmit="test(this)"/>
Look like the javascript is not able to interpret the this ?!? as a form ?
I have a big stackTrace error.
In JavaScripEngine --> callFunction
In the function getSourceCode:
cx.decompileFunction(function, 2);
This return :
function () {
[native code, arity=0]
}
I also join 2 unit test that failed.
One direct, one with a redirection. ( We need to make sure that both are working correctly).
FYI : This is a major issue for us. We get 25% of our test not working anymore because of that.
We get that since 1.10. ( We live with 1.9 until now but we really want to move on 1.11.)
This seem to be related to bug#1627983.
Let me know if you need more information.
thanks,
anthony
2 Testcase that currently fail.
Logged In: YES
user_id=402164
Originator: NO
You have this problem with 1.10? Can you try with the latest source from SVN? Major changes have been made in js since last release.
Logged In: YES
user_id=1371534
Originator: YES
Hi Marc,
I send that using reply.
Sorry :-)
So we get that error with 1.11 ( trunk version )
Can you try to run the 2 units case I have send you ?
anthony
Logged In: YES
user_id=1371534
Originator: YES
Hi marc,
Sorry I did make a mistake in my unit test.
here's the new and good version (that still failed with the clean trunk )
Thanks for your help!
anthony
Logged In: YES
user_id=950730
Originator: NO
The exception seems to come only from:
alert(eval('f.element.value'));
Logged In: YES
user_id=950730
Originator: NO
Attached is a 'SimpleEvalBug' test case.
I am not sure if this is a Rhino bug or not.
File Added: SimpleEvalBug.java
Simple test case
Logged In: YES
user_id=402164
Originator: NO
seems to be related to the way event code execution is started because unit test com.gargoylesoftware.htmlunit.javascript.host.Window#testEvalScopeLocal (probably from you as it is already cooked with patate) already works.
Logged In: YES
user_id=1371534
Originator: YES
Well, I just inspire my unit test from that test :-)
But the fact is that this fail.
Do you can think a way to resolve that ?
Is it a Rhino problem or a HtmlUnit problem ?
thanks again!
Logged In: YES
user_id=402164
Originator: NO
I think that this is an HtmlUnit problem. I guess that we use the wrong scope or something like that when evaluating the handler.
Logged In: YES
user_id=950730
Originator: NO
Well, the difference is:
alert(f.tagName);
uses scope of NativeCall that finds 'f'
while:
alert(eval('f.tagName'));
uses Window scope (see Window.custom_eval)
Any idea how to get the NativeCall scope in custom_eval()?
Logged In: YES
user_id=402164
Originator: NO
Seems to be fixed: SimpleEvalBug.java works with current SVN state. I can imagine that this is a side effect of Daniel's last changes.
@Ahmed:
in such a case, please add the unit test as notYetImplemented(), this allows to directly detect when a bug gets fixed as side effect of other changes.