Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / script-tests / post-inc-assign-overwrites.js
blobdb9af61f99241eb51900ce0cb937e68569fb8801
1 description(
2 'Test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=91270">'
3 );
5 function postIncDotAssignToBase()
7 var obj = { property: 0 };
8 var base = obj;
10 base = base.property++;
12 return obj.property === 1;
15 function postIncBracketAssignToBase()
17 var obj = { property: 0 };
18 var base = obj;
19 var subscript = "property";
21 base = base[subscript]++;
23 return obj.property === 1;
26 function postIncBracketAssignToSubscript()
28 var obj = { property: 0 };
29 var base = obj;
30 var subscript = "property";
32 subscript = base[subscript]++;
34 return obj.property === 1;
37 shouldBeTrue('postIncDotAssignToBase()');
38 shouldBeTrue('postIncBracketAssignToBase()');
39 shouldBeTrue('postIncBracketAssignToSubscript()');
41 successfullyParsed = true;