Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,3 +1,50 @@
+2017-07-17 Chris Dumez <cdu...@apple.com>
+
+ Update WebIDL web-platform-tests from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=174603
+
+ Reviewed by Sam Weinig.
+
+ Update WebIDL web-platform-tests from upstream 4c1301113.
+
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html.
+ (test.):
+ (test):
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any-expected.txt: Added.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js: Added.
+ (test):
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker-expected.txt: Added.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html.
+ (test):
+ (forEach):
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any-expected.txt: Added.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js: Added.
+ (test):
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker-expected.txt: Added.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object-expected.txt: Removed.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html: Removed.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js: Removed.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker-expected.txt: Removed.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js: Removed.
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions-expected.txt:
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html:
+ * web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/w3c-import.log:
+ * web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object-expected.txt: Added.
+ * web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object.html: Added.
+ * web-platform-tests/WebIDL/ecmascript-binding/w3c-import.log:
+
2017-07-12 Ali Juma <aj...@chromium.org>
Update web platform tests for elementFromPoint and elementsFromPoint
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,53 +0,0 @@
-
-PASS DOMException constants
-PASS Constant INDEX_SIZE_ERR on DOMException constructor object
-PASS Constant INDEX_SIZE_ERR on DOMException prototype object
-PASS Constant DOMSTRING_SIZE_ERR on DOMException constructor object
-PASS Constant DOMSTRING_SIZE_ERR on DOMException prototype object
-PASS Constant HIERARCHY_REQUEST_ERR on DOMException constructor object
-PASS Constant HIERARCHY_REQUEST_ERR on DOMException prototype object
-PASS Constant WRONG_DOCUMENT_ERR on DOMException constructor object
-PASS Constant WRONG_DOCUMENT_ERR on DOMException prototype object
-PASS Constant INVALID_CHARACTER_ERR on DOMException constructor object
-PASS Constant INVALID_CHARACTER_ERR on DOMException prototype object
-PASS Constant NO_DATA_ALLOWED_ERR on DOMException constructor object
-PASS Constant NO_DATA_ALLOWED_ERR on DOMException prototype object
-PASS Constant NO_MODIFICATION_ALLOWED_ERR on DOMException constructor object
-PASS Constant NO_MODIFICATION_ALLOWED_ERR on DOMException prototype object
-PASS Constant NOT_FOUND_ERR on DOMException constructor object
-PASS Constant NOT_FOUND_ERR on DOMException prototype object
-PASS Constant NOT_SUPPORTED_ERR on DOMException constructor object
-PASS Constant NOT_SUPPORTED_ERR on DOMException prototype object
-PASS Constant INUSE_ATTRIBUTE_ERR on DOMException constructor object
-PASS Constant INUSE_ATTRIBUTE_ERR on DOMException prototype object
-PASS Constant INVALID_STATE_ERR on DOMException constructor object
-PASS Constant INVALID_STATE_ERR on DOMException prototype object
-PASS Constant SYNTAX_ERR on DOMException constructor object
-PASS Constant SYNTAX_ERR on DOMException prototype object
-PASS Constant INVALID_MODIFICATION_ERR on DOMException constructor object
-PASS Constant INVALID_MODIFICATION_ERR on DOMException prototype object
-PASS Constant NAMESPACE_ERR on DOMException constructor object
-PASS Constant NAMESPACE_ERR on DOMException prototype object
-PASS Constant INVALID_ACCESS_ERR on DOMException constructor object
-PASS Constant INVALID_ACCESS_ERR on DOMException prototype object
-PASS Constant VALIDATION_ERR on DOMException constructor object
-PASS Constant VALIDATION_ERR on DOMException prototype object
-PASS Constant TYPE_MISMATCH_ERR on DOMException constructor object
-PASS Constant TYPE_MISMATCH_ERR on DOMException prototype object
-PASS Constant SECURITY_ERR on DOMException constructor object
-PASS Constant SECURITY_ERR on DOMException prototype object
-PASS Constant NETWORK_ERR on DOMException constructor object
-PASS Constant NETWORK_ERR on DOMException prototype object
-PASS Constant ABORT_ERR on DOMException constructor object
-PASS Constant ABORT_ERR on DOMException prototype object
-PASS Constant URL_MISMATCH_ERR on DOMException constructor object
-PASS Constant URL_MISMATCH_ERR on DOMException prototype object
-PASS Constant QUOTA_EXCEEDED_ERR on DOMException constructor object
-PASS Constant QUOTA_EXCEEDED_ERR on DOMException prototype object
-PASS Constant TIMEOUT_ERR on DOMException constructor object
-PASS Constant TIMEOUT_ERR on DOMException prototype object
-PASS Constant INVALID_NODE_TYPE_ERR on DOMException constructor object
-PASS Constant INVALID_NODE_TYPE_ERR on DOMException prototype object
-PASS Constant DATA_CLONE_ERR on DOMException constructor object
-PASS Constant DATA_CLONE_ERR on DOMException prototype object
-
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any-expected.txt (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,53 @@
+
+PASS Untitled
+PASS Constant INDEX_SIZE_ERR on DOMException constructor object
+PASS Constant INDEX_SIZE_ERR on DOMException prototype object
+PASS Constant DOMSTRING_SIZE_ERR on DOMException constructor object
+PASS Constant DOMSTRING_SIZE_ERR on DOMException prototype object
+PASS Constant HIERARCHY_REQUEST_ERR on DOMException constructor object
+PASS Constant HIERARCHY_REQUEST_ERR on DOMException prototype object
+PASS Constant WRONG_DOCUMENT_ERR on DOMException constructor object
+PASS Constant WRONG_DOCUMENT_ERR on DOMException prototype object
+PASS Constant INVALID_CHARACTER_ERR on DOMException constructor object
+PASS Constant INVALID_CHARACTER_ERR on DOMException prototype object
+PASS Constant NO_DATA_ALLOWED_ERR on DOMException constructor object
+PASS Constant NO_DATA_ALLOWED_ERR on DOMException prototype object
+PASS Constant NO_MODIFICATION_ALLOWED_ERR on DOMException constructor object
+PASS Constant NO_MODIFICATION_ALLOWED_ERR on DOMException prototype object
+PASS Constant NOT_FOUND_ERR on DOMException constructor object
+PASS Constant NOT_FOUND_ERR on DOMException prototype object
+PASS Constant NOT_SUPPORTED_ERR on DOMException constructor object
+PASS Constant NOT_SUPPORTED_ERR on DOMException prototype object
+PASS Constant INUSE_ATTRIBUTE_ERR on DOMException constructor object
+PASS Constant INUSE_ATTRIBUTE_ERR on DOMException prototype object
+PASS Constant INVALID_STATE_ERR on DOMException constructor object
+PASS Constant INVALID_STATE_ERR on DOMException prototype object
+PASS Constant SYNTAX_ERR on DOMException constructor object
+PASS Constant SYNTAX_ERR on DOMException prototype object
+PASS Constant INVALID_MODIFICATION_ERR on DOMException constructor object
+PASS Constant INVALID_MODIFICATION_ERR on DOMException prototype object
+PASS Constant NAMESPACE_ERR on DOMException constructor object
+PASS Constant NAMESPACE_ERR on DOMException prototype object
+PASS Constant INVALID_ACCESS_ERR on DOMException constructor object
+PASS Constant INVALID_ACCESS_ERR on DOMException prototype object
+PASS Constant VALIDATION_ERR on DOMException constructor object
+PASS Constant VALIDATION_ERR on DOMException prototype object
+PASS Constant TYPE_MISMATCH_ERR on DOMException constructor object
+PASS Constant TYPE_MISMATCH_ERR on DOMException prototype object
+PASS Constant SECURITY_ERR on DOMException constructor object
+PASS Constant SECURITY_ERR on DOMException prototype object
+PASS Constant NETWORK_ERR on DOMException constructor object
+PASS Constant NETWORK_ERR on DOMException prototype object
+PASS Constant ABORT_ERR on DOMException constructor object
+PASS Constant ABORT_ERR on DOMException prototype object
+PASS Constant URL_MISMATCH_ERR on DOMException constructor object
+PASS Constant URL_MISMATCH_ERR on DOMException prototype object
+PASS Constant QUOTA_EXCEEDED_ERR on DOMException constructor object
+PASS Constant QUOTA_EXCEEDED_ERR on DOMException prototype object
+PASS Constant TIMEOUT_ERR on DOMException constructor object
+PASS Constant TIMEOUT_ERR on DOMException prototype object
+PASS Constant INVALID_NODE_TYPE_ERR on DOMException constructor object
+PASS Constant INVALID_NODE_TYPE_ERR on DOMException prototype object
+PASS Constant DATA_CLONE_ERR on DOMException constructor object
+PASS Constant DATA_CLONE_ERR on DOMException prototype object
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,51 @@
+'use strict';
+
+test(function() {
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=27732
+ var constants = [
+ "INDEX_SIZE_ERR",
+ "DOMSTRING_SIZE_ERR",
+ "HIERARCHY_REQUEST_ERR",
+ "WRONG_DOCUMENT_ERR",
+ "INVALID_CHARACTER_ERR",
+ "NO_DATA_ALLOWED_ERR",
+ "NO_MODIFICATION_ALLOWED_ERR",
+ "NOT_FOUND_ERR",
+ "NOT_SUPPORTED_ERR",
+ "INUSE_ATTRIBUTE_ERR",
+ "INVALID_STATE_ERR",
+ "SYNTAX_ERR",
+ "INVALID_MODIFICATION_ERR",
+ "NAMESPACE_ERR",
+ "INVALID_ACCESS_ERR",
+ "VALIDATION_ERR",
+ "TYPE_MISMATCH_ERR",
+ "SECURITY_ERR",
+ "NETWORK_ERR",
+ "ABORT_ERR",
+ "URL_MISMATCH_ERR",
+ "QUOTA_EXCEEDED_ERR",
+ "TIMEOUT_ERR",
+ "INVALID_NODE_TYPE_ERR",
+ "DATA_CLONE_ERR"
+ ]
+ var objects = [
+ [DOMException, "DOMException constructor object"],
+ [DOMException.prototype, "DOMException prototype object"]
+ ]
+ constants.forEach(function(name, i) {
+ objects.forEach(function(o) {
+ var object = o[0], description = o[1];
+ test(function() {
+ assert_equals(object[name], i + 1, name)
+ assert_own_property(object, name)
+ var pd = Object.getOwnPropertyDescriptor(object, name)
+ assert_false("get" in pd, "get")
+ assert_false("set" in pd, "set")
+ assert_false(pd.writable, "writable")
+ assert_true(pd.enumerable, "enumerable")
+ assert_false(pd.configurable, "configurable")
+ }, "Constant " + name + " on " + description)
+ })
+ })
+})
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker-expected.txt (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants-expected.txt) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,53 @@
+
+PASS Untitled
+PASS Constant INDEX_SIZE_ERR on DOMException constructor object
+PASS Constant INDEX_SIZE_ERR on DOMException prototype object
+PASS Constant DOMSTRING_SIZE_ERR on DOMException constructor object
+PASS Constant DOMSTRING_SIZE_ERR on DOMException prototype object
+PASS Constant HIERARCHY_REQUEST_ERR on DOMException constructor object
+PASS Constant HIERARCHY_REQUEST_ERR on DOMException prototype object
+PASS Constant WRONG_DOCUMENT_ERR on DOMException constructor object
+PASS Constant WRONG_DOCUMENT_ERR on DOMException prototype object
+PASS Constant INVALID_CHARACTER_ERR on DOMException constructor object
+PASS Constant INVALID_CHARACTER_ERR on DOMException prototype object
+PASS Constant NO_DATA_ALLOWED_ERR on DOMException constructor object
+PASS Constant NO_DATA_ALLOWED_ERR on DOMException prototype object
+PASS Constant NO_MODIFICATION_ALLOWED_ERR on DOMException constructor object
+PASS Constant NO_MODIFICATION_ALLOWED_ERR on DOMException prototype object
+PASS Constant NOT_FOUND_ERR on DOMException constructor object
+PASS Constant NOT_FOUND_ERR on DOMException prototype object
+PASS Constant NOT_SUPPORTED_ERR on DOMException constructor object
+PASS Constant NOT_SUPPORTED_ERR on DOMException prototype object
+PASS Constant INUSE_ATTRIBUTE_ERR on DOMException constructor object
+PASS Constant INUSE_ATTRIBUTE_ERR on DOMException prototype object
+PASS Constant INVALID_STATE_ERR on DOMException constructor object
+PASS Constant INVALID_STATE_ERR on DOMException prototype object
+PASS Constant SYNTAX_ERR on DOMException constructor object
+PASS Constant SYNTAX_ERR on DOMException prototype object
+PASS Constant INVALID_MODIFICATION_ERR on DOMException constructor object
+PASS Constant INVALID_MODIFICATION_ERR on DOMException prototype object
+PASS Constant NAMESPACE_ERR on DOMException constructor object
+PASS Constant NAMESPACE_ERR on DOMException prototype object
+PASS Constant INVALID_ACCESS_ERR on DOMException constructor object
+PASS Constant INVALID_ACCESS_ERR on DOMException prototype object
+PASS Constant VALIDATION_ERR on DOMException constructor object
+PASS Constant VALIDATION_ERR on DOMException prototype object
+PASS Constant TYPE_MISMATCH_ERR on DOMException constructor object
+PASS Constant TYPE_MISMATCH_ERR on DOMException prototype object
+PASS Constant SECURITY_ERR on DOMException constructor object
+PASS Constant SECURITY_ERR on DOMException prototype object
+PASS Constant NETWORK_ERR on DOMException constructor object
+PASS Constant NETWORK_ERR on DOMException prototype object
+PASS Constant ABORT_ERR on DOMException constructor object
+PASS Constant ABORT_ERR on DOMException prototype object
+PASS Constant URL_MISMATCH_ERR on DOMException constructor object
+PASS Constant URL_MISMATCH_ERR on DOMException prototype object
+PASS Constant QUOTA_EXCEEDED_ERR on DOMException constructor object
+PASS Constant QUOTA_EXCEEDED_ERR on DOMException prototype object
+PASS Constant TIMEOUT_ERR on DOMException constructor object
+PASS Constant TIMEOUT_ERR on DOMException prototype object
+PASS Constant INVALID_NODE_TYPE_ERR on DOMException constructor object
+PASS Constant INVALID_NODE_TYPE_ERR on DOMException prototype object
+PASS Constant DATA_CLONE_ERR on DOMException constructor object
+PASS Constant DATA_CLONE_ERR on DOMException prototype object
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.worker.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,59 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>DOMException constants</title>
-<link rel=help href=""
-<link rel=help href=""
-<script src=""
-<script src=""
-<div id="log"></div>
-<script>
-test(function() {
- // https://www.w3.org/Bugs/Public/show_bug.cgi?id=27732
- var constants = [
- "INDEX_SIZE_ERR",
- "DOMSTRING_SIZE_ERR",
- "HIERARCHY_REQUEST_ERR",
- "WRONG_DOCUMENT_ERR",
- "INVALID_CHARACTER_ERR",
- "NO_DATA_ALLOWED_ERR",
- "NO_MODIFICATION_ALLOWED_ERR",
- "NOT_FOUND_ERR",
- "NOT_SUPPORTED_ERR",
- "INUSE_ATTRIBUTE_ERR",
- "INVALID_STATE_ERR",
- "SYNTAX_ERR",
- "INVALID_MODIFICATION_ERR",
- "NAMESPACE_ERR",
- "INVALID_ACCESS_ERR",
- "VALIDATION_ERR",
- "TYPE_MISMATCH_ERR",
- "SECURITY_ERR",
- "NETWORK_ERR",
- "ABORT_ERR",
- "URL_MISMATCH_ERR",
- "QUOTA_EXCEEDED_ERR",
- "TIMEOUT_ERR",
- "INVALID_NODE_TYPE_ERR",
- "DATA_CLONE_ERR"
- ]
- var objects = [
- [DOMException, "DOMException constructor object"],
- [DOMException.prototype, "DOMException prototype object"]
- ]
- constants.forEach(function(name, i) {
- objects.forEach(function(o) {
- var object = o[0], description = o[1];
- test(function() {
- assert_equals(object[name], i + 1, name)
- assert_own_property(object, name)
- var pd = Object.getOwnPropertyDescriptor(object, name)
- assert_false("get" in pd, "property has getter")
- assert_false("set" in pd, "property has setter")
- assert_false(pd.writable, "not writable")
- assert_true(pd.enumerable, "enumerable")
- assert_false(pd.configurable, "not configurable")
- }, "Constant " + name + " on " + description)
- })
- })
-})
-</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any-expected.txt (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,5 @@
+
+PASS existence and property descriptor of DOMException
+PASS existence and property descriptor of DOMException.prototype
+PASS existence and property descriptor of DOMException.prototype.constructor
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,32 @@
+test(function() {
+ assert_own_property(self, "DOMException", "property of global");
+
+ var desc = Object.getOwnPropertyDescriptor(self, "DOMException");
+ assert_false("get" in desc, "get");
+ assert_false("set" in desc, "set");
+ assert_true(desc.writable, "writable");
+ assert_false(desc.enumerable, "enumerable");
+ assert_true(desc.configurable, "configurable");
+}, "existence and property descriptor of DOMException");
+
+test(function() {
+ assert_own_property(self.DOMException, "prototype", "prototype property");
+
+ var desc = Object.getOwnPropertyDescriptor(self.DOMException, "prototype");
+ assert_false("get" in desc, "get");
+ assert_false("set" in desc, "set");
+ assert_false(desc.writable, "writable");
+ assert_false(desc.enumerable, "enumerable");
+ assert_false(desc.configurable, "configurable");
+}, "existence and property descriptor of DOMException.prototype");
+
+test(function() {
+ assert_own_property(self.DOMException.prototype, "constructor", "property of prototype");
+ var desc = Object.getOwnPropertyDescriptor(self.DOMException.prototype, "constructor");
+ assert_false("get" in desc, "get");
+ assert_false("set" in desc, "set");
+ assert_true(desc.writable, "writable");
+ assert_false(desc.enumerable, "enumerable");
+ assert_true(desc.configurable, "configurable");
+ assert_equals(self.DOMException.prototype.constructor, self.DOMException, "equality with actual constructor");
+}, "existence and property descriptor of DOMException.prototype.constructor");
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker-expected.txt (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,5 @@
+
+PASS existence and property descriptor of DOMException
+PASS existence and property descriptor of DOMException.prototype
+PASS existence and property descriptor of DOMException.prototype.constructor
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.worker.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any-expected.txt (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,34 @@
+
+PASS new DOMException()
+FAIL new DOMException(): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException(null)
+PASS new DOMException(undefined)
+FAIL new DOMException(undefined): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException("foo")
+FAIL new DOMException("foo"): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException("bar", undefined)
+PASS new DOMException("bar", "NotSupportedError")
+FAIL new DOMException("bar", "NotSupportedError"): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException("bar", "foo")
+PASS new DOMexception("msg", "IndexSizeError")
+PASS new DOMexception("msg", "HierarchyRequestError")
+PASS new DOMexception("msg", "WrongDocumentError")
+PASS new DOMexception("msg", "InvalidCharacterError")
+PASS new DOMexception("msg", "NoModificationAllowedError")
+PASS new DOMexception("msg", "NotFoundError")
+PASS new DOMexception("msg", "NotSupportedError")
+PASS new DOMexception("msg", "InUseAttributeError")
+PASS new DOMexception("msg", "InvalidStateError")
+PASS new DOMexception("msg", "SyntaxError")
+PASS new DOMexception("msg", "InvalidModificationError")
+PASS new DOMexception("msg", "NamespaceError")
+PASS new DOMexception("msg", "InvalidAccessError")
+PASS new DOMexception("msg", "SecurityError")
+PASS new DOMexception("msg", "NetworkError")
+PASS new DOMexception("msg", "AbortError")
+PASS new DOMexception("msg", "URLMismatchError")
+PASS new DOMexception("msg", "QuotaExceededError")
+PASS new DOMexception("msg", "TimeoutError")
+PASS new DOMexception("msg", "InvalidNodeTypeError")
+PASS new DOMexception("msg", "DataCloneError")
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,121 @@
+'use strict';
+
+test(function() {
+ var ex = new DOMException();
+ assert_equals(ex.name, "Error",
+ "Not passing a name should end up with 'Error' as the name");
+ assert_equals(ex.message, "",
+ "Not passing a message should end up with empty string as the message");
+}, 'new DOMException()');
+
+test(function() {
+ var ex = new DOMException();
+ assert_false(ex.hasOwnProperty("name"),
+ "The name property should be inherited");
+ assert_false(ex.hasOwnProperty("message"),
+ "The message property should be inherited");
+}, 'new DOMException(): inherited-ness');
+
+test(function() {
+ var ex = new DOMException(null);
+ assert_equals(ex.name, "Error",
+ "Not passing a name should end up with 'Error' as the name");
+ assert_equals(ex.message, "null",
+ "Passing null as message should end up with stringified 'null' as the message");
+}, 'new DOMException(null)');
+
+test(function() {
+ var ex = new DOMException(undefined);
+ assert_equals(ex.name, "Error",
+ "Not passing a name should end up with 'Error' as the name");
+ assert_equals(ex.message, "",
+ "Not passing a message should end up with empty string as the message");
+}, 'new DOMException(undefined)');
+
+test(function() {
+ var ex = new DOMException(undefined);
+ assert_false(ex.hasOwnProperty("name"),
+ "The name property should be inherited");
+ assert_false(ex.hasOwnProperty("message"),
+ "The message property should be inherited");
+}, 'new DOMException(undefined): inherited-ness');
+
+test(function() {
+ var ex = new DOMException("foo");
+ assert_equals(ex.name, "Error",
+ "Not passing a name should still end up with 'Error' as the name");
+ assert_equals(ex.message, "foo", "Should be using passed-in message");
+}, 'new DOMException("foo")');
+
+test(function() {
+ var ex = new DOMException("foo");
+ assert_false(ex.hasOwnProperty("name"),
+ "The name property should be inherited");
+ assert_false(ex.hasOwnProperty("message"),
+ "The message property should be inherited");
+}, 'new DOMException("foo"): inherited-ness');
+
+test(function() {
+ var ex = new DOMException("bar", undefined);
+ assert_equals(ex.name, "Error",
+ "Passing undefined for name should end up with 'Error' as the name");
+ assert_equals(ex.message, "bar", "Should still be using passed-in message");
+}, 'new DOMException("bar", undefined)');
+
+test(function() {
+ var ex = new DOMException("bar", "NotSupportedError");
+ assert_equals(ex.name, "NotSupportedError", "Should be using the passed-in name");
+ assert_equals(ex.message, "bar", "Should still be using passed-in message");
+ assert_equals(ex.code, DOMException.NOT_SUPPORTED_ERR,
+ "Should have the right exception code");
+}, 'new DOMException("bar", "NotSupportedError")');
+
+test(function() {
+ var ex = new DOMException("bar", "NotSupportedError");
+ assert_false(ex.hasOwnProperty("name"),
+ "The name property should be inherited");
+ assert_false(ex.hasOwnProperty("message"),
+ "The message property should be inherited");
+}, 'new DOMException("bar", "NotSupportedError"): inherited-ness');
+
+test(function() {
+ var ex = new DOMException("bar", "foo");
+ assert_equals(ex.name, "foo", "Should be using the passed-in name");
+ assert_equals(ex.message, "bar", "Should still be using passed-in message");
+ assert_equals(ex.code, 0,
+ "Should have 0 for code for a name not in the exception names table");
+}, 'new DOMException("bar", "foo")');
+
+[
+ {name: "IndexSizeError", code: 1},
+ {name: "HierarchyRequestError", code: 3},
+ {name: "WrongDocumentError", code: 4},
+ {name: "InvalidCharacterError", code: 5},
+ {name: "NoModificationAllowedError", code: 7},
+ {name: "NotFoundError", code: 8},
+ {name: "NotSupportedError", code: 9},
+ {name: "InUseAttributeError", code: 10},
+ {name: "InvalidStateError", code: 11},
+ {name: "SyntaxError", code: 12},
+ {name: "InvalidModificationError", code: 13},
+ {name: "NamespaceError", code: 14},
+ {name: "InvalidAccessError", code: 15},
+ {name: "SecurityError", code: 18},
+ {name: "NetworkError", code: 19},
+ {name: "AbortError", code: 20},
+ {name: "URLMismatchError", code: 21},
+ {name: "QuotaExceededError", code: 22},
+ {name: "TimeoutError", code: 23},
+ {name: "InvalidNodeTypeError", code: 24},
+ {name: "DataCloneError", code: 25}
+].forEach(function(test_case) {
+ test(function() {
+ var ex = new DOMException("msg", test_case.name);
+ assert_equals(ex.name, test_case.name,
+ "Should be using the passed-in name");
+ assert_equals(ex.message, "msg",
+ "Should be using the passed-in message");
+ assert_equals(ex.code, test_case.code,
+ "Should have matching legacy code from error names table");
+ },'new DOMexception("msg", "' + test_case.name + '")');
+});
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker-expected.txt (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,34 @@
+
+PASS new DOMException()
+FAIL new DOMException(): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException(null)
+PASS new DOMException(undefined)
+FAIL new DOMException(undefined): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException("foo")
+FAIL new DOMException("foo"): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException("bar", undefined)
+PASS new DOMException("bar", "NotSupportedError")
+FAIL new DOMException("bar", "NotSupportedError"): inherited-ness assert_false: The name property should be inherited expected false got true
+PASS new DOMException("bar", "foo")
+PASS new DOMexception("msg", "IndexSizeError")
+PASS new DOMexception("msg", "HierarchyRequestError")
+PASS new DOMexception("msg", "WrongDocumentError")
+PASS new DOMexception("msg", "InvalidCharacterError")
+PASS new DOMexception("msg", "NoModificationAllowedError")
+PASS new DOMexception("msg", "NotFoundError")
+PASS new DOMexception("msg", "NotSupportedError")
+PASS new DOMexception("msg", "InUseAttributeError")
+PASS new DOMexception("msg", "InvalidStateError")
+PASS new DOMexception("msg", "SyntaxError")
+PASS new DOMexception("msg", "InvalidModificationError")
+PASS new DOMexception("msg", "NamespaceError")
+PASS new DOMexception("msg", "InvalidAccessError")
+PASS new DOMexception("msg", "SecurityError")
+PASS new DOMexception("msg", "NetworkError")
+PASS new DOMexception("msg", "AbortError")
+PASS new DOMexception("msg", "URLMismatchError")
+PASS new DOMexception("msg", "QuotaExceededError")
+PASS new DOMexception("msg", "TimeoutError")
+PASS new DOMexception("msg", "InvalidNodeTypeError")
+PASS new DOMexception("msg", "DataCloneError")
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.worker.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,35 +0,0 @@
-
-PASS new DOMException()
-FAIL new DOMException(): own-ness assert_false: The name property should be inherited expected false got true
-PASS new DOMException(null)
-PASS new DOMException(undefined)
-FAIL new DOMException(undefined): own-ness assert_false: The name property should be inherited expected false got true
-PASS new DOMException("foo")
-FAIL new DOMException("foo"): own-ness assert_false: The name property should be inherited expected false got true
-PASS new DOMException("bar", undefined)
-PASS new DOMException("bar", "NotSupportedError")
-PASS new DOMException("bar", "NotSupportedError"): own-ness
-PASS new DOMException("bar", "foo")
-PASS new DOMexception("msg", "IndexSizeError")
-PASS new DOMexception("msg", "HierarchyRequestError")
-PASS new DOMexception("msg", "WrongDocumentError")
-PASS new DOMexception("msg", "InvalidCharacterError")
-PASS new DOMexception("msg", "NoModificationAllowedError")
-PASS new DOMexception("msg", "NotFoundError")
-PASS new DOMexception("msg", "NotSupportedError")
-PASS new DOMexception("msg", "InUseAttributeError")
-PASS new DOMexception("msg", "InvalidStateError")
-PASS new DOMexception("msg", "SyntaxError")
-PASS new DOMexception("msg", "InvalidModificationError")
-PASS new DOMexception("msg", "NamespaceError")
-PASS new DOMexception("msg", "InvalidAccessError")
-PASS new DOMexception("msg", "SecurityError")
-PASS new DOMexception("msg", "NetworkError")
-PASS new DOMexception("msg", "AbortError")
-PASS new DOMexception("msg", "URLMismatchError")
-PASS new DOMexception("msg", "QuotaExceededError")
-PASS new DOMexception("msg", "TimeoutError")
-PASS new DOMexception("msg", "InvalidNodeTypeError")
-PASS new DOMexception("msg", "DataCloneError")
-PASS new DOMException("bar", "UnknownError")
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,139 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>DOMException constructor</title>
-<link rel=help href=""
-<link rel=help href=""
-<link rel=help href=""
-<script src=""
-<script src=""
-<div id="log"></div>
-<script>
-test(function() {
- var ex = new DOMException();
- assert_equals(ex.name, "Error",
- "Not passing a name should end up with 'Error' as the name");
- assert_equals(ex.message, "",
- "Not passing a message should end up with empty string as the message");
-}, 'new DOMException()');
-
-test(function() {
- var ex = new DOMException();
- assert_false(ex.hasOwnProperty("name"),
- "The name property should be inherited");
- assert_false(ex.hasOwnProperty("message"),
- "The message property should be inherited");
-}, 'new DOMException(): own-ness');
-
-test(function() {
- var ex = new DOMException(null);
- assert_equals(ex.name, "Error",
- "Not passing a name should end up with 'Error' as the name");
- assert_equals(ex.message, "null",
- "Passing null as message should end up with stringified 'null' as the message");
-}, 'new DOMException(null)');
-
-test(function() {
- var ex = new DOMException(undefined);
- assert_equals(ex.name, "Error",
- "Not passing a name should end up with 'Error' as the name");
- assert_equals(ex.message, "",
- "Not passing a message should end up with empty string as the message");
-}, 'new DOMException(undefined)');
-
-test(function() {
- var ex = new DOMException(undefined);
- assert_false(ex.hasOwnProperty("name"),
- "The name property should be inherited");
- assert_false(ex.hasOwnProperty("message"),
- "The message property should be inherited");
-}, 'new DOMException(undefined): own-ness');
-
-test(function() {
- var ex = new DOMException("foo");
- assert_equals(ex.name, "Error",
- "Not passing a name should still end up with 'Error' as the name");
- assert_equals(ex.message, "foo", "Should be using passed-in message");
-}, 'new DOMException("foo")');
-
-test(function() {
- var ex = new DOMException("foo");
- assert_false(ex.hasOwnProperty("name"),
- "The name property should be inherited");
- assert_true(ex.hasOwnProperty("message"),
- "The message property should be own");
-}, 'new DOMException("foo"): own-ness');
-
-test(function() {
- var ex = new DOMException("bar", undefined);
- assert_equals(ex.name, "Error",
- "Passing undefined for name should end up with 'Error' as the name");
- assert_equals(ex.message, "bar", "Should still be using passed-in message");
-}, 'new DOMException("bar", undefined)');
-
-test(function() {
- var ex = new DOMException("bar", "NotSupportedError");
- assert_equals(ex.name, "NotSupportedError", "Should be using the passed-in name");
- assert_equals(ex.message, "bar", "Should still be using passed-in message");
- assert_equals(ex.code, DOMException.NOT_SUPPORTED_ERR,
- "Should have the right exception code");
-}, 'new DOMException("bar", "NotSupportedError")');
-
-test(function() {
- var ex = new DOMException("bar", "NotSupportedError");
- assert_true(ex.hasOwnProperty("name"),
- "The name property should be own");
- assert_true(ex.hasOwnProperty("message"),
- "The message property should be own");
-}, 'new DOMException("bar", "NotSupportedError"): own-ness');
-
-test(function() {
- var ex = new DOMException("bar", "foo");
- assert_equals(ex.name, "foo", "Should be using the passed-in name");
- assert_equals(ex.message, "bar", "Should still be using passed-in message");
- assert_equals(ex.code, 0,
- "Should have 0 for code for a name not in the exception names table");
-}, 'new DOMException("bar", "foo")');
-
-[
- {name: "IndexSizeError", code: 1},
- {name: "HierarchyRequestError", code: 3},
- {name: "WrongDocumentError", code: 4},
- {name: "InvalidCharacterError", code: 5},
- {name: "NoModificationAllowedError", code: 7},
- {name: "NotFoundError", code: 8},
- {name: "NotSupportedError", code: 9},
- {name: "InUseAttributeError", code: 10},
- {name: "InvalidStateError", code: 11},
- {name: "SyntaxError", code: 12},
- {name: "InvalidModificationError", code: 13},
- {name: "NamespaceError", code: 14},
- {name: "InvalidAccessError", code: 15},
- {name: "SecurityError", code: 18},
- {name: "NetworkError", code: 19},
- {name: "AbortError", code: 20},
- {name: "URLMismatchError", code: 21},
- {name: "QuotaExceededError", code: 22},
- {name: "TimeoutError", code: 23},
- {name: "InvalidNodeTypeError", code: 24},
- {name: "DataCloneError", code: 25}
-].forEach(function(test_case) {
- test(function() {
- var ex = new DOMException("msg", test_case.name);
- assert_equals(ex.name, test_case.name,
- "Should be using the passed-in name");
- assert_equals(ex.message, "msg",
- "Should be using the passed-in message");
- assert_equals(ex.code, test_case.code,
- "Should have matching legacy code from error names table");
- },'new DOMexception("msg", "' + test_case.name + '")');
-});
-
-test(function() {
- var ex = new DOMException("bar", "UnknownError");
- assert_equals(ex.name, "UnknownError", "Should be using the passed-in name");
- assert_equals(ex.message, "bar", "Should still be using passed-in message");
- assert_equals(ex.code, 0,
- "Should have 0 for code for a name in the exception names table with no legacy code");
-}, 'new DOMException("bar", "UnknownError")');
-
-</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any-expected.txt (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,17 @@
+
+PASS Cannot construct without new
+PASS inherits from Error: prototype-side
+PASS does not inherit from Error: class-side
+FAIL message property descriptor assert_false: property is not own expected false got true
+FAIL message getter performs brand checks (i.e. is not [LenientThis] undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(DOMException.prototype, "message").get')
+FAIL name property descriptor assert_false: property is not own expected false got true
+FAIL name getter performs brand checks (i.e. is not [LenientThis] undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(DOMException.prototype, "name").get')
+FAIL code property descriptor assert_false: property is not own expected false got true
+FAIL code getter performs brand checks (i.e. is not [LenientThis] undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(DOMException.prototype, "code").get')
+PASS code property is not affected by shadowing the name property
+PASS Object.prototype.toString behavior is like other interfaces
+FAIL Inherits its toString() from Error.prototype assert_false: toString must not exist on DOMException.prototype expected false got true
+FAIL toString() behavior from Error.prototype applies as expected assert_equals: The default Error.prototype.toString() behavior must work on supplied name and message expected "name: message" but got "name (DOM Exception): message"
+PASS DOMException.prototype.toString() applied to DOMException.prototype throws because of name/message brand checks
+FAIL If the implementation has a stack property on normal errors, it also does on DOMExceptions assert_equals: The typeof values must match expected "string" but got "undefined"
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,120 @@
+"use strict";
+
+test(() => {
+ assert_throws(new TypeError(), () => DOMException());
+}, "Cannot construct without new");
+
+test(() => {
+ assert_equals(Object.getPrototypeOf(DOMException.prototype), Error.prototype);
+}, "inherits from Error: prototype-side");
+
+test(() => {
+ assert_equals(Object.getPrototypeOf(DOMException), Function.prototype);
+}, "does not inherit from Error: class-side");
+
+test(() => {
+ const e = new DOMException("message", "name");
+ assert_false(e.hasOwnProperty("message"), "property is not own");
+
+ const propDesc = Object.getOwnPropertyDescriptor(DOMException.prototype, "message");
+ assert_equals(typeof propDesc.get, "function", "property descriptor is a getter");
+ assert_equals(propDesc.set, undefined, "property descriptor is not a setter");
+ assert_true(propDesc.enumerable, "property descriptor enumerable");
+ assert_true(propDesc.configurable, "property descriptor configurable");
+}, "message property descriptor");
+
+test(() => {
+ const getter = Object.getOwnPropertyDescriptor(DOMException.prototype, "message").get;
+
+ assert_throws(new TypeError(), () => getter.apply({}));
+}, "message getter performs brand checks (i.e. is not [LenientThis]");
+
+test(() => {
+ const e = new DOMException("message", "name");
+ assert_false(e.hasOwnProperty("name"), "property is not own");
+
+ const propDesc = Object.getOwnPropertyDescriptor(DOMException.prototype, "name");
+ assert_equals(typeof propDesc.get, "function", "property descriptor is a getter");
+ assert_equals(propDesc.set, undefined, "property descriptor is not a setter");
+ assert_true(propDesc.enumerable, "property descriptor enumerable");
+ assert_true(propDesc.configurable, "property descriptor configurable");
+}, "name property descriptor");
+
+test(() => {
+ const getter = Object.getOwnPropertyDescriptor(DOMException.prototype, "name").get;
+
+ assert_throws(new TypeError(), () => getter.apply({}));
+}, "name getter performs brand checks (i.e. is not [LenientThis]");
+
+test(() => {
+ const e = new DOMException("message", "name");
+ assert_false(e.hasOwnProperty("code"), "property is not own");
+
+ const propDesc = Object.getOwnPropertyDescriptor(DOMException.prototype, "code");
+ assert_equals(typeof propDesc.get, "function", "property descriptor is a getter");
+ assert_equals(propDesc.set, undefined, "property descriptor is not a setter");
+ assert_true(propDesc.enumerable, "property descriptor enumerable");
+ assert_true(propDesc.configurable, "property descriptor configurable");
+}, "code property descriptor");
+
+test(() => {
+ const getter = Object.getOwnPropertyDescriptor(DOMException.prototype, "code").get;
+
+ assert_throws(new TypeError(), () => getter.apply({}));
+}, "code getter performs brand checks (i.e. is not [LenientThis]");
+
+test(() => {
+ const e = new DOMException("message", "InvalidCharacterError");
+ assert_equals(e.code, 5, "Initially the code is set to 5");
+
+ Object.defineProperty(e, "name", {
+ value: "WrongDocumentError"
+ });
+
+ assert_equals(e.code, 5, "The code is still set to 5");
+}, "code property is not affected by shadowing the name property");
+
+test(() => {
+ const e = new DOMException("message", "name");
+ assert_equals(Object.prototype.toString.call(e), "[object DOMException]");
+}, "Object.prototype.toString behavior is like other interfaces");
+
+test(() => {
+ const e = new DOMException("message", "name");
+ assert_false(e.hasOwnProperty("toString"), "toString must not exist on the instance");
+ assert_false(DOMException.prototype.hasOwnProperty("toString"), "toString must not exist on DOMException.prototype");
+ assert_equals(typeof e.toString, "function", "toString must still exist (via Error.prototype)");
+}, "Inherits its toString() from Error.prototype");
+
+test(() => {
+ const e = new DOMException("message", "name");
+ assert_equals(e.toString(), "name: message",
+ "The default Error.prototype.toString() behavior must work on supplied name and message");
+
+ Object.defineProperty(e, "name", { value: "new name" });
+ Object.defineProperty(e, "message", { value: "new message" });
+ assert_equals(e.toString(), "new name: new message",
+ "The default Error.prototype.toString() behavior must work on shadowed names and messages");
+}, "toString() behavior from Error.prototype applies as expected");
+
+test(() => {
+ assert_throws(new TypeError(), () => DOMException.prototype.toString());
+}, "DOMException.prototype.toString() applied to DOMException.prototype throws because of name/message brand checks");
+
+test(() => {
+ let stackOnNormalErrors;
+ try {
+ throw new Error("normal error");
+ } catch (e) {
+ stackOnNormalErrors = e.stack;
+ }
+
+ let stackOnDOMException;
+ try {
+ throw new DOMException("message", "name");
+ } catch (e) {
+ stackOnDOMException = e.stack;
+ }
+
+ assert_equals(typeof stackOnDOMException, typeof stackOnNormalErrors, "The typeof values must match");
+}, "If the implementation has a stack property on normal errors, it also does on DOMExceptions");
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker-expected.txt (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,17 @@
+
+PASS Cannot construct without new
+PASS inherits from Error: prototype-side
+PASS does not inherit from Error: class-side
+FAIL message property descriptor assert_false: property is not own expected false got true
+FAIL message getter performs brand checks (i.e. is not [LenientThis] undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(DOMException.prototype, "message").get')
+FAIL name property descriptor assert_false: property is not own expected false got true
+FAIL name getter performs brand checks (i.e. is not [LenientThis] undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(DOMException.prototype, "name").get')
+FAIL code property descriptor assert_false: property is not own expected false got true
+FAIL code getter performs brand checks (i.e. is not [LenientThis] undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(DOMException.prototype, "code").get')
+PASS code property is not affected by shadowing the name property
+PASS Object.prototype.toString behavior is like other interfaces
+FAIL Inherits its toString() from Error.prototype assert_false: toString must not exist on DOMException.prototype expected false got true
+FAIL toString() behavior from Error.prototype applies as expected assert_equals: The default Error.prototype.toString() behavior must work on supplied name and message expected "name: message" but got "name (DOM Exception): message"
+PASS DOMException.prototype.toString() applied to DOMException.prototype throws because of name/message brand checks
+FAIL If the implementation has a stack property on normal errors, it also does on DOMExceptions assert_equals: The typeof values must match expected "string" but got "undefined"
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker.html (from rev 219597, trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html) (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object-expected.txt (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object-expected.txt 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,10 +0,0 @@
-
-FAIL existence and properties of DOMException assert_equals: prototype of self's property "DOMException" is not Error expected function "function Error() {
- [native code]
-}" but got function "function () {
- [native code]
-}"
-PASS existence and properties of DOMException.prototype
-PASS existence of name and code properties on DOMException.prototype
-PASS existence and properties of exception interface prototype object's "constructor" property
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,11 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>DOMException constructor and prototype object</title>
-<script src=""
-<script src=""
-<script src=""
-<div id="log"></div>
-<script>
-setup({ explicit_done: true })
-run_test()
-</script>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,111 +0,0 @@
-function run_test() {
- test(function() {
- // "There MUST exist a property on the ECMAScript global object whose
- // name is “DOMException” and value is an object called the
- // DOMException constructor object, which provides access to legacy
- // DOMException code constants. The property has the attributes
- // { [[Writable]]: true, [[Enumerable]]: false,
- // [[Configurable]]: true }."
- assert_own_property(self, "DOMException",
- "self does not have own property \"DOMException\"");
- var desc = Object.getOwnPropertyDescriptor(self, "DOMException");
- assert_false("get" in desc, "self's property \"DOMException\" has getter");
- assert_false("set" in desc, "self's property \"DOMException\" has setter");
- assert_true(desc.writable, "self's property \"DOMException\" is not writable");
- assert_false(desc.enumerable, "self's property \"DOMException\" is enumerable");
- assert_true(desc.configurable, "self's property \"DOMException\" is not configurable");
-
- // "The DOMException constructor object MUST be a function object but
- // with a [[Prototype]] value of %Error% ([ECMA-262], section 6.1.7.4)."
- assert_equals(Object.getPrototypeOf(self.DOMException), Error,
- "prototype of self's property \"DOMException\" is not Error");
-
- // "Its [[Get]] internal property is set as described in ECMA-262
- // section 9.1.8."
- // Not much to test for this.
- // "Its [[Construct]] internal property is set as described in ECMA-262
- // section 19.2.2.3."
- // "Its @@hasInstance property is set as described in ECMA-262 section
- // 19.2.3.8, unless otherwise specified."
-
- // String() returns something implementation-dependent, because it
- // calls Function#toString.
- assert_class_string(self.DOMException, "Function",
- "class string of DOMException");
-
- // "For every legacy code listed in the error names table, there MUST
- // be a property on the DOMException constructor object whose name and
- // value are as indicated in the table. The property has attributes
- // { [[Writable]]: false, [[Enumerable]]: true,
- // [[Configurable]]: false }."
- // See DOMException-constants.html.
- }, "existence and properties of DOMException");
-
- test(function() {
- assert_own_property(self, "DOMException",
- "self does not have own property \"DOMException\"");
-
- // "The DOMException constructor object MUST also have a property named
- // “prototype” with attributes { [[Writable]]: false,
- // [[Enumerable]]: false, [[Configurable]]: false } whose value is an
- // object called the DOMException prototype object. This object also
- // provides access to the legacy code values."
- assert_own_property(self.DOMException, "prototype",
- 'exception "DOMException" does not have own property "prototype"');
- var desc = Object.getOwnPropertyDescriptor(self.DOMException, "prototype");
- assert_false("get" in desc, "DOMException.prototype has getter");
- assert_false("set" in desc, "DOMException.prototype has setter");
- assert_false(desc.writable, "DOMException.prototype is writable");
- assert_false(desc.enumerable, "DOMException.prototype is enumerable");
- assert_false(desc.configurable, "DOMException.prototype is configurable");
-
- // "The DOMException prototype object MUST have an internal
- // [[Prototype]] property whose value is %ErrorPrototype% ([ECMA-262],
- // section 6.1.7.4)."
- assert_own_property(self, "Error",
- 'should inherit from Error, but self has no such property');
- assert_own_property(self.Error, "prototype",
- 'should inherit from Error, but that object has no "prototype" property');
- assert_equals(Object.getPrototypeOf(self.DOMException.prototype),
- self.Error.prototype,
- 'prototype of DOMException.prototype is not Error.prototype');
-
- // "The class string of the DOMException prototype object is
- // “DOMExceptionPrototype”."
- assert_class_string(self.DOMException.prototype, "DOMExceptionPrototype",
- "class string of DOMException.prototype");
- }, "existence and properties of DOMException.prototype");
-
- test(function() {
- assert_false(self.DOMException.prototype.hasOwnProperty("name"),
- "DOMException.prototype should not have an own \"name\" " +
- "property.");
- assert_false(self.DOMException.prototype.hasOwnProperty("code"),
- "DOMException.prototype should not have an own \"name\" " +
- "property.");
- }, "existence of name and code properties on DOMException.prototype");
-
- test(function() {
- assert_own_property(self, "DOMException",
- "self does not have own property \"DOMException\"");
- assert_own_property(self.DOMException, "prototype",
- 'interface "DOMException" does not have own property "prototype"');
-
- // "There MUST be a property named “constructor” on the DOMException
- // prototype object with attributes { [[Writable]]: true,
- // [[Enumerable]]: false, [[Configurable]]: true } and whose value is
- // the DOMException constructor object."
- assert_own_property(self.DOMException.prototype, "constructor",
- "DOMException" + '.prototype does not have own property "constructor"');
- var desc = Object.getOwnPropertyDescriptor(self.DOMException.prototype, "constructor");
- assert_false("get" in desc, "DOMException.prototype.constructor has getter");
- assert_false("set" in desc, "DOMException.prototype.constructor has setter");
- assert_true(desc.writable, "DOMException.prototype.constructor is not writable");
- assert_false(desc.enumerable, "DOMException.prototype.constructor is enumerable");
- assert_true(desc.configurable, "DOMException.prototype.constructor in not configurable");
- assert_equals(self.DOMException.prototype.constructor, self.DOMException,
- "DOMException.prototype.constructor is not the same object as DOMException");
- }, "existence and properties of exception interface prototype object's \"constructor\" property");
-
- done();
-}
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker-expected.txt (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker-expected.txt 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,10 +0,0 @@
-
-FAIL existence and properties of DOMException assert_equals: prototype of self's property "DOMException" is not Error expected function "function Error() {
- [native code]
-}" but got function "function () {
- [native code]
-}"
-PASS existence and properties of DOMException.prototype
-PASS existence of name and code properties on DOMException.prototype
-PASS existence and properties of exception interface prototype object's "constructor" property
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1 +0,0 @@
-<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,3 +0,0 @@
-importScripts("/resources/testharness.js")
-importScripts("constructor-object.js")
-run_test();
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions-expected.txt (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions-expected.txt 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -1,20 +1,14 @@
PASS Object.getPrototypeOf(exception) === DOMException.prototype
-PASS exception.hasOwnProperty("name")
+FAIL exception.hasOwnProperty("name") assert_false: expected false got true
+FAIL exception.hasOwnProperty("message") assert_false: expected false got true
PASS exception.name === "HierarchyRequestError"
-FAIL Object.getOwnPropertyDescriptor(exception, "name") assert_true: must be writable expected true got undefined
-FAIL Object.getOwnPropertyDescriptor(exception, "message") assert_true: must be writable expected true got undefined
-PASS typeof exception.message === "string"
+PASS exception.code === DOMException.HIERARCHY_REQUEST_ERR
PASS Object.prototype.toString.call(exception) === "[object DOMException]"
-PASS exception.code === DOMException.HIERARCHY_REQUEST_ERR
-FAIL Object.getOwnPropertyDescriptor(exception, "code") assert_true: must be writable expected true got undefined
PASS In iframe: Object.getPrototypeOf(exception) === DOMException.prototype
-PASS In iframe: exception.hasOwnProperty("name")
+FAIL In iframe: exception.hasOwnProperty("name") assert_false: expected false got true
+FAIL In iframe: exception.hasOwnProperty("message") assert_false: expected false got true
PASS In iframe: exception.name === "HierarchyRequestError"
-FAIL In iframe: Object.getOwnPropertyDescriptor(exception, "name") assert_true: must be writable expected true got undefined
-FAIL In iframe: Object.getOwnPropertyDescriptor(exception, "message") assert_true: must be writable expected true got undefined
-PASS In iframe: typeof exception.message === "string"
+PASS In iframe: exception.code === DOMException.HIERARCHY_REQUEST_ERR
PASS In iframe: Object.prototype.toString.call(exception) === "[object DOMException]"
-PASS In iframe: exception.code === DOMException.HIERARCHY_REQUEST_ERR
-FAIL In iframe: Object.getOwnPropertyDescriptor(exception, "code") assert_true: must be writable expected true got undefined
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -20,10 +20,6 @@
setup({explicit_done: true});
function testException(exception, global, desc) {
- // https://heycam.github.io/webidl/#es-exception-objects
- // (as of 2015-01-03): "The value of the internal [[Prototype]] property of a
- // DOMException object MUST be the DOMException prototype object from the
- // global environment the exception object is associated with."
test(function() {
assert_equals(global.Object.getPrototypeOf(exception),
global.DOMException.prototype);
@@ -30,13 +26,12 @@
}, desc + "Object.getPrototypeOf(exception) === DOMException.prototype");
- // https://heycam.github.io/webidl/#es-creating-throwing-exceptions
- // (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
- // passing “name”, Property Descriptor { [[Value]]: /N/, [[Writable]]: true,
- // [[Enumerable]]: true, [[Configurable]]: true }, and false as arguments."
test(function() {
- assert_true(exception.hasOwnProperty("name"));
+ assert_false(exception.hasOwnProperty("name"));
}, desc + "exception.hasOwnProperty(\"name\")");
+ test(function() {
+ assert_false(exception.hasOwnProperty("message"));
+ }, desc + "exception.hasOwnProperty(\"message\")");
test(function() {
assert_equals(exception.name, "HierarchyRequestError");
@@ -43,67 +38,13 @@
}, desc + "exception.name === \"HierarchyRequestError\"");
test(function() {
- var desc = global.Object.getOwnPropertyDescriptor(exception, "name");
- assert_true(desc.writable, "must be writable");
- assert_true(desc.enumerable, "must be enumerable");
- assert_true(desc.configurable, "must be configurable");
- }, desc + "Object.getOwnPropertyDescriptor(exception, \"name\")");
+ assert_equals(exception.code, global.DOMException.HIERARCHY_REQUEST_ERR);
+ }, desc + "exception.code === DOMException.HIERARCHY_REQUEST_ERR");
-
- // https://heycam.github.io/webidl/#es-creating-throwing-exceptions
- // (as of 2015-01-03): "If the optional user agent-defined message /M/ was
- // specified, then this list has a single element whose value is the result
- // of converting /M/ to a String value. Otherwise, the list is empty."
- //
- // https://heycam.github.io/webidl/#es-DOMException-constructor-object
- // (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
- // passing “message”, Property Descriptor { [[Value]]: /S/,
- // [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }, and
- // false as arguments."
test(function() {
- if (exception.hasOwnProperty("message")) {
- var desc = global.Object.getOwnPropertyDescriptor(exception, "message");
- assert_true(desc.writable, "must be writable");
- assert_false(desc.enumerable, "must not be enumerable");
- assert_true(desc.configurable, "must be configurable");
- }
- }, desc + "Object.getOwnPropertyDescriptor(exception, \"message\")");
-
- test(function() {
- if (exception.hasOwnProperty("message")) {
- // Can't test anything more specific, since it's implementation-defined :(
- assert_equals(typeof exception.message, "string");
- } else {
- // Error.prototype.message
- assert_equals(exception.message, "");
- }
- }, desc + "typeof exception.message === \"string\"");
-
-
- // https://heycam.github.io/webidl/#es-exception-objects
- // (as of 2015-01-03): "The class string of a DOMException object MUST be
- // “DOMException”."
- test(function() {
assert_equals(global.Object.prototype.toString.call(exception),
"[object DOMException]");
}, desc + "Object.prototype.toString.call(exception) === \"[object DOMException]\"");
-
-
- // https://heycam.github.io/webidl/#es-creating-throwing-exceptions
- // (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
- // passing “code”, Property Descriptor { [[Value]]: /code/,
- // [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }, and
- // false as arguments."
- test(function() {
- assert_equals(exception.code, global.DOMException.HIERARCHY_REQUEST_ERR);
- }, desc + "exception.code === DOMException.HIERARCHY_REQUEST_ERR");
-
- test(function() {
- var desc = global.Object.getOwnPropertyDescriptor(exception, "name");
- assert_true(desc.writable, "must be writable");
- assert_true(desc.enumerable, "must be enumerable");
- assert_true(desc.configurable, "must be configurable");
- }, desc + "Object.getOwnPropertyDescriptor(exception, \"code\")");
}
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/w3c-import.log (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/w3c-import.log 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/w3c-import.log 2017-07-18 03:35:46 UTC (rev 219598)
@@ -14,9 +14,8 @@
None
------------------------------------------------------------------------
List of files:
-/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
-/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html
-/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.html
-/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.js
-/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js
+/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.any.js
+/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js
+/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js
+/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js
/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/exceptions.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object-expected.txt (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object-expected.txt 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,6 @@
+
+FAIL Test [[DefineOwnProperty]] with no indexed property setter support. assert_throws: function "() =>
+ Object.defineProperty(domTokenList, "0", {value: true, writable: true})" did not throw
+FAIL Test [[DefineOwnProperty]] with indexed property setter support. assert_throws: function "() =>
+ Object.defineProperty(select, "0", {get: () => {}})" did not throw
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object.html (0 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object.html 2017-07-18 03:35:46 UTC (rev 219598)
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Legacy platform objects</title>
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script>
+function assert_prop_desc_equals(object, property_key, expected) {
+ let actual = Object.getOwnPropertyDescriptor(object, property_key);
+ if (expected === undefined) {
+ assert_equals(
+ actual, undefined,
+ "(assert_prop_desc_equals: no property descriptor expected)");
+ return;
+ }
+ for (p in actual) {
+ assert_true(
+ expected.hasOwnProperty(p),
+ "(assert_prop_desc_equals: property '" + p + "' is not expected)");
+ assert_equals(
+ actual[p], expected[p],
+ "(assert_prop_desc_equals: property '" + p + "')");
+ }
+ for (p in expected) {
+ assert_true(
+ actual.hasOwnProperty(p),
+ "(assert_prop_desc_equals: expected property '" + p + "' missing)");
+ }
+}
+
+// https://heycam.github.io/webidl/#legacy-platform-object-defineownproperty
+// 3.9.3. [[DefineOwnProperty]]
+
+test(function() {
+ let span = document.createElement("span");
+ span.className = "foo";
+ // DOMTokenList supports an indexed property getter but not a setter.
+ let domTokenList = span.classList;
+ // Confirm the test settings.
+ assert_equals(domTokenList.length, 1);
+ assert_prop_desc_equals(domTokenList, "0",
+ {value: "foo", writable: false, enumerable: true,
+ configurable: true});
+ assert_prop_desc_equals(domTokenList, "1", undefined);
+ // Actual test
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(domTokenList, "0", {value: true, writable: true}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(domTokenList, "1", {value: true, writable: true}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(domTokenList, "0", {get: () => {}}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(domTokenList, "0", {set: () => {}}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(domTokenList, "1", {get: () => {}}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(domTokenList, "1", {set: () => {}}));
+ assert_equals(domTokenList[0], "foo");
+ assert_equals(domTokenList[1], undefined);
+ domTokenList[0] = "bar";
+ domTokenList[1] = "bar";
+ assert_equals(domTokenList[0], "foo");
+ assert_equals(domTokenList[1], undefined);
+ assert_throws(new TypeError(), () => {
+ "use strict";
+ domTokenList[0] = "bar";
+ });
+ assert_throws(new TypeError(), () => {
+ "use strict";
+ domTokenList[1] = "bar";
+ });
+ // Nothing must change after all.
+ assert_equals(domTokenList.length, 1);
+ assert_prop_desc_equals(domTokenList, "0",
+ {value: "foo", writable: false, enumerable: true,
+ configurable: true});
+ assert_prop_desc_equals(domTokenList, "1", undefined);
+}, "Test [[DefineOwnProperty]] with no indexed property setter support.");
+
+test(function() {
+ // HTMLSelectElement supports an indexed property setter.
+ let select = document.createElement("select");
+ let option0 = document.createElement("option");
+ let option1 = document.createElement("option");
+ // Confirm the test settings.
+ assert_equals(select.length, 0);
+ assert_prop_desc_equals(select, "0", undefined);
+ // Try to define an accessor property with non supported property index.
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(select, "0", {get: () => {}}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(select, "0", {set: () => {}}));
+ assert_prop_desc_equals(select, "0", undefined);
+ // writable, enumerable, configurable will be ignored.
+ Object.defineProperty(select, "0", {value: option0, writable: false,
+ enumerable: false, configurable: false});
+ assert_prop_desc_equals(select, "0",
+ {value: option0, writable: true, enumerable: true,
+ configurable: true});
+ select[1] = option1;
+ assert_prop_desc_equals(select, "1",
+ {value: option1, writable: true, enumerable: true,
+ configurable: true});
+ // Try to define an accessor property with a supported property index.
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(select, "0", {get: () => {}}));
+ assert_throws(new TypeError(), () =>
+ Object.defineProperty(select, "0", {set: () => {}}));
+ assert_prop_desc_equals(select, "0",
+ {value: option0, writable: true, enumerable: true,
+ configurable: true});
+}, "Test [[DefineOwnProperty]] with indexed property setter support.");
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/w3c-import.log (219597 => 219598)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/w3c-import.log 2017-07-18 02:43:07 UTC (rev 219597)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/w3c-import.log 2017-07-18 03:35:46 UTC (rev 219598)
@@ -18,5 +18,6 @@
/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/interface-object.html
/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-object.html
/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-callback-interface-object.html
+/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/legacy-platform-object.html
/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/put-forwards.html
/LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/sequence-conversion.html