blob: 982f89c6e62f1cf2b90b6f15ce6f5a0e2c193cd9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description('Test Promise.');
window.jsTestIsAsync = true;
new Promise(function(resolve, reject) {
reject('foo');
resolve('resolve');
reject('reject');
}).then(function() {
testFailed('fulfilled');
finishJSTest();
}, function(result) {
window.result = result;
shouldBeEqualToString('result', 'foo');
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>