Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1451)

Side by Side Diff: test/webkit/class-syntax-super-expected.txt

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/webkit/class-syntax-super.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Tests for ES6 class syntax "super" 1 Tests for ES6 class syntax "super"
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 PASS (new Base) instanceof Base is true 6 PASS (new Base) instanceof Base is true
7 PASS (new Derived) instanceof Derived is true 7 PASS (new Derived) instanceof Derived is true
8 PASS (new Derived).callBaseMethod() is baseMethodValue 8 PASS (new Derived).callBaseMethod() is baseMethodValue
9 PASS x = (new Derived).callBaseMethod; x() is baseMethodValue 9 PASS x = (new Derived).callBaseMethod; x() is baseMethodValue
10 PASS (new Derived).callBaseMethodInGetter is baseMethodValue 10 PASS (new Derived).callBaseMethodInGetter is baseMethodValue
(...skipping 11 matching lines...) Expand all
22 PASS (new x).method2() threw exception ReferenceError: Unsupported reference to 'super'. 22 PASS (new x).method2() threw exception ReferenceError: Unsupported reference to 'super'.
23 PASS new (class { constructor() { return undefined; } }) instanceof Object is tr ue 23 PASS new (class { constructor() { return undefined; } }) instanceof Object is tr ue
24 PASS new (class { constructor() { return 1; } }) instanceof Object is true 24 PASS new (class { constructor() { return 1; } }) instanceof Object is true
25 PASS new (class extends Base { constructor() { return undefined } }) threw excep tion ReferenceError: this is not defined. 25 PASS new (class extends Base { constructor() { return undefined } }) threw excep tion ReferenceError: this is not defined.
26 PASS new (class extends Base { constructor() { super(); return undefined } }) in stanceof Object is true 26 PASS new (class extends Base { constructor() { super(); return undefined } }) in stanceof Object is true
27 PASS x = { }; new (class extends Base { constructor() { return x } }); is x 27 PASS x = { }; new (class extends Base { constructor() { return x } }); is x
28 PASS x instanceof Base is false 28 PASS x instanceof Base is false
29 PASS new (class extends Base { constructor() { } }) threw exception ReferenceErr or: this is not defined. 29 PASS new (class extends Base { constructor() { } }) threw exception ReferenceErr or: this is not defined.
30 PASS new (class extends Base { constructor() { return 1; } }) threw exception Ty peError: Derived constructors may only return object or undefined. 30 PASS new (class extends Base { constructor() { return 1; } }) threw exception Ty peError: Derived constructors may only return object or undefined.
31 PASS new (class extends null { constructor() { return undefined } }) threw excep tion ReferenceError: this is not defined. 31 PASS new (class extends null { constructor() { return undefined } }) threw excep tion ReferenceError: this is not defined.
32 PASS new (class extends null { constructor() { super(); return undefined } }) th rew exception TypeError: super is not a constructor. 32 PASS new (class extends null { constructor() { super(); return undefined } }) th rew exception TypeError: Super constructor null of anonymous class is not a cons tructor.
33 PASS x = { }; new (class extends null { constructor() { return x } }); is x 33 PASS x = { }; new (class extends null { constructor() { return x } }); is x
34 PASS x instanceof Object is true 34 PASS x instanceof Object is true
35 PASS new (class extends null { constructor() { } }) threw exception ReferenceErr or: this is not defined. 35 PASS new (class extends null { constructor() { } }) threw exception ReferenceErr or: this is not defined.
36 PASS new (class extends null { constructor() { return 1; } }) threw exception Ty peError: Derived constructors may only return object or undefined. 36 PASS new (class extends null { constructor() { return 1; } }) threw exception Ty peError: Derived constructors may only return object or undefined.
37 PASS new (class extends null { constructor() { super() } }) threw exception Type Error: super is not a constructor. 37 PASS new (class extends null { constructor() { super() } }) threw exception Type Error: Super constructor null of anonymous class is not a constructor.
38 PASS new (class { constructor() { super() } }) threw exception SyntaxError: 'sup er' keyword unexpected here. 38 PASS new (class { constructor() { super() } }) threw exception SyntaxError: 'sup er' keyword unexpected here.
39 PASS function x() { super(); } threw exception SyntaxError: 'super' keyword unex pected here. 39 PASS function x() { super(); } threw exception SyntaxError: 'super' keyword unex pected here.
40 PASS new (class extends Object { constructor() { function x() { super() } } }) t hrew exception SyntaxError: 'super' keyword unexpected here. 40 PASS new (class extends Object { constructor() { function x() { super() } } }) t hrew exception SyntaxError: 'super' keyword unexpected here.
41 PASS new (class extends Object { constructor() { function x() { super.method } } }) threw exception SyntaxError: 'super' keyword unexpected here. 41 PASS new (class extends Object { constructor() { function x() { super.method } } }) threw exception SyntaxError: 'super' keyword unexpected here.
42 PASS function x() { super.method(); } threw exception SyntaxError: 'super' keywo rd unexpected here. 42 PASS function x() { super.method(); } threw exception SyntaxError: 'super' keywo rd unexpected here.
43 PASS function x() { super(); } threw exception SyntaxError: 'super' keyword unex pected here. 43 PASS function x() { super(); } threw exception SyntaxError: 'super' keyword unex pected here.
44 PASS successfullyParsed is true 44 PASS successfullyParsed is true
45 45
46 TEST COMPLETE 46 TEST COMPLETE
OLDNEW
« no previous file with comments | « test/webkit/class-syntax-super.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698