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

Unified Diff: content/test/data/site_isolation/subframes_with_resources.html

Issue 2655393004: Make ResourceScheduler work in OOPIF (Closed)
Patch Set: Make ResourceScheduler work in OOPIF Created 3 years, 11 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
« no previous file with comments | « content/test/data/site_isolation/subframe_resources.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+});
+</script>
« no previous file with comments | « content/test/data/site_isolation/subframe_resources.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698