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

Unified Diff: LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html

Issue 461563002: Avoid preloader-induced test flakiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove now-redundant window.jsTestIsAsync assignment. Created 6 years, 4 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 | « no previous file | LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html
diff --git a/LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html b/LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html
index 74f5b0ec661785d792e6403da236077a7f208b26..9ae13e450cacbeaec1d1fcc9768df00a252c80cc 100644
--- a/LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html
+++ b/LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt.html
@@ -1,25 +1,34 @@
<!DOCTYPE HTML>
-<script src="/js-test-resources/js-test.js"></script>
+<p>No credentials should be prompted for on seeing a 401 for &lt;img crossorigin&gt;.</p>
+<div id=console></div>
<script>
-description("No credentials should be prompted for on seeing a 401 for &lt;img crossorigin&gt;.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
+if (window.testRunner) {
testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
var testCount = 2;
+function log(msg) {
+ var span = document.createElement("span");
+ document.getElementById("console").appendChild(span);
+ span.innerHTML = msg + "<br/>";
+}
+
function finish() {
- if (--testCount == 0)
- finishJSTest();
+ if (--testCount == 0) {
+ log("TEST COMPLETE");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
}
function pass() {
- testPassed("Non-CORS image resource failed to load");
+ log("PASS Non-CORS image resource failed to load");
finish();
}
function fail(mode) {
- testFailed("Expected cross-origin access check failure for crossorigin='" + mode + "' CORS fetch.");
+ log("FAIL Expected cross-origin access check failure for crossorigin='" + mode + "' CORS fetch.");
finish();
}
</script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/img-crossorigin-no-credentials-prompt-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698