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

Unified Diff: LayoutTests/fast/js/function-length.html

Issue 14244017: Make length property return useful values for DOM bindings functions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replace [Optional] by optional Created 7 years, 8 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/function-length.html
diff --git a/LayoutTests/fast/js/function-length.html b/LayoutTests/fast/js/function-length.html
new file mode 100644
index 0000000000000000000000000000000000000000..52b4f9e1e83798a96768059f8ebd834ba44e7651
--- /dev/null
+++ b/LayoutTests/fast/js/function-length.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("This tests the length property of functions.");
+
+shouldBe('window.confirm.length', '0');
+shouldBe('window.open.length', '2');
+shouldBe('window.showModalDialog.length', '1');
+shouldBe('window.setTimeout.length', '1');
+shouldBe('window.clearTimeout.length', '0');
+shouldBe('window.addEventListener.length', '2');
+
+shouldBe('Array.prototype.concat.length', '1');
+shouldBe('Array.prototype.join.length', '1');
+shouldBe('Array.prototype.push.length', '1');
+shouldBe('Array.prototype.slice.length', '2');
+shouldBe('Date.UTC.length', '7');
+shouldBe('Date.prototype.setSeconds.length', '2');
+shouldBe('Date.prototype.setMinutes.length', '3');
+shouldBe('Date.prototype.setHours.length', '4');
+shouldBe('Date.prototype.setMonth.length', '2');
+shouldBe('Date.prototype.setFullYear.length', '3');
+shouldBe('Number.prototype.toExponential.length', '1');
+shouldBe('Number.prototype.toFixed.length', '1');
+shouldBe('Number.prototype.toPrecision.length', '1');
+shouldBe('Math.max.length', '2');
+shouldBe('Math.min.length', '2');
+shouldBe('Function.prototype.apply.length', '2');
+shouldBe('Function.prototype.call.length', '1');
+shouldBe('String.prototype.split.length', '2');
+shouldBe('String.prototype.substring.length', '2');
+
+
+</script>
+<script src="resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/js/constructor-length-expected.txt ('k') | LayoutTests/fast/js/function-length-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698