Title: [269968] trunk/LayoutTests
Revision
269968
Author
[email protected]
Date
2020-11-18 10:35:12 -0800 (Wed, 18 Nov 2020)

Log Message

Tests for the <model> element should be in a dedicated top-level directory
https://bugs.webkit.org/show_bug.cgi?id=219077

Reviewed by Dean Jackson.

Move the tests for the <model> element from system-preview/model to the top-level model-element directory.
Tests under this directory run only on macOS and iOS following where the ENABLE_MODEL_ELEMENT is defined.

* TestExpectations:
* model-element/model-element-expected.txt: Renamed from LayoutTests/system-preview/model/model-element-expected.txt.
* model-element/model-element-source-expected.txt: Renamed from LayoutTests/system-preview/model/model-element-source-expected.txt.
* model-element/model-element-source.html: Renamed from LayoutTests/system-preview/model/model-element-source.html.
* model-element/model-element.html: Renamed from LayoutTests/system-preview/model/model-element.html.
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Added Paths

Removed Paths

  • trunk/LayoutTests/system-preview/model/

Diff

Modified: trunk/LayoutTests/ChangeLog (269967 => 269968)


--- trunk/LayoutTests/ChangeLog	2020-11-18 18:14:29 UTC (rev 269967)
+++ trunk/LayoutTests/ChangeLog	2020-11-18 18:35:12 UTC (rev 269968)
@@ -1,3 +1,21 @@
+2020-11-18  Antoine Quint  <[email protected]>
+
+        Tests for the <model> element should be in a dedicated top-level directory
+        https://bugs.webkit.org/show_bug.cgi?id=219077
+
+        Reviewed by Dean Jackson.
+
+        Move the tests for the <model> element from system-preview/model to the top-level model-element directory.
+        Tests under this directory run only on macOS and iOS following where the ENABLE_MODEL_ELEMENT is defined.
+
+        * TestExpectations:
+        * model-element/model-element-expected.txt: Renamed from LayoutTests/system-preview/model/model-element-expected.txt.
+        * model-element/model-element-source-expected.txt: Renamed from LayoutTests/system-preview/model/model-element-source-expected.txt.
+        * model-element/model-element-source.html: Renamed from LayoutTests/system-preview/model/model-element-source.html.
+        * model-element/model-element.html: Renamed from LayoutTests/system-preview/model/model-element.html.
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2020-11-18  Chris Dumez  <[email protected]>
 
         Unskip a few WebAudio tests that are no longer failing on Rosetta since r269853.

Modified: trunk/LayoutTests/TestExpectations (269967 => 269968)


--- trunk/LayoutTests/TestExpectations	2020-11-18 18:14:29 UTC (rev 269967)
+++ trunk/LayoutTests/TestExpectations	2020-11-18 18:35:12 UTC (rev 269968)
@@ -70,6 +70,7 @@
 http/tests/gzip-content-encoding [ Skip ]
 http/tests/cookies/same-site [ Skip ]
 http/tests/ssl/curl [ Skip ]
+model-element [ Skip ]
 system-preview [ Skip ]
 pointerevents/ios [ Skip ]
 editing/pasteboard/dom-paste [ Skip ]

Copied: trunk/LayoutTests/model-element/model-element-expected.txt (from rev 269967, trunk/LayoutTests/system-preview/model/model-element-expected.txt) (0 => 269968)


--- trunk/LayoutTests/model-element/model-element-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/model-element/model-element-expected.txt	2020-11-18 18:35:12 UTC (rev 269968)
@@ -0,0 +1,4 @@
+
+PASS HTMLModelElement is exposed on Window.
+PASS document.createElement('model') returns an HTMLModelElement object.
+

Copied: trunk/LayoutTests/model-element/model-element-source-expected.txt (from rev 269967, trunk/LayoutTests/system-preview/model/model-element-source-expected.txt) (0 => 269968)


--- trunk/LayoutTests/model-element/model-element-source-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/model-element/model-element-source-expected.txt	2020-11-18 18:35:12 UTC (rev 269968)
@@ -0,0 +1,12 @@
+
+PASS The HTMLModelElement interface has a currentSrc property.
+PASS The currentSrc property is read-only.
+PASS The currentSrc property is the empty string when no <source> is provided.
+PASS The currentSrc property is the empty string when a <source> is provided with no src attribute.
+PASS The currentSrc property is the empty string when a <source> is provided.
+PASS Changing the src attribute of a <source> changes the currentSrc property.
+PASS Removing the <source> changes the currentSrc property.
+PASS currentSrc returns the src value for the first <source> element.
+PASS Removing a <source> element updates currentSrc.
+PASS Adding a <source> before the current <source> updates currentSrc.
+

Copied: trunk/LayoutTests/model-element/model-element-source.html (from rev 269967, trunk/LayoutTests/system-preview/model/model-element-source.html) (0 => 269968)


--- trunk/LayoutTests/model-element/model-element-source.html	                        (rev 0)
+++ trunk/LayoutTests/model-element/model-element-source.html	2020-11-18 18:35:12 UTC (rev 269968)
@@ -0,0 +1,81 @@
+<script src=""
+<script src=""
+<script>
+
+const makeSource = src ="" {
+    const source = document.createElement("source");
+    source.src = ""
+    return source;
+}
+
+test(() => {
+    assert_idl_attribute(document.createElement("model"), "currentSrc");
+}, "The HTMLModelElement interface has a currentSrc property.");
+
+test(() => {
+    assert_readonly(document.createElement("model"), "currentSrc");
+}, "The currentSrc property is read-only.");
+
+test(() => {
+    assert_equals(document.createElement("model").currentSrc, "");
+}, "The currentSrc property is the empty string when no <source> is provided.");
+
+test(() => {
+    const model = document.createElement("model");
+    model.appendChild(makeSource(""));
+    assert_equals(model.currentSrc, "");
+}, "The currentSrc property is the empty string when a <source> is provided with no src attribute.");
+
+test(() => {
+    const model = document.createElement("model");
+    const source = model.appendChild(makeSource("model.usdz"));
+    assert_equals(model.currentSrc, source.src);
+}, "The currentSrc property is the empty string when a <source> is provided.");
+
+test(() => {
+    const model = document.createElement("model");
+    const source = model.appendChild(makeSource(""));
+    assert_equals(model.currentSrc, "");
+
+    source.src = ""
+    assert_equals(model.currentSrc, source.src);
+}, "Changing the src attribute of a <source> changes the currentSrc property.");
+
+test(() => {
+    const model = document.createElement("model");
+    const source = model.appendChild(makeSource("model.usdz"));
+    assert_equals(model.currentSrc, source.src);
+
+    source.remove();
+    assert_equals(model.currentSrc, "");
+}, "Removing the <source> changes the currentSrc property.");
+
+test(() => {
+    const model = document.createElement("model");
+    const firstSource = model.appendChild(makeSource("model-1.usdz"));
+    const secondSource = model.appendChild(makeSource("model-2.usdz"));
+    assert_equals(model.currentSrc, firstSource.src);
+}, "currentSrc returns the src value for the first <source> element.");
+
+test(() => {
+    const model = document.createElement("model");
+    const firstSource = model.appendChild(makeSource("model-1.usdz"));
+    const secondSource = model.appendChild(makeSource("model-2.usdz"));
+    assert_equals(model.currentSrc, firstSource.src);
+
+    firstSource.remove();
+    assert_equals(model.currentSrc, secondSource.src);
+}, "Removing a <source> element updates currentSrc.");
+
+test(() => {
+    const model = document.createElement("model");
+    const initialSource = model.appendChild(makeSource("model-initial.usdz"));
+    assert_equals(model.currentSrc, initialSource.src);
+
+    const secondSource = model.insertBefore(makeSource("model-initial.usdz"), initialSource);
+    assert_equals(model.currentSrc, secondSource.src);
+}, "Adding a <source> before the current <source> updates currentSrc.");
+
+</script>
+</body>
+</html>

Copied: trunk/LayoutTests/model-element/model-element.html (from rev 269967, trunk/LayoutTests/system-preview/model/model-element.html) (0 => 269968)


--- trunk/LayoutTests/model-element/model-element.html	                        (rev 0)
+++ trunk/LayoutTests/model-element/model-element.html	2020-11-18 18:35:12 UTC (rev 269968)
@@ -0,0 +1,17 @@
+<script src=""
+<script src=""
+<script>
+
+test(() => {
+    assert_own_property(window, "HTMLModelElement");
+}, "HTMLModelElement is exposed on Window.");
+
+test(() => {
+    const model = document.createElement("model");
+    assert_true(model instanceof HTMLModelElement);
+    assert_class_string(model, "HTMLModelElement");
+}, "document.createElement('model') returns an HTMLModelElement object.");
+
+</script>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios/TestExpectations (269967 => 269968)


--- trunk/LayoutTests/platform/ios/TestExpectations	2020-11-18 18:14:29 UTC (rev 269967)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2020-11-18 18:35:12 UTC (rev 269968)
@@ -14,7 +14,9 @@
 editing/input/cocoa [ Pass ]
 http/tests/quicklook [ Pass ]
 media/ios [ Pass ]
+model-element [ Pass ]
 quicklook [ Pass ]
+system-preview [ Pass ]
 swipe [ Pass ]
 http/tests/swipe [ Pass ]
 
@@ -3083,8 +3085,6 @@
 # FIXME: Mark as Pass once <rdar://problem/47165939> is fixed.
 http/tests/cookies/only-accept-first-party-cookies.html [ Skip ]
 
-system-preview [ Pass ]
-
 editing/selection/character-granularity-rect.html [ Pass ]
 
 # < iOS12 doesn't support the CG needed for Conic Gradients

Modified: trunk/LayoutTests/platform/mac/TestExpectations (269967 => 269968)


--- trunk/LayoutTests/platform/mac/TestExpectations	2020-11-18 18:14:29 UTC (rev 269967)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2020-11-18 18:35:12 UTC (rev 269968)
@@ -15,7 +15,7 @@
 fast/dom/Range/mac [ Pass ]
 fast/scrolling/latching [ Pass ]
 media/mac [ Pass ]
-system-preview/model [ Pass ]
+model-element [ Pass ]
 
 fast/forms/search/search-padding-cancel-results-buttons.html [ Pass ]
 fast/forms/search/search-results-hidden-crash.html [ Pass ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to