blob: 65267e6aa74fba03839fd3ea449f6fcbb472b73d [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/base/unittest.html">
<link rel="import" href="/base/raf.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
test('promise', function() {
return new Promise(function(resolve, reject) {
resolve();
});
});
test('async', function() {
return new Promise(function(resolve) {
tr.b.requestAnimationFrame(function() {
resolve();
});
});
});
/* To test failures remove comments
test('fail', function() {
assert.equal(true, false);
});
test('rejected-promise', function() {
return new Promise(function(resolve, reject){
reject("Failure by rejection");
});
});
test('promise-that-throws-after-resolver', function() {
return new Promise(function(resolve, rejet){
throw new Error('blah');
});
});
*/
});
</script>