Changeset 198978 in webkit


Ignore:
Timestamp:
Apr 2, 2016 6:22:25 PM (8 years ago)
Author:
gskachkov@gmail.com
Message:

[ES6] Arrow function syntax. Add missed test for using 'with' and 'this' in arrow function.
https://bugs.webkit.org/show_bug.cgi?id=156059

Reviewed by Saam Barati.

Added test case that cover using 'with' with lexically bound 'this' in arrow function, this case was not
covered by tests for arrow function.

  • js/arrowfunction-lexical-bind-this-expected.txt:
  • js/script-tests/arrowfunction-lexical-bind-this.js:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r198971 r198978  
     12016-04-02  Skachkov Oleksandr  <gskachkov@gmail.com>
     2
     3        [ES6] Arrow function syntax. Add missed test for using 'with' and 'this' in arrow function.
     4        https://bugs.webkit.org/show_bug.cgi?id=156059
     5
     6        Reviewed by Saam Barati.
     7
     8        Added test case that cover using 'with' with lexically bound 'this' in arrow function, this case was not
     9        covered by tests for arrow function.       
     10
     11        * js/arrowfunction-lexical-bind-this-expected.txt:
     12        * js/script-tests/arrowfunction-lexical-bind-this.js:
     13
    1142016-04-02  David Kilzer  <ddkilzer@apple.com>
    215
  • trunk/LayoutTests/js/arrowfunction-lexical-bind-this-expected.txt

    r194340 r198978  
    2020PASS fooObject.arr() is internal_value_1
    2121PASS fooObject._id is internal_value_2
     22PASS boo.call(o1) is o1
    2223PASS successfullyParsed is true
    2324
  • trunk/LayoutTests/js/script-tests/arrowfunction-lexical-bind-this.js

    r194340 r198978  
    9999shouldBe("fooObject._id", 'internal_value_2');
    100100
     101function boo() {
     102    let arr = () => {
     103        with ({'this': 40}) {
     104            return this;
     105        }
     106    }
     107    return arr();
     108}
     109
     110let o1 = {'this': 20};
     111
     112shouldBe('boo.call(o1)', 'o1');
     113
    101114var successfullyParsed = true;
Note: See TracChangeset for help on using the changeset viewer.