Skip to content

Commit

Permalink
fix tests for iframe, add iframe rw
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Oct 12, 2024
1 parent 6ef55cc commit be072c2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/rewriteHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,18 @@ test(
wrapScriptModule("console.log(window.parent.location.href);"),
);

test(
"iframe rw",
rewriteHtml,
'<iframe src="https://example.com/iframe.html"></iframe>',
'<iframe src="http://localhost:8080/prefix/20201226101010if_/https://example.com/iframe.html"></iframe>'
);

test(
"object pdf",
rewriteHtml,
'<object type="application/pdf" data="https://example.com/some/file.pdf">',
'<iframe type="application/pdf" src="http://localhost:8080/prefix/20201226101010mp_/https://example.com/some/file.pdf">',
'<iframe type="application/pdf" src="http://localhost:8080/prefix/20201226101010if_/https://example.com/some/file.pdf">',
);

test(
Expand Down

0 comments on commit be072c2

Please sign in to comment.