Skip to content

Instantly share code, notes, and snippets.

@allstarschh
Created June 13, 2017 09:09
Show Gist options
  • Save allstarschh/c6f690a8b253ce9512cf82544f9d46a2 to your computer and use it in GitHub Desktop.
Save allstarschh/c6f690a8b253ce9512cf82544f9d46a2 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Data URI</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="testDataURI()">
<p id="display"></p>
<div id="content" style="display: none">
</div>
<script class="testbody" type="text/javascript">
var testDataURI = function() {
info("testDataURI");
var win = window.open();
win.onload = function() {
ok(true);
win.close();
SimpleTest.finish();
}
win.location.href = "data:text/html,hello";
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment