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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/failed-auth.html

Issue 2651943002: Block subresource requests whose URLs include credentials. (Closed)
Patch Set: Test. Created 3 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/xmlhttprequest/failed-auth.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/failed-auth.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/failed-auth.html
index b16e499140a18606fac4d16cc0b3780a154a1506..c6b555e3c9af94a5ec408602f1d9abcaa29f00f7 100644
--- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/failed-auth.html
+++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/failed-auth.html
@@ -12,6 +12,11 @@ function checkResult(n, code) {
((code == 401) ? " OK" : (" " + code + " != 401"));
}
+function checkFailure(n, code) {
+ document.getElementsByTagName("li")[n - 1].firstChild.nodeValue +=
+ ((code == 0) ? " OK" : (" " + code + " != 0"));
+}
+
function log(n, message) {
document.getElementsByTagName("li")[n - 1].firstChild.nodeValue +=
" " + message;
@@ -64,7 +69,7 @@ function test4() {
r.open("GET", "resources/basic-auth/basic-auth.php?uid=login4", true, "badname", "passpw");
r.onreadystatechange = function() {
if (r.readyState == 4) {
- checkResult(4, r.status);
+ checkFailure(4, r.status);
testRunner.notifyDone();
}
};

Powered by Google App Engine
This is Rietveld 408576698