summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/presentation-api/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/presentation-api/README.md
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/presentation-api/README.md')
-rw-r--r--testing/web-platform/tests/presentation-api/README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/presentation-api/README.md b/testing/web-platform/tests/presentation-api/README.md
new file mode 100644
index 0000000000..417769a498
--- /dev/null
+++ b/testing/web-platform/tests/presentation-api/README.md
@@ -0,0 +1,28 @@
+# Presentation API Tests
+
+This test suite is currently tracking the [Editor's Draft][editor-draft] of the Presentation API. The Presentation API describes the [conformance criteria for two classes of user agents][conformance-classes] ([controlling user agent][dfn-controlling-user-agent] and [receiving user agent][dfn-receiving-user-agent]). Each of the two subfolders [controlling-ua](./controlling-ua) and [receiving-ua](./receiving-ua) contains the Presentation API tests for each class of user agents.
+
+## IDL Tests
+
+The [controlling-ua](./controlling-ua) and [receiving-ua](./receiving-ua) subfolders contain files `idlharness.https.html` and `idlharness-manual.https.html` that define IDL tests of the Presentation API for controlling and receiving user agents, respectively. The WebIDL of the Presentation API spec is extracted from the [Editor's Draft][editor-draft] by running the following JavaScript code in the Dev. console of the Browser.
+
+```javascript
+(function(){
+ var s = "";
+ [].forEach.call(document.getElementsByClassName("idl"), function(idl) {
+ if (!idl.classList.contains("extract"))
+ s += idl.textContent + "\n\n";
+ });
+ document.body.innerHTML = '<pre></pre>';
+ document.body.firstChild.textContent = s;
+ })();
+```
+
+## Receiving User Agent Tests
+
+The [receiving-ua](./receiving-ua) subfolder contains receiving user agent tests to be initiated by _a controlling user agent_. When the controlling user agent starts the test, it will ask a user to click a button and choose a presentation display. Once the presentation display is selected, the controlling user agent will request the receiving user agent to load and run the corresponding test placed in the [receiving-ua/support](./receiving-ua/support) subfolder. When the test ends, all results will appear on the controlling user agent's window.
+
+[editor-draft]: http://w3c.github.io/presentation-api/
+[conformance-classes]: http://w3c.github.io/presentation-api/#conformance-classes
+[dfn-controlling-user-agent]: http://w3c.github.io/presentation-api/#dfn-controlling-user-agent
+[dfn-receiving-user-agent]: http://w3c.github.io/presentation-api/#dfn-receiving-user-agent \ No newline at end of file