28 lines
528 B
HTML
28 lines
528 B
HTML
<!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;
|
|
|
|
var future = new Promise(function(resolve) {
|
|
setTimeout(function() {
|
|
resolve('hello');
|
|
}, 0);
|
|
}).then(function(result) {
|
|
window.result = result;
|
|
shouldBeEqualToString('result', 'hello');
|
|
finishJSTest();
|
|
});
|
|
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|