web: Try to fix test failures
This commit is contained in:
parent
a1d02783aa
commit
ab49f34b15
|
@ -69,7 +69,7 @@ describe("ExternalInterface", () => {
|
||||||
it("loads the test", async () => {
|
it("loads the test", async () => {
|
||||||
await openTest(browser, "integration_tests/external_interface");
|
await openTest(browser, "integration_tests/external_interface");
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
player,
|
player,
|
||||||
|
@ -108,7 +108,7 @@ ExternalInterface.objectID: "flash_name"
|
||||||
});
|
});
|
||||||
|
|
||||||
it("responds to 'log'", async () => {
|
it("responds to 'log'", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute(
|
await browser.execute(
|
||||||
(player) =>
|
(player) =>
|
||||||
player.log("Hello world!", {
|
player.log("Hello world!", {
|
||||||
|
@ -136,7 +136,7 @@ ExternalInterface.objectID: "flash_name"
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns a value", async () => {
|
it("returns a value", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
const returned = await browser.execute(
|
const returned = await browser.execute(
|
||||||
(player) => player.returnAValue(123.4),
|
(player) => player.returnAValue(123.4),
|
||||||
player,
|
player,
|
||||||
|
@ -155,11 +155,11 @@ ExternalInterface.objectID: "flash_name"
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls a method with delay", async () => {
|
it("calls a method with delay", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute(
|
await browser.execute(
|
||||||
(player) =>
|
(player) =>
|
||||||
player.callMethodWithDelay("window.RuffleTest.set", true),
|
player.callMethodWithDelay("window.RuffleTest.set", true),
|
||||||
player,
|
await player,
|
||||||
);
|
);
|
||||||
const actualValue = await getCalledValue(browser);
|
const actualValue = await getCalledValue(browser);
|
||||||
expect(actualValue).to.eql([true]);
|
expect(actualValue).to.eql([true]);
|
||||||
|
@ -179,13 +179,16 @@ ExternalInterface.objectID: "flash_name"
|
||||||
// [NA] Broken on Ruffle at time of writing
|
// [NA] Broken on Ruffle at time of writing
|
||||||
it.skip("calls a reentrant JS method", async () => {
|
it.skip("calls a reentrant JS method", async () => {
|
||||||
// JS -> Flash -> JS within one call
|
// JS -> Flash -> JS within one call
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
const actualValue = await browser.execute((player) => {
|
const actualValue = await browser.execute(
|
||||||
player.callMethodImmediately("window.RuffleTest.set", {
|
(player) => {
|
||||||
nested: { object: { complex: true } },
|
player.callMethodImmediately("window.RuffleTest.set", {
|
||||||
});
|
nested: { object: { complex: true } },
|
||||||
return window.RuffleTest.get();
|
});
|
||||||
}, player);
|
return window.RuffleTest.get();
|
||||||
|
},
|
||||||
|
await player,
|
||||||
|
);
|
||||||
|
|
||||||
expect(actualValue).to.eql({
|
expect(actualValue).to.eql({
|
||||||
nested: { object: { complex: true } },
|
nested: { object: { complex: true } },
|
||||||
|
@ -211,10 +214,16 @@ ExternalInterface.objectID: "flash_name"
|
||||||
|
|
||||||
it("calls a reentrant Flash method", async () => {
|
it("calls a reentrant Flash method", async () => {
|
||||||
// Flash -> JS -> Flash within one call
|
// Flash -> JS -> Flash within one call
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute((player) => {
|
await browser.execute(
|
||||||
player.callMethodWithDelay("window.RuffleTest.log", "Reentrant!");
|
(player) => {
|
||||||
}, player);
|
player.callMethodWithDelay(
|
||||||
|
"window.RuffleTest.log",
|
||||||
|
"Reentrant!",
|
||||||
|
);
|
||||||
|
},
|
||||||
|
await player,
|
||||||
|
);
|
||||||
|
|
||||||
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
||||||
await browser.pause(200);
|
await browser.pause(200);
|
||||||
|
@ -236,13 +245,16 @@ log called with 1 argument
|
||||||
});
|
});
|
||||||
|
|
||||||
it("supports a JS function as name", async () => {
|
it("supports a JS function as name", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute((player) => {
|
await browser.execute(
|
||||||
player.callMethodWithDelay(
|
(player) => {
|
||||||
"function(name){window.RuffleTest.set(name)}",
|
player.callMethodWithDelay(
|
||||||
"test",
|
"function(name){window.RuffleTest.set(name)}",
|
||||||
);
|
"test",
|
||||||
}, player);
|
);
|
||||||
|
},
|
||||||
|
await player,
|
||||||
|
);
|
||||||
|
|
||||||
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
||||||
await browser.pause(200);
|
await browser.pause(200);
|
||||||
|
@ -263,10 +275,13 @@ log called with 1 argument
|
||||||
});
|
});
|
||||||
|
|
||||||
it("supports calling a method that doesn't exist", async () => {
|
it("supports calling a method that doesn't exist", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute((player) => {
|
await browser.execute(
|
||||||
player.callMethodWithDelay("does.not.exist");
|
(player) => {
|
||||||
}, player);
|
player.callMethodWithDelay("does.not.exist");
|
||||||
|
},
|
||||||
|
await player,
|
||||||
|
);
|
||||||
|
|
||||||
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
||||||
await browser.pause(200);
|
await browser.pause(200);
|
||||||
|
@ -283,12 +298,15 @@ log called with 1 argument
|
||||||
});
|
});
|
||||||
|
|
||||||
it("doesn't enforce Strict Mode", async () => {
|
it("doesn't enforce Strict Mode", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute((player) => {
|
await browser.execute(
|
||||||
player.callMethodWithDelay(
|
(player) => {
|
||||||
"function(){return aPropertyThatDoesntExist = 'success!'}",
|
player.callMethodWithDelay(
|
||||||
);
|
"function(){return aPropertyThatDoesntExist = 'success!'}",
|
||||||
}, player);
|
);
|
||||||
|
},
|
||||||
|
await player,
|
||||||
|
);
|
||||||
|
|
||||||
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
// [NA] Because of the delay, if we fetch immediately we *may* just get part of the log.
|
||||||
await browser.pause(200);
|
await browser.pause(200);
|
||||||
|
@ -305,7 +323,7 @@ log called with 1 argument
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows overriding a Ruffle method", async () => {
|
it("allows overriding a Ruffle method", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
await browser.execute((player) => {
|
await browser.execute((player) => {
|
||||||
player.addAnotherCallback("isPlaying", "isPlaying from EI");
|
player.addAnotherCallback("isPlaying", "isPlaying from EI");
|
||||||
}, player);
|
}, player);
|
||||||
|
@ -325,7 +343,7 @@ log called with 1 argument
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows redefining a method", async () => {
|
it("allows redefining a method", async () => {
|
||||||
const player = await browser.$("<ruffle-object>");
|
const player = await browser.$("ruffle-object");
|
||||||
|
|
||||||
// First definition
|
// First definition
|
||||||
await browser.execute((player) => {
|
await browser.execute((player) => {
|
||||||
|
|
|
@ -13,11 +13,11 @@ describe("Flash inside frame with injected ruffle", () => {
|
||||||
it("polyfills inside a frame", async () => {
|
it("polyfills inside a frame", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -39,11 +39,11 @@ describe("Flash inside frame with injected ruffle", () => {
|
||||||
// And finally, check
|
// And finally, check
|
||||||
await browser.switchToFrame(null);
|
await browser.switchToFrame(null);
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("Flash inside frame with provided ruffle", () => {
|
||||||
|
|
||||||
it("polyfills inside a frame", async () => {
|
it("polyfills inside a frame", async () => {
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -38,11 +38,11 @@ describe("Flash inside frame with provided ruffle", () => {
|
||||||
// And finally, check
|
// And finally, check
|
||||||
await browser.switchToFrame(null);
|
await browser.switchToFrame(null);
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed tag", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Embed tag", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("Embed with case-insensitive MIME type", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-embed />").waitForExist();
|
await browser.$("ruffle-embed").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("Embed with case-insensitive MIME type", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed inside audio node", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed without src attribute", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed without type attribute", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Embed without type attribute", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed with unexpected string", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed with wrong type attribute value", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Embed with Flash YouTube video", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -13,11 +13,11 @@ describe("Flash inside iframe with injected ruffle", () => {
|
||||||
it("polyfills inside an iframe", async () => {
|
it("polyfills inside an iframe", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -38,11 +38,11 @@ describe("Flash inside iframe with injected ruffle", () => {
|
||||||
// And finally, check
|
// And finally, check
|
||||||
await browser.switchToFrame(null);
|
await browser.switchToFrame(null);
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("iframe onload", () => {
|
||||||
|
|
||||||
it("runs the iframe onload event", async () => {
|
it("runs the iframe onload event", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<div />").waitForExist();
|
await browser.$("div").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#container")
|
.$("#container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("Flash inside iframe with provided ruffle", () => {
|
||||||
|
|
||||||
it("polyfills inside an iframe", async () => {
|
it("polyfills inside an iframe", async () => {
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -37,11 +37,11 @@ describe("Flash inside iframe with provided ruffle", () => {
|
||||||
// And finally, check
|
// And finally, check
|
||||||
await browser.switchToFrame(null);
|
await browser.switchToFrame(null);
|
||||||
await browser.switchToFrame(await browser.$("#test-frame"));
|
await browser.switchToFrame(await browser.$("#test-frame"));
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("Object with case-insensitive MIME type", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("Object with case-insensitive MIME type", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("Object with case-insensitive clsid", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("Object with case-insensitive clsid", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object with clsid and embed", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object with clsid and embed", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("Object with only data attribute", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("Object with only data attribute", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object tag", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object tag", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object with another object tag", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object with another object tag", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object using classid with another object tag without classid", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object using classid with another object tag without classid", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object tag", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object tag", () => {
|
||||||
it("Plays a movie with flashvars", async () => {
|
it("Plays a movie with flashvars", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
`// _level0.a
|
`// _level0.a
|
||||||
1
|
1
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object tag", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object tag", () => {
|
||||||
it("Plays a movie with flashvars", async () => {
|
it("Plays a movie with flashvars", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
`// _level0.a
|
`// _level0.a
|
||||||
1
|
1
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object for old IE must work everywhere", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object for old IE must work everywhere", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object inside audio node", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object without data attribute", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object without type attribute", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object without type attribute", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object without type and classid attributes", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object without type and classid attributes", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object with unexpected string", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object with unexpected string", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object with ruffle-embed tag", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object with wrong type attribute value", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -25,7 +25,7 @@ describe("Object with wrong type attribute value", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-embed />"),
|
await browser.$("#test-container").$("ruffle-embed"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Object with Flash YouTube video", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("PDF object", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("PDF with .swf GET", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("Remove object", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -29,7 +29,7 @@ describe("Remove object", () => {
|
||||||
});
|
});
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = "";
|
const expected = "";
|
||||||
expect(actual).html.to.equal(expected);
|
expect(actual).html.to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("SPL", () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("SWF extension insensitive", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("SWF extension insensitive", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("SWF extension, file with fragment", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("SWF extension, file with fragment", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe("SWF extension, file with GET parameter", () => {
|
||||||
|
|
||||||
it("Polyfills", async () => {
|
it("Polyfills", async () => {
|
||||||
await injectRuffleAndWait(browser);
|
await injectRuffleAndWait(browser);
|
||||||
await browser.$("<ruffle-object />").waitForExist();
|
await browser.$("ruffle-object").waitForExist();
|
||||||
|
|
||||||
const actual = await browser
|
const actual = await browser
|
||||||
.$("#test-container")
|
.$("#test-container")
|
||||||
.getHTML({ includeSelectorTag: false });
|
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
|
||||||
const expected = fs.readFileSync(
|
const expected = fs.readFileSync(
|
||||||
`${import.meta.dirname}/expected.html`,
|
`${import.meta.dirname}/expected.html`,
|
||||||
"utf8",
|
"utf8",
|
||||||
|
@ -27,7 +27,7 @@ describe("SWF extension, file with GET parameter", () => {
|
||||||
it("Plays a movie", async () => {
|
it("Plays a movie", async () => {
|
||||||
await playAndMonitor(
|
await playAndMonitor(
|
||||||
browser,
|
browser,
|
||||||
await browser.$("#test-container").$("<ruffle-object />"),
|
await browser.$("#test-container").$("ruffle-object"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue