Title: [183758] trunk/LayoutTests
- Revision
- 183758
- Author
- [email protected]
- Date
- 2015-05-04 12:22:38 -0700 (Mon, 04 May 2015)
Log Message
ES6 classes: Invalid test for constructor property
https://bugs.webkit.org/show_bug.cgi?id=144278
Reviewed by Darin Adler.
Fixed the test. The constructors of two distinct classes should definitely be distinct.
* js/class-syntax-default-constructor-expected.txt:
* js/script-tests/class-syntax-default-constructor.js:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (183757 => 183758)
--- trunk/LayoutTests/ChangeLog 2015-05-04 19:21:28 UTC (rev 183757)
+++ trunk/LayoutTests/ChangeLog 2015-05-04 19:22:38 UTC (rev 183758)
@@ -1,5 +1,17 @@
2015-05-04 Ryosuke Niwa <[email protected]>
+ ES6 classes: Invalid test for constructor property
+ https://bugs.webkit.org/show_bug.cgi?id=144278
+
+ Reviewed by Darin Adler.
+
+ Fixed the test. The constructors of two distinct classes should definitely be distinct.
+
+ * js/class-syntax-default-constructor-expected.txt:
+ * js/script-tests/class-syntax-default-constructor.js:
+
+2015-05-04 Ryosuke Niwa <[email protected]>
+
new super should be a syntax error
https://bugs.webkit.org/show_bug.cgi?id=144282
Modified: trunk/LayoutTests/js/class-syntax-default-constructor-expected.txt (183757 => 183758)
--- trunk/LayoutTests/js/class-syntax-default-constructor-expected.txt 2015-05-04 19:21:28 UTC (rev 183757)
+++ trunk/LayoutTests/js/class-syntax-default-constructor-expected.txt 2015-05-04 19:22:38 UTC (rev 183758)
@@ -11,7 +11,7 @@
PASS B() threw exception TypeError: Cannot call a class constructor.
PASS B.prototype.constructor.name is "B"
PASS A !== B is true
-FAIL A.prototype.constructor should be function B() { super(...arguments); }. Was function A() { }.
+PASS A.prototype.constructor is not B.prototype.constructor
PASS new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2) is [1, 2]
PASS successfullyParsed is true
Modified: trunk/LayoutTests/js/script-tests/class-syntax-default-constructor.js (183757 => 183758)
--- trunk/LayoutTests/js/script-tests/class-syntax-default-constructor.js 2015-05-04 19:21:28 UTC (rev 183757)
+++ trunk/LayoutTests/js/script-tests/class-syntax-default-constructor.js 2015-05-04 19:22:38 UTC (rev 183758)
@@ -12,7 +12,7 @@
shouldThrow('B()', '"TypeError: Cannot call a class constructor"');
shouldBe('B.prototype.constructor.name', '"B"');
shouldBeTrue('A !== B');
-shouldBe('A.prototype.constructor', 'B.prototype.constructor');
+shouldNotBe('A.prototype.constructor', 'B.prototype.constructor');
shouldBe('new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2)', '[1, 2]');
var successfullyParsed = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes