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

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

Issue 2655393004: Make ResourceScheduler work in OOPIF (Closed)
Patch Set: Add tests 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
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>

Powered by Google App Engine
This is Rietveld 408576698