summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/js/Promise-init-callback-receiver.html
blob: c5e9d5f76196f971cf9ca14ab81704db3e5141b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description('Test Promise.');

var receiverInSloppy;
new Promise(function () {
    window.receiverInSloppy = this;
    shouldBe('receiverInSloppy', 'window');
});

var receiverInStrict;
new Promise(function () {
    'use strict';
    window.receiverInStrict = this;
    shouldBe('receiverInStrict', 'undefined');
});

</script>
</body>
</html>