Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(812)

Unified Diff: test/webkit/fast/js/Promise-static-reject.js

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/webkit/fast/js/Promise-static-reject.js
diff --git a/test/webkit/sort-non-numbers.js b/test/webkit/fast/js/Promise-static-reject.js
similarity index 77%
copy from test/webkit/sort-non-numbers.js
copy to test/webkit/fast/js/Promise-static-reject.js
index cd92c3a4d4920c63641913b41fb9798903a99750..5f09ca3e9508bc23e58cdc20c0f15c8c98e8d95d 100644
--- a/test/webkit/sort-non-numbers.js
+++ b/test/webkit/fast/js/Promise-static-reject.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,18 @@
// (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('Test Promise.reject');
-var test = [ "2", "1", "3" ];
-test.sort(function (v1, v2) {
- return v1 - v2;
-});
+var result = undefined;
-shouldBe("String(test)", "'1,2,3'");
+Promise.reject('hello').then(function(result) {
+ testFailed('fulfilled');
+ finishJSTest();
+}, function(localResult) {
+ result = localResult;
+ shouldBeEqualToString('result', 'hello');
+ finishJSTest();
+});
+shouldBe('result', 'undefined');
« no previous file with comments | « test/webkit/fast/js/Promise-static-race-expected.txt ('k') | test/webkit/fast/js/Promise-static-reject-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698