Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html

Issue 2092293002: Block framebusts without a user gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better flag description Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html b/third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html
index 5a6994e09ed89cbd7977f8f5d392996e348e9e80..407521ced11da1264bf12740ef251003ef6ef4d5 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html
+++ b/third_party/WebKit/LayoutTests/http/tests/fileapi/create-blob-url-from-data-url.html
@@ -11,23 +11,22 @@ if (window.testRunner) {
testRunner.waitUntilDone();
}
-var t = setInterval(function(){
- if (!location.hash)
- return;
- var blobURL = location.hash.substr(1);
+function blobSent(event) {
+ var blobURL = event.data.blobURL;
if (blobURL == "null")
log("FAIL: no blob URL is created");
else
log("PASS: created blob URL");
- clearInterval(t);
if (window.testRunner)
testRunner.notifyDone();
-}, 100)
+};
+
+window.addEventListener("message", blobSent, false);
</script>
</head>
<body>
<p> Test case for checking blob URL can be created from the code running from data URI</p>
<pre id='console'></pre>
-<iframe src="data:text/html,%3Cscript%3Evar%20bb%20%3D%20new%20Blob%28%5B%22Foo%22%5D%2C%20%7Btype%3A%22text%2Fhtml%22%7D%29%3Btop.location%3D%27http%3A%2F%2F127.0.0.1%3A8000%2Ffileapi%2Fcreate-blob-url-from-data-url.html%23%27%20%2B%20window.URL.createObjectURL%28bb%29%3B%3C%2Fscript%3E"></iframe>
+<iframe src="data:text/html,<body><script>var bb = new Blob(['Foo'], {type:'text/html'}); top.postMessage({blobURL: window.URL.createObjectURL(bb)}, '*');</script></body>"></iframe>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698