summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fledge/tentative/resources/fenced-frame.sub.py
blob: a8f32b6e1efa3ce97c65a3a6b0189be698710e0c (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
# Fenced frame HTML body. Generated by a Python file to avoid having quotes in
# the injected script escaped, which the test server does to *.html files.
def main(request, response):
    response.status = (200, b"OK")
    response.headers.set(b"Content-Type", b"text/html")
    response.headers.set(b"Supports-Loading-Mode", b"fenced-frame")

    return """
        <!DOCTYPE html>
        <html>
        <head>
        <!--- Allow injected scripts to use functions in fledge-util.sub.js --->
        <base href="..">
        <script src="/resources/testharness.js"></script>
        <script src="/common/utils.js"></script>
        <script src="resources/fledge-util.sub.js"></script>
        </head>
        <body>
        <script>
        {{GET[script]}}
        </script>
        </body>
        </html>
     """