Title: [289668] trunk/LayoutTests
- Revision
- 289668
- Author
- [email protected]
- Date
- 2022-02-11 13:43:19 -0800 (Fri, 11 Feb 2022)
Log Message
[model] rewrite http/tests/model/model-document.html using testharness.js
https://bugs.webkit.org/show_bug.cgi?id=236494
Reviewed by Dean Jackson.
* http/tests/model/model-document-expected.txt:
* http/tests/model/model-document.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (289667 => 289668)
--- trunk/LayoutTests/ChangeLog 2022-02-11 21:39:33 UTC (rev 289667)
+++ trunk/LayoutTests/ChangeLog 2022-02-11 21:43:19 UTC (rev 289668)
@@ -1,3 +1,13 @@
+2022-02-11 Antoine Quint <[email protected]>
+
+ [model] rewrite http/tests/model/model-document.html using testharness.js
+ https://bugs.webkit.org/show_bug.cgi?id=236494
+
+ Reviewed by Dean Jackson.
+
+ * http/tests/model/model-document-expected.txt:
+ * http/tests/model/model-document.html:
+
2022-02-11 Alan Bujtas <[email protected]>
css/css-writing-modes/direction-propagation-body-contain-root.html asserts
Modified: trunk/LayoutTests/http/tests/model/model-document-expected.txt (289667 => 289668)
--- trunk/LayoutTests/http/tests/model/model-document-expected.txt 2022-02-11 21:39:33 UTC (rev 289667)
+++ trunk/LayoutTests/http/tests/model/model-document-expected.txt 2022-02-11 21:43:19 UTC (rev 289668)
@@ -1,5 +1,4 @@
-Basic ModelDocument test.
-PASS: <model> and <source> seen in iframe.
+PASS Loading a standalone model resource creates a standalone <model> document.
Modified: trunk/LayoutTests/http/tests/model/model-document.html (289667 => 289668)
--- trunk/LayoutTests/http/tests/model/model-document.html 2022-02-11 21:39:33 UTC (rev 289667)
+++ trunk/LayoutTests/http/tests/model/model-document.html 2022-02-11 21:43:19 UTC (rev 289668)
@@ -1,38 +1,21 @@
+<!doctype html>
<html>
-<head>
+<body>
+<script src=""
+<script src=""
<script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
- function run()
- {
- const frame = document.createElement("iframe");
- frame.addEventListener("load", function () {
- const output = document.getElementById("output");
- const model = frame.contentDocument.querySelector("model");
- const source = frame.contentDocument.querySelector("model source");
- if (!model)
- output.textContent = "FAIL: <model> not seen in iframe.";
- else if (!source)
- output.textContent = "FAIL: <model> found, but no <source> child.";
- else
- output.textContent = "PASS: <model> and <source> seen in iframe.";
+promise_test(async test => {
+ const frame = document.createElement("iframe");
+ frame.src = ""
+ document.body.appendChild(frame);
- if (window.testRunner)
- testRunner.notifyDone();
- });
- frame.src = ""
- document.body.appendChild(frame);
- }
- window.addEventListener("load", run, false);
+ await new Promise(resolve => frame.addEventListener("load", resolve, { once: true }));
+
+ assert_true(!!frame.contentDocument.querySelector("model"), "The frame contains a <model> element");
+ assert_true(!!frame.contentDocument.querySelector("model source"), "The <model> element contains a <source> element");
+}, "Loading a standalone model resource creates a standalone <model> document.");
+
</script>
-</head>
-<body>
-<p>
-Basic ModelDocument test.
-<p>
-<p id="output"></p>
</body>
</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes