From 1f564b94cb01c3ef6630dbd897ed640f4ac9cc18 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 22 Aug 2020 13:03:35 -0400 Subject: XMLDocument handling (#738) * Add tests for SVGs * Add more null checks for Frontend._popup * Use null popup when on an XMLDocument --- test/data/html/test-document2-frame2.svg | 15 +++++++ test/data/html/test-document2-script.js | 4 ++ test/data/html/test-document2.html | 68 +++++++++++++++++++++++++++++--- 3 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 test/data/html/test-document2-frame2.svg (limited to 'test/data/html') diff --git a/test/data/html/test-document2-frame2.svg b/test/data/html/test-document2-frame2.svg new file mode 100644 index 00000000..380eab97 --- /dev/null +++ b/test/data/html/test-document2-frame2.svg @@ -0,0 +1,15 @@ + + + +ありがとう + \ No newline at end of file diff --git a/test/data/html/test-document2-script.js b/test/data/html/test-document2-script.js index ab516a4e..01bc211f 100644 --- a/test/data/html/test-document2-script.js +++ b/test/data/html/test-document2-script.js @@ -58,6 +58,10 @@ function setup(container, fullscreenElement=null) { if (template !== null && templateContentContainer !== null) { const mode = container.dataset.shadowMode; const shadow = templateContentContainer.attachShadow({mode}); + + const containerStyles = document.querySelector('#container-styles'); + shadow.appendChild(containerStyles.cloneNode(true)); + const content = document.importNode(template.content, true); setup(content); shadow.appendChild(content); diff --git a/test/data/html/test-document2.html b/test/data/html/test-document2.html index 6d174571..10fecbbb 100644 --- a/test/data/html/test-document2.html +++ b/test/data/html/test-document2.html @@ -8,6 +8,24 @@ +

Yomichan Manual Tests

@@ -15,7 +33,7 @@ Standard content. -
+
ありがとう
@@ -30,7 +48,7 @@