summaryrefslogtreecommitdiffstats
path: root/docshell/test/browser/file_bug1691153.html
blob: dea144eb417acd8ad80097c94257f49f8c06cb7d (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
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>bug 1691153</title>
</head>
<body>
<h1>bug 1691153</h1>
<script>
function toBlobURL(data, mimeType) {
  return URL.createObjectURL(
    new Blob([data], {
      type: mimeType,
    })
  );
}
// closing script element literal split up to not end the parent script element
let testurl = toBlobURL("<body></body>", "text/html");
addEventListener("message", event => {
  if (event.data == "getblob") {
    postMessage({ bloburl: testurl }, "*");
  }
});
// the blob URL should have a content principal
</script>
</body>
</html>