Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / cookies / resources / resetCookies.js
blobf4144e4551f704c42db0a959509fa04b27da9064
1 function resetCookies()
3 if (window.testRunner)
4 testRunner.setAlwaysAcceptCookies(true);
6 // Due to cross-origin restrictions, we can only (simply) reset cookies for our current origin.
7 var url = "http://" + window.location.hostname +":8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies";
8 var req = new XMLHttpRequest();
9 try {
10 req.open('GET', url, false);
11 req.send();
12 } catch (e) {
13 alert("Attempt to clear " + url + " cookies might have failed. Test results might be off from here on out. (" + e + ")");
16 if (window.testRunner)
17 testRunner.setAlwaysAcceptCookies(false);