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

Side by Side Diff: test/mjsunit/regress/regress-bind-receiver.js

Issue 7892013: Fix for .bind regression. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« src/execution.cc ('K') | « src/execution.cc ('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
(Empty)
1 function strict() { 'use strict'; return this; }
2 function lenient() { return this; }
3 var obj = {};
4
5 assertEquals(strict.bind(true)(), true);
Jakob Kummerow 2011/09/13 17:09:54 assertEquals takes the expected value as the first
rossberg 2011/09/13 17:14:00 Done. (Had C&P'ed this from Webkit.)
6 assertEquals(strict.bind(42)(), 42);
7 assertEquals(strict.bind("")(), "");
8 assertEquals(strict.bind(null)(), null);
9 assertEquals(strict.bind(undefined)(), undefined);
10 assertEquals(strict.bind(obj)(), obj);
11
12 assertEquals(lenient.bind(true)() instanceof Boolean, true);
13 assertEquals(lenient.bind(42)() instanceof Number, true);
14 assertEquals(lenient.bind("")() instanceof String, true);
15 assertEquals(lenient.bind(null)(), this);
16 assertEquals(lenient.bind(undefined)(), this);
17 assertEquals(lenient.bind(obj)(), obj);
18
OLDNEW
« src/execution.cc ('K') | « src/execution.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698