3 Copyright (c) 2014 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
7 <link rel="import" href="/tvcm/unittest.html">
8 <link rel="import" href="/tvcm/raf.html">
12 tvcm.unittest.testSuite(function() {
15 test('promise', function() {
16 return new Promise(function(resolve, reject) {
21 test('async', function() {
22 return new Promise(function(resolve) {
23 tvcm.requestAnimationFrame(function() {
29 /* To test failures remove comments
30 test('fail', function() {
31 assertEquals(true, false);
34 test('rejected-promise', function() {
35 return new Promise(function(resolve, reject){
36 reject("Failure by rejection");
40 test('promise-that-throws-after-resolver', function() {
41 return new Promise(function(resolve, rejet){
42 throw new Error('blah');