mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
7be7b11a1c
This patch is generated by the following sed script: find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \; MozReview-Commit-ID: AzhtdwJwVNg --HG-- extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
48 lines
1.1 KiB
HTML
48 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
Bug 965872 - Storage inspector actor with cookies, local storage and session storage.
|
|
-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Storage inspector blank html for tests</title>
|
|
</head>
|
|
<body>
|
|
<script type="application/javascript">
|
|
"use strict";
|
|
window.addCookie = function(name, value, path, domain, expires, secure) {
|
|
let cookieString = name + "=" + value + ";";
|
|
if (path) {
|
|
cookieString += "path=" + path + ";";
|
|
}
|
|
if (domain) {
|
|
cookieString += "domain=" + domain + ";";
|
|
}
|
|
if (expires) {
|
|
cookieString += "expires=" + expires + ";";
|
|
}
|
|
if (secure) {
|
|
cookieString += "secure=true;";
|
|
}
|
|
document.cookie = cookieString;
|
|
};
|
|
|
|
window.removeCookie = function(name) {
|
|
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
|
|
};
|
|
|
|
window.clearLocalAndSessionStores = function() {
|
|
localStorage.clear();
|
|
sessionStorage.clear();
|
|
};
|
|
|
|
window.clearCookies = function() {
|
|
let cookies = document.cookie;
|
|
for (let cookie of cookies.split(";")) {
|
|
removeCookie(cookie.split("=")[0]);
|
|
}
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|