Title: [204623] trunk/LayoutTests/imported/w3c
Revision
204623
Author
[email protected]
Date
2016-08-18 19:37:52 -0700 (Thu, 18 Aug 2016)

Log Message

Re-sync DOM web platform tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=160980

Reviewed by Ryosuke Niwa.

Re-sync DOM web platform tests from upstream.

* web-platform-tests/dom/events/Event-initEvent-expected.txt:
* web-platform-tests/dom/events/Event-initEvent.html:
* web-platform-tests/dom/events/Event-propagation-expected.txt:
* web-platform-tests/dom/events/Event-propagation.html:
* web-platform-tests/dom/nodes/Node-properties.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-08-19 02:37:52 UTC (rev 204623)
@@ -1,5 +1,20 @@
 2016-08-18  Chris Dumez  <[email protected]>
 
+        Re-sync DOM web platform tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=160980
+
+        Reviewed by Ryosuke Niwa.
+
+        Re-sync DOM web platform tests from upstream.
+
+        * web-platform-tests/dom/events/Event-initEvent-expected.txt:
+        * web-platform-tests/dom/events/Event-initEvent.html:
+        * web-platform-tests/dom/events/Event-propagation-expected.txt:
+        * web-platform-tests/dom/events/Event-propagation.html:
+        * web-platform-tests/dom/nodes/Node-properties.html:
+
+2016-08-18  Chris Dumez  <[email protected]>
+
         Align our encoding labels with the encoding specification
         https://bugs.webkit.org/show_bug.cgi?id=160931
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-initEvent-expected.txt (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-initEvent-expected.txt	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-initEvent-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
@@ -7,5 +7,6 @@
 PASS Calling initEvent multiple times (not getting type). 
 PASS Calling initEvent must not have an effect during dispatching. 
 PASS Calling initEvent must unset the stop propagation flag. 
+PASS Calling initEvent must unset the stop immediate propagation flag. 
 PASS Calling initEvent during propagation. 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-initEvent.html (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-initEvent.html	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-initEvent.html	2016-08-19 02:37:52 UTC (rev 204623)
@@ -13,7 +13,7 @@
       e.initEvent("type", bubbles, cancelable)
 
       // Step 3.
-      // Can't test the stop propagation flag and stop immediate propagation flag.
+      // Stop (immediate) propagation flag is tested later
       assert_equals(e.defaultPrevented, false, "defaultPrevented")
       // Step 4.
       assert_equals(e.isTrusted, false, "isTrusted")
@@ -78,31 +78,28 @@
   this.done()
 }, "Calling initEvent must not have an effect during dispatching.")
 
-async_test(function() {
+test(function() {
   var e = document.createEvent("Event")
+  e.stopPropagation()
   e.initEvent("type", false, false)
-  e.stopPropagation()
-
   var target = document.createElement("div")
-  target.addEventListener("type", this.step_func(function() {
-    assert_unreached("")
-  }), false)
-  assert_equals(target.dispatchEvent(e), true, "dispatchEvent must return true")
-  assert_equals(target.dispatchEvent(e), true, "dispatchEvent must return true")
+  var called = false
+  target.addEventListener("type", function() { called = true }, false)
+  assert_true(target.dispatchEvent(e), "dispatchEvent must return true")
+  assert_true(called, "Listener must be called")
+}, "Calling initEvent must unset the stop propagation flag.")
 
+test(function() {
+  var e = document.createEvent("Event")
+  e.stopImmediatePropagation()
   e.initEvent("type", false, false)
+  var target = document.createElement("div")
   var called = false
-  var target = document.createElement("div")
-  target.addEventListener("type", this.step_func(function() {
-    called = true
-  }), false)
-  assert_false(called)
-  assert_equals(target.dispatchEvent(e), true, "dispatchEvent must return true")
-  assert_true(called)
+  target.addEventListener("type", function() { called = true }, false)
+  assert_true(target.dispatchEvent(e), "dispatchEvent must return true")
+  assert_true(called, "Listener must be called")
+}, "Calling initEvent must unset the stop immediate propagation flag.")
 
-  this.done()
-}, "Calling initEvent must unset the stop propagation flag.")
-
 async_test(function() {
   var e = document.createEvent("Event")
   e.initEvent("type", false, false)

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation-expected.txt (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation-expected.txt	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
@@ -1,7 +1,7 @@
 
 PASS Newly-created Event 
-PASS After stopPropagation() 
+FAIL After stopPropagation() assert_equals: Propagation flag after first dispatch expected true but got false
 PASS Reinitialized after stopPropagation() 
-PASS After stopImmediatePropagation() 
+FAIL After stopImmediatePropagation() assert_equals: Propagation flag after first dispatch expected true but got false
 PASS Reinitialized after stopImmediatePropagation() 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation.html (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation.html	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation.html	2016-08-19 02:37:52 UTC (rev 204623)
@@ -13,10 +13,11 @@
     var callback = function() { called = true };
     document.head.addEventListener("foo", callback);
     document.head.dispatchEvent(ev);
-    // Gecko resets the flags after dispatching; it will happily dispatch
+    assert_equals(called, expected, "Propagation flag");
+    // dispatchEvent resets the propagation flags so it will happily dispatch
     // the event the second time around.
     document.head.dispatchEvent(ev);
-    assert_equals(called, expected, "Propagation flag");
+    assert_equals(called, true, "Propagation flag after first dispatch");
     document.head.removeEventListener("foo", callback);
   }, desc);
 }

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties-expected.txt (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties-expected.txt	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties-expected.txt	2016-08-19 02:37:52 UTC (rev 204623)
@@ -242,7 +242,7 @@
 PASS xmlElement.previousSibling 
 PASS xmlElement.nextSibling 
 PASS xmlElement.textContent 
-FAIL xmlElement.namespaceURI assert_equals: expected (string) "http://www.w3.org/1999/xhtml" but got (object) null
+PASS xmlElement.namespaceURI 
 PASS xmlElement.prefix 
 PASS xmlElement.localName 
 PASS xmlElement.tagName 
@@ -267,7 +267,7 @@
 PASS detachedXmlElement.previousSibling 
 PASS detachedXmlElement.nextSibling 
 PASS detachedXmlElement.textContent 
-FAIL detachedXmlElement.namespaceURI assert_equals: expected (string) "http://www.w3.org/1999/xhtml" but got (object) null
+PASS detachedXmlElement.namespaceURI 
 PASS detachedXmlElement.prefix 
 PASS detachedXmlElement.localName 
 PASS detachedXmlElement.tagName 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties.html (204622 => 204623)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties.html	2016-08-19 01:41:06 UTC (rev 204622)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties.html	2016-08-19 02:37:52 UTC (rev 204623)
@@ -226,7 +226,7 @@
         textContent: "do re mi fa so la ti",
 
         // Element
-        namespaceURI: "http://www.w3.org/1999/xhtml",
+        namespaceURI: null,
         prefix: null,
         localName: "igiveuponcreativenames",
         tagName: "igiveuponcreativenames",
@@ -246,7 +246,7 @@
         textContent: "",
 
         // Element
-        namespaceURI: "http://www.w3.org/1999/xhtml",
+        namespaceURI: null,
         prefix: null,
         localName: "everyone-hates-hyphenated-element-names",
         tagName: "everyone-hates-hyphenated-element-names",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to