Chromium Code Reviews| Index: content/test/data/site_isolation/subframe_resources.html |
| diff --git a/content/test/data/site_isolation/subframe_resources.html b/content/test/data/site_isolation/subframe_resources.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..974a30e35105fae2142edd46b60103523ca3b414 |
| --- /dev/null |
| +++ b/content/test/data/site_isolation/subframe_resources.html |
| @@ -0,0 +1,22 @@ |
| +<body> |
| +<p>Load a bunch of videos. |
| +<script> |
| +var url = new URL(location); |
| +var subresourceUrl = url.searchParams.get('url'); |
| +var numSubresources = parseInt(url.searchParams.get('numSubresources'), 10); |
| + |
| +var numError = 0; |
| +function onVideoDone() { |
| + numError++; |
|
nasko
2017/01/31 15:50:34
Do we know this was called due to an error?
Charlie Harrison
2017/01/31 20:19:32
No this is a holdover. I think this var should be
|
| + if (numError == numSubresources) |
| + parent.postMessage('loaded', '*'); |
| +} |
| + |
| +for (var i = 0; i < numSubresources; i++) { |
| + var video = document.createElement('video'); |
| + video.src = subresourceUrl + "?" + i; |
| + video.onerror = onVideoDone; |
| + video.onload = onVideoDone; |
| + document.body.appendChild(video); |
| +} |
| +</script> |