| Index: test/webkit/fast/js/Promise-already-rejected.js
|
| diff --git a/test/webkit/sort-non-numbers.js b/test/webkit/fast/js/Promise-already-rejected.js
|
| similarity index 74%
|
| copy from test/webkit/sort-non-numbers.js
|
| copy to test/webkit/fast/js/Promise-already-rejected.js
|
| index cd92c3a4d4920c63641913b41fb9798903a99750..d1b5028d5d692aa84daf6773f6f35ce5f215cbfd 100644
|
| --- a/test/webkit/sort-non-numbers.js
|
| +++ b/test/webkit/fast/js/Promise-already-rejected.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2013 the V8 project authors. All rights reserved.
|
| +// Copyright 2014 the V8 project authors. All rights reserved.
|
| // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| @@ -21,11 +21,21 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -description("This tests numerically sorting an array of non-numbers.");
|
| +// Flags: --harmony
|
| +'use strict';
|
| +description('Resolve or reject do not take effect on a rejected Promise.');
|
|
|
| -var test = [ "2", "1", "3" ];
|
| -test.sort(function (v1, v2) {
|
| - return v1 - v2;
|
| -});
|
| +var result;
|
|
|
| -shouldBe("String(test)", "'1,2,3'");
|
| +new Promise(function(resolve, reject) {
|
| + reject('foo');
|
| + resolve('resolve');
|
| + reject('reject');
|
| +}).then(function() {
|
| + testFailed('fulfilled');
|
| + finishJSTest();
|
| +}, function(localResult) {
|
| + result = localResult;
|
| + shouldBeEqualToString('result', 'foo');
|
| + finishJSTest();
|
| +});
|
|
|