Title: [97768] trunk/LayoutTests
- Revision
- 97768
- Author
- [email protected]
- Date
- 2011-10-18 10:04:32 -0700 (Tue, 18 Oct 2011)
Log Message
Indexed arguments on the Arguments object should be enumerable.
https://bugs.webkit.org/show_bug.cgi?id=70302
Reviewed by Sam Weinig.
See ECMA-262 5.1 chapter 10.6 step 11b.
This is visible through a number of means, including Object.keys, Object.getOwnPropertyDescriptor, and operator in.
* fast/js/kde/function-expected.txt:
* fast/js/kde/script-tests/function.js:
(foo2):
- This tests using 'in'.
* fast/js/arguments-expected.txt:
* fast/js/script-tests/arguments.js:
(descriptor):
- This tests using 'Object.getOwnPropertyDescriptor'.
* ietestcenter/_javascript_/15.2.3.14-3-4-expected.txt:
- This tests using 'Object.keys'.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (97767 => 97768)
--- trunk/LayoutTests/ChangeLog 2011-10-18 17:03:55 UTC (rev 97767)
+++ trunk/LayoutTests/ChangeLog 2011-10-18 17:04:32 UTC (rev 97768)
@@ -1,3 +1,24 @@
+2011-10-18 Gavin Barraclough <[email protected]>
+
+ Indexed arguments on the Arguments object should be enumerable.
+ https://bugs.webkit.org/show_bug.cgi?id=70302
+
+ Reviewed by Sam Weinig.
+
+ See ECMA-262 5.1 chapter 10.6 step 11b.
+ This is visible through a number of means, including Object.keys, Object.getOwnPropertyDescriptor, and operator in.
+
+ * fast/js/kde/function-expected.txt:
+ * fast/js/kde/script-tests/function.js:
+ (foo2):
+ - This tests using 'in'.
+ * fast/js/arguments-expected.txt:
+ * fast/js/script-tests/arguments.js:
+ (descriptor):
+ - This tests using 'Object.getOwnPropertyDescriptor'.
+ * ietestcenter/_javascript_/15.2.3.14-3-4-expected.txt:
+ - This tests using 'Object.keys'.
+
2011-10-18 Nate Chapin <[email protected]>
Test update for https://bugs.webkit.org/show_bug.cgi?id=61225.
Modified: trunk/LayoutTests/fast/js/arguments-expected.txt (97767 => 97768)
--- trunk/LayoutTests/fast/js/arguments-expected.txt 2011-10-18 17:03:55 UTC (rev 97767)
+++ trunk/LayoutTests/fast/js/arguments-expected.txt 2011-10-18 17:04:32 UTC (rev 97768)
@@ -134,6 +134,10 @@
PASS shadowedArgumentsLength() threw exception TypeError: 'undefined' is not an object (evaluating 'arguments.length').
PASS shadowedArgumentsCallee([]) is undefined.
PASS shadowedArgumentsIndex([true]) is true
+PASS descriptor.value is "one"
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/js/kde/function-expected.txt (97767 => 97768)
--- trunk/LayoutTests/fast/js/kde/function-expected.txt 2011-10-18 17:03:55 UTC (rev 97767)
+++ trunk/LayoutTests/fast/js/kde/function-expected.txt 2011-10-18 17:04:32 UTC (rev 97768)
@@ -11,7 +11,7 @@
PASS foo() is '|'
PASS foo('bar') is '|bar|'
PASS foo('bar', 'x') is '|bar|x|'
-PASS foo2(7) is 0
+PASS foo2(7) is 1
PASS foo3(0, 99) is 2
PASS foo3(1, 99).length is 2
PASS nest0(2,3) is 36
Modified: trunk/LayoutTests/fast/js/kde/script-tests/function.js (97767 => 97768)
--- trunk/LayoutTests/fast/js/kde/script-tests/function.js 2011-10-18 17:03:55 UTC (rev 97767)
+++ trunk/LayoutTests/fast/js/kde/script-tests/function.js 2011-10-18 17:04:32 UTC (rev 97768)
@@ -60,12 +60,12 @@
function foo2(a) {
var i = 0;
- for(a in arguments) // should NOT be enumerable
+ for(a in arguments) // should be enumerable
i++;
return i;
}
-shouldBe("foo2(7)", "0");
+shouldBe("foo2(7)", "1");
// I have my doubts about the standard conformance of this
function foo3(i, j) {
Modified: trunk/LayoutTests/fast/js/script-tests/arguments.js (97767 => 97768)
--- trunk/LayoutTests/fast/js/script-tests/arguments.js 2011-10-18 17:03:55 UTC (rev 97767)
+++ trunk/LayoutTests/fast/js/script-tests/arguments.js 2011-10-18 17:04:32 UTC (rev 97768)
@@ -556,4 +556,10 @@
shouldBeUndefined("shadowedArgumentsCallee([])");
shouldBeTrue("shadowedArgumentsIndex([true])");
+descriptor = (function(){ return Object.getOwnPropertyDescriptor(arguments, 1); })("zero","one","two");
+shouldBe("descriptor.value", '"one"');
+shouldBe("descriptor.writable", 'true');
+shouldBe("descriptor.enumerable", 'true');
+shouldBe("descriptor.configurable", 'true');
+
var successfullyParsed = true;
Modified: trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.14-3-4-expected.txt (97767 => 97768)
--- trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.14-3-4-expected.txt 2011-10-18 17:03:55 UTC (rev 97767)
+++ trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.14-3-4-expected.txt 2011-10-18 17:04:32 UTC (rev 97768)
@@ -4,7 +4,7 @@
PASS ES5Harness.preconditionPassed is true
-FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
+PASS ES5Harness.testPassed is true
PASS successfullyParsed is true
TEST COMPLETE
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes