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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/js/script-tests/inc-const-valueOf.js

Issue 1815833002: Rebaseline, fix, or remove various tests dealing with V8 behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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
OLDNEW
(Empty)
1 description(
2 'Test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=95 815">'
3 );
4
5 function testPostIncConstVarWithIgnoredResult()
6 {
7 var okay = false;
8 const a = {
9 valueOf: (function(){
10 okay = true;
11 })
12 };
13
14 a++;
15
16 return okay;
17 }
18
19 function testPreIncConstVarWithIgnoredResult()
20 {
21 var okay = false;
22 const a = {
23 valueOf: (function(){
24 okay = true;
25 })
26 };
27
28 ++a;
29
30 return okay;
31 }
32
33 function testPreIncConstVarWithAssign()
34 {
35 var okay = false;
36 var x = 42;
37 const a = {
38 valueOf: (function(){
39 throw x == 42;
40 })
41 };
42
43 try {
44 x = ++a;
45 } catch (e) {
46 okay = e
47 };
48
49 return okay;
50 }
51
52 shouldBeTrue('testPostIncConstVarWithIgnoredResult()');
53 shouldBeTrue('testPreIncConstVarWithIgnoredResult()');
54 shouldBeTrue('testPreIncConstVarWithAssign()');
55
56 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698