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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/test-helpers.js

Issue 1208693003: Add LayoutTest for ServiceWorker's sandbox iframe handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use in Created 5 years, 6 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 | « LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/resources/test-helpers.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
index 1748c4994f041a5a6aecf75788f0ccb0a812ad1d..2a8e7122565b9f9b7ed39d424b7d3f284bc56c5f 100644
--- a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
+++ b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
@@ -55,6 +55,16 @@ function with_iframe(url) {
});
}
+function with_sandboxed_iframe(url, sandbox) {
+ return new Promise(function(resolve) {
+ var frame = document.createElement('iframe');
+ frame.sandbox = sandbox;
+ frame.src = url;
+ frame.onload = function() { resolve(frame); };
+ document.body.appendChild(frame);
+ });
+}
+
function normalizeURL(url) {
return new URL(url, self.location).toString().replace(/#.*$/, '');
}
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/sandboxed-iframe-navigator-serviceworker.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698