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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/addressspace-test.js

Issue 1772303002: CORS-RFC1918: Teach appcache responses to passthrough their socket address. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test. Created 4 years, 9 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: third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/addressspace-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/addressspace-test.js b/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/addressspace-test.js
index 8e019a598ef71c4de54b8a2f9530ec12e2f1777b..c7738bbf9124d42cb7ef7aa1593885d36079e3da 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/addressspace-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/addressspace-test.js
@@ -4,6 +4,10 @@ function createIFrame(origin, type) {
file = "post-addressspace-to-parent.html";
} else if (type == "document+csp") {
file = "post-addressspace-to-parent.html?csp";
+ } else if (type == "document+appcache") {
+ file = "post-addressspace-to-parent-with-appcache.html";
+ } else if (type == "document+appcache+csp") {
+ file = "post-addressspace-to-parent-with-appcache.html?csp";
} else if (type == "worker") {
file = "post-addressspace-from-worker.html";
} else if (type == "sharedworker") {
@@ -15,13 +19,15 @@ function createIFrame(origin, type) {
return i;
}
-function addressSpaceTest(origin, type, expected) {
+function addressSpaceTest(origin, type, expected, callback) {
async_test(function (t) {
var i = createIFrame(origin, type);
window.addEventListener("message", t.step_func(function (e) {
if (e.source == i.contentWindow) {
assert_equals(e.data.origin, origin);
assert_equals(e.data.addressSpace, expected);
+ if (callback)
+ callback();
t.done();
}
}));

Powered by Google App Engine
This is Rietveld 408576698