Index: LayoutTests/fast/js/Promise-overwrite-constructor.html |
diff --git a/LayoutTests/fast/js/Promise-overwrite-constructor.html b/LayoutTests/fast/js/Promise-overwrite-constructor.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0997360ae6222478407c572c9f0f377bed5c614f |
--- /dev/null |
+++ b/LayoutTests/fast/js/Promise-overwrite-constructor.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="resources/js-test-pre.js"></script> |
+</head> |
+<body> |
+<div id="description"></div> |
+<div id="console"></div> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+description('Test Promise.'); |
+var P = Promise; |
+window.Promise = 77; |
+ |
+shouldBe('Promise', '77'); |
+var promise = P.getStatic(34); |
+shouldBeTrue('promise instanceof P'); |
+shouldBe('promise.constructor', 'P'); |
+ |
+</script> |
+<script src="resources/js-test-post.js"></script> |
+</body> |
+</html> |