| 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>
|
|
|