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

Unified Diff: LayoutTests/fast/js/Promise-init.html

Issue 209443009: Delete Promises Layout Tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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: LayoutTests/fast/js/Promise-init.html
diff --git a/LayoutTests/fast/js/Promise-init.html b/LayoutTests/fast/js/Promise-init.html
deleted file mode 100644
index 688245118d1f62ee194b2c28e686f598f9aae305..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/js/Promise-init.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-window.jsTestIsAsync = true;
-
-description('Test Promise.');
-
-var thisInInit;
-var resolve, reject;
-var promise = new Promise(function(newResolve, newReject) {
- thisInInit = this;
- resolve = newResolve;
- reject = newReject;
-});
-
-shouldBeTrue('promise instanceof Promise');
-shouldBe('promise.constructor', 'Promise');
-shouldBeFalse('thisInInit === promise');
-shouldBeTrue('thisInInit === window');
-shouldBeTrue('resolve instanceof Function');
-shouldBeTrue('reject instanceof Function');
-
-shouldThrow('new Promise()', '"TypeError: Promise constructor takes a function argument"');
-shouldThrow('new Promise(37)', '"TypeError: Promise constructor takes a function argument"');
-
-shouldNotThrow('promise = new Promise(function() { throw Error("foo"); })');
-promise.then(undefined, function(result) {
- window.result = result;
- shouldBeEqualToString('result.message', 'foo');
-});
-
-new Promise(function(resolve) {
- resolve("hello");
- throw Error("foo");
-}).then(function(result) {
- window.result = result;
- testPassed('fulfilled');
- shouldBeEqualToString('result', 'hello');
- finishJSTest();
-}, function(result) {
- window.result = result;
- testFailed('rejected');
- finishJSTest();
-});
-
-</script>
-</body>
-</html>
« no previous file with comments | « LayoutTests/fast/js/Promise-exception-expected.txt ('k') | LayoutTests/fast/js/Promise-init-callback-receiver.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698