[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / js / named-function-expression-expected.txt
1 Bug 4698 - kjs does not allow named functions in function expressions.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 anonymous function expression
7 PASS var x = (function(a,b){ return a + b; }); x(1,2) is 3
8 named function expression
9 PASS var x = (function Named(a,b){ return a + b; }); x(2,3) is 5
10 eval'd code should be able to access scoped variables
11 PASS var z = 6; var x = eval('(function(a,b){ return a + b + z; })'); x(3,4) is 13
12 eval'd code + self-check
13 PASS var z = 10; var x = eval('(function Named(a,b){ return (!!Named) ? (a + b + z) : -999; })'); x(4,5) is 19
14 named function expressions are not saved in the current context
15 PASS (function Foo(){ return 1; }); try { Foo(); throw "FuncExpr was stored"; } catch(e) { if(typeof(e)=="string") throw e; } 1 is 1
16 recursion is possible, though
17 PASS var ctr = 3; var x = (function Named(a,b){ if(--ctr) return 2 * Named(a,b); else return a + b; }); x(5,6) is 44
18 regression test where kjs regarded an anonymous function declaration (which is illegal) as a FunctionExpr
19 PASS var hadError = 0; try { eval("function(){ return 2; };"); } catch(e) { hadError = 1; }; hadError; is 1
20 PASS successfullyParsed is true
21
22 TEST COMPLETE
23