Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions quest/m0/interop-green/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Interop and Video pass on main
# [XS] Interop and Video pass on main

## Goal

Expand All @@ -24,11 +24,7 @@ Already owned: the intermittent media-matrix timestamp-gap cells
[test flakes](/quest/m0/test-flakes-2/README.md), with
[moq-dev/moq#6990](https://github.com/moq-dev/moq/pull/6990) open.

This README's own work, after the children: confirm a scheduled Interop
Every child has landed. What remains: confirm a scheduled Interop
and Video run each pass.

Public API: none. Wire: none.

## Required

- [Browser tests expect current behavior](/quest/m0/interop-green/stale-browser-tests.md) - the renderer and element version tests match the shipped validation and version list
25 changes: 0 additions & 25 deletions quest/m0/interop-green/stale-browser-tests.md

This file was deleted.

10 changes: 5 additions & 5 deletions test/interop/clients/js/publish-ui.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ test("version lists keep their defaults and explicit false booleans round-trip",
await customElements.whenDefined("moq-watch");
const watch = document.createElement("moq-watch");
const versions = [];
for (const value of ["moq-transport-14", " moq-lite-06 , moq-transport-22 ", "", " , ", null]) {
for (const value of ["moq-transport-18", " moq-lite-06 , moq-transport-22 ", "", " , ", null]) {
if (value === null) watch.removeAttribute("versions");
else watch.setAttribute("versions", value);
versions.push(watch.versions);
Expand All @@ -593,7 +593,7 @@ test("version lists keep their defaults and explicit false booleans round-trip",
return { versions, follow };
});
expect(result).toEqual({
versions: [["moq-transport-14"], ["moq-lite-06", "moq-transport-22"], undefined, undefined, undefined],
versions: [["moq-transport-18"], ["moq-lite-06", "moq-transport-22"], undefined, undefined, undefined],
follow: false,
});
} finally {
Expand Down Expand Up @@ -643,7 +643,7 @@ test("version lists refuse unsupported, duplicate, and empty lists and snapshot
return error instanceof TypeError && element.versions === undefined;
}
});
const list = ["moq-lite-06", "moq-transport-14"];
const list = ["moq-lite-06", "moq-transport-18"];
element.versions = list;
list.push("moq-lite-05");
const snapshot = element.versions;
Expand All @@ -661,8 +661,8 @@ test("version lists refuse unsupported, duplicate, and empty lists and snapshot
tag: result.tag,
markup: [true, true],
thrown: [true, true, true],
snapshot: ["moq-lite-06", "moq-transport-14"],
reflected: "moq-lite-06,moq-transport-14",
snapshot: ["moq-lite-06", "moq-transport-18"],
reflected: "moq-lite-06,moq-transport-18",
});
} finally {
await browser.close();
Expand Down
32 changes: 21 additions & 11 deletions test/video/renderer.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,37 +120,47 @@ test("<moq-publish> swaps its canvas when the GPU is lost and keeps previewing t
}
}, 60_000);

test("invalid player and publisher attributes fall back without browser errors", async () => {
test("invalid player and publisher attributes keep the last valid value and suspend media until corrected", async () => {
const page = await open();
const errors: string[] = [];
const warnings: string[] = [];
page.on("pageerror", (error) => errors.push(error.message));
page.on("console", (message) => {
if (message.type() === "warning") warnings.push(message.text());
});
try {
const report = await page.evaluate(async () => {
const watch = document.createElement("moq-watch");
const publish = document.createElement("moq-publish");
watch.setAttribute("visible", "always");
watch.setAttribute("paused", "");
document.body.append(watch, publish);
const enabled = () => [watch.connection.enabled.peek(), publish.connection.enabled.peek()];
const before = enabled();
for (const element of [watch, publish]) {
element.setAttribute("url", "https://example.invalid/");
element.setAttribute("url", "http://[");
}
watch.setAttribute("volume", "0.75");
watch.setAttribute("volume", "foo");
await Promise.resolve();
const result = { watch: watch.url, publish: publish.url, volume: watch.volume };
const kept = { watch: watch.url?.href, publish: publish.url?.href, volume: watch.volume };
const suspended = enabled();
// The watch element resumes only once every invalid attribute is corrected.
for (const element of [watch, publish]) element.setAttribute("url", "https://example.invalid/");
const partial = enabled();
watch.setAttribute("volume", "0.25");
const corrected = enabled();
watch.remove();
publish.remove();
return result;
return { before, kept, suspended, partial, corrected };
});
expect(report).toEqual({
before: [true, true],
kept: { watch: "https://example.invalid/", publish: "https://example.invalid/", volume: 0.75 },
suspended: [false, false],
partial: [false, true],
corrected: [true, true],
});
expect(report).toEqual({ watch: undefined, publish: undefined, volume: 0.5 });
expect(errors).toEqual([]);
expect(warnings.filter((message) => message.includes("invalid url="))).toHaveLength(2);
expect(warnings.filter((message) => message.includes("invalid volume="))).toHaveLength(1);
expect(errors.filter((message) => message.includes('invalid url="http://["'))).toHaveLength(2);
expect(errors.filter((message) => message.includes('invalid volume="foo"'))).toHaveLength(1);
expect(errors).toHaveLength(3);
} finally {
await page.close();
}
Expand Down