summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/js/Promise-then-without-callbacks.html
blob: 2389c3c79ef607c17572599e90d81e9cf86f677a (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
<!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.');

window.jsTestIsAsync = true;

new Promise(function(resolve) { resolve('hello'); })
  .then()
  .then(function(result) {
    window.result = result;
    shouldBeEqualToString('result', 'hello');
    finishJSTest();
  });

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