summaryrefslogtreecommitdiff
path: root/test/data/html/test-document2.html
blob: 10fecbbba4ef87fde30a1503ab421b286b9253c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1" />
        <title>Yomichan Manual Tests</title>
        <link rel="icon" type="image/gif" href="data:image/gif;base64,R0lGODlhEAAQAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAQABAAAAImFI6Zpt0B4YkS0TCpq07xbmEgcGVRUpLaI46ZG7ppalY0jDCwUAAAOw==" />
        <link rel="stylesheet" href="test-stylesheet.css" />
        <script src="test-document2-script.js"></script>
    </head>
    <style id="container-styles">
.container {
    width: 100%;
    height: 200px;
    border: 1px solid #d8d8d8;
    position: relative;
    box-sizing: border-box;
}
.container-inner {
    background-color: #f8f8f8;
    padding: 0.5em;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
}
    </style>
<body>

    <h1>Yomichan Manual Tests</h1>
    <y-description>Manual tests involving fullscreen elements, &lt;iframe&gt;s, and shadow DOMs.</y-description>

    <y-test>
        <y-description>Standard content.</y-description>
        <div class="fullscreen-element container"><div class="container-inner">
            <div>
                ありがとう
            </div>
            <div>
                <a href="#" class="fullscreen-link">Toggle fullscreen</a>
            </div>
        </div></div>
    </y-test>

    <y-test data-shadow-mode="open">
        <y-description>Content inside of an open shadow DOM.</y-description>
        <div class="template-content-container"></div>
        <template>
            <link rel="stylesheet" href="test-stylesheet.css" />
            <div class="fullscreen-element container"><div class="container-inner">
                <div>
                    ありがとう
                </div>
                <div>
                    <a href="#" class="fullscreen-link">Toggle fullscreen</a>
                </div>
            </div></div>
        </template>
    </y-test>

    <y-test data-shadow-mode="closed">
        <y-description>Content inside of a closed shadow DOM.</y-description>
        <div class="template-content-container"></div>
        <template>
            <link rel="stylesheet" href="test-stylesheet.css" />
            <div class="fullscreen-element container"><div class="container-inner">
                <div>
                    ありがとう
                </div>
                <div>
                    <a href="#" class="fullscreen-link">Toggle fullscreen</a>
                </div>
            </div></div>
        </template>
    </y-test>

    <y-test>
        <y-description>&lt;iframe&gt; element.</y-description>
        <iframe src="test-document2-frame1.html" allowfullscreen="true" class="container"></iframe>
    </y-test>

    <y-test data-shadow-mode="open">
        <y-description>&lt;iframe&gt; element inside of an open shadow DOM.</y-description>
        <div class="template-content-container"></div>
        <template>
            <iframe src="test-document2-frame1.html" allowfullscreen="true" class="container"></iframe>
        </template>
    </y-test>

    <y-test data-shadow-mode="closed">
        <y-description>&lt;iframe&gt; element inside of a closed shadow DOM.</y-description>
        <div class="template-content-container"></div>
        <template>
            <iframe src="test-document2-frame1.html" allowfullscreen="true" class="container"></iframe>
        </template>
    </y-test>

    <y-test>
        <y-description>SVG &lt;img&gt;.</y-description>
        <img src="test-document2-frame2.svg" class="container">
    </y-test>

    <y-test>
        <y-description>SVG &lt;object&gt;.</y-description>
        <object data="test-document2-frame2.svg" type="image/svg+xml" class="container"></object>
    </y-test>

    <y-test>
        <y-description>SVG &lt;embed&gt;.</y-description>
        <embed type="image/svg+xml" src="test-document2-frame2.svg" class="container">
    </y-test>

    <y-test>
        <y-description>SVG &lt;iframe&gt;.</y-description>
        <iframe src="test-document2-frame2.svg" allowfullscreen="true" class="container"></iframe>
    </y-test>

    <y-test>
        <y-description>SVG &lt;svg&gt;.</y-description>
        <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="container" style="background-color: #f8f8f8;">
            <text
                x="7"
                y="12"
                style="
                font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
                font-size: 14px;
                fill: #000000;
                dominant-baseline: hanging;"
            >
                ありがとう
            </text>
        </svg>
    </y-test>


    <script>
for (const element of document.querySelectorAll('y-test')) {
    setup(element);
}
    </script>

</body>
</html>