Chromium Code Reviews| Index: content/test/data/site_isolation/subframes_with_resources.html |
| diff --git a/content/test/data/site_isolation/subframes_with_resources.html b/content/test/data/site_isolation/subframes_with_resources.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..775b88959f972f9d69d4ca76a7024a46cc581dc5 |
| --- /dev/null |
| +++ b/content/test/data/site_isolation/subframes_with_resources.html |
| @@ -0,0 +1,25 @@ |
| +<p> Load a bunch of frames containing videos. |
| +<script> |
| +var url = new URL(location); |
| +var urls = url.searchParams.get('urls').split(','); |
| +var numFrames = urls.length; |
| +var numSubresources = parseInt(url.searchParams.get('numSubresources'), 10); |
| +function createFrames() { |
| + for (var i = 0; i < numFrames; i++) { |
| + var frame = document.createElement('iframe'); |
| + frame.src = |
| + "/cross-site/example.com/site_isolation/subframe_resources.html?url=" + |
| + urls[i] + "&numSubresources=" + numSubresources; |
| + document.body.appendChild(frame); |
| + } |
| +} |
| + |
| +// Wait for |numFrame| messages. Each message is received when a given frame |
| +// finishes (errors/completes) all of its subresources. |
| +var numMessages = 0; |
| +window.addEventListener('message', function(e) { |
| + numMessages++; |
| + if (numMessages == numFrames) |
| + window.domAutomationController.send(true); |
|
mmenke
2017/01/30 23:03:51
Can this happen before ExecuteScriptAndExtractBool
Charlie Harrison
2017/01/31 20:19:32
It cannot hapen before ExecuteScriptAndExtractBool
|
| +}); |
| +</script> |