Update web-platform-tests to revision 5e3ea8f49fee68c327388bfd1dd1375a8ce12a0e.

This commit is contained in:
Ms2ger 2015-07-09 14:05:01 +02:00
parent 12195a5c4a
commit bfb96b9448
1166 changed files with 35123 additions and 900 deletions

View file

@ -0,0 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<script>
function handleStorageEvent(e) {
window.parent.storageEventList.push(e);
}
</script>
</head>
<body onstorage="handleStorageEvent(window.event);">
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE HTML>
<html>
<head></head>
<body>
<script>
function handleStorageEvent(e) {
window.parent.storageEventList.push(e);
}
document.body.setAttribute("onstorage", "handleStorageEvent(window.event);");
</script>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
if (('localStorage' in window) && window.localStorage !== null){
try {
localStorage.setItem("name", "user1");
localStorage.setItem("name", "user2");
} catch (e) {
parent.fail("setItem method is failed.");
}
localStorage.clear();
} else {
parent.fail("localStorage is not supported.");
}
</script>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
if (('localStorage' in window) && window.localStorage !== null){
try {
localStorage.setItem("name", "user1");
} catch (e) {
parent.fail("setItem method is failed.");
}
localStorage.clear();
} else {
parent.fail("localStorage is not supported.");
}
</script>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
if (('localStorage' in window) && window.localStorage !== null){
try {
localStorage.setItem("name", "user1");
} catch (e) {
parent.fail("setItem method is failed.");
}
} else {
parent.fail("localStorage is not supported.");
}
</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
parent.t.step(function() {
localStorage.setItem("name", "user1");
localStorage.removeItem('name');
});
</script>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
if (('sessionStorage' in window) && window.sessionStorage !== null){
try {
sessionStorage.setItem("name", "user1");
sessionStorage.setItem("name", "user2");
} catch (e) {
parent.fail("setItem method is failed.");
}
sessionStorage.clear();
} else {
parent.fail("sessionStorage is not supported.");
}
</script>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
if (('sessionStorage' in window) && window.sessionStorage !== null){
try {
sessionStorage.setItem('name', 'user1');
} catch (e) {
parent.fail('setItem method is failed.');
}
sessionStorage.clear();
} else {
parent.fail('sessionStorage is not supported.');
}
</script>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
if (('sessionStorage' in window) && window.sessionStorage !== null){
try {
sessionStorage.setItem('name', 'user1');
} catch (e) {
parent.fail('setItem method is failed.');
}
} else {
parent.fail('sessionStorage is not supported.');
}
</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<html>
<body>
<script>
parent.t.step(function() {
sessionStorage.setItem("name", "user1");
sessionStorage.removeItem('name');
});
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<title>WebStorage Test: localStorage - second page</title>
</head>
<body>
<script>
var storage = window.localStorage;
var assertions = [];
assertions.push({
actual: storage.getItem("FOO"),
expected: "BAR",
message: "storage.getItem('FOO')"
});
storage.setItem("FOO", "BAR-NEWWINDOW");
assertions.push({
actual: storage.getItem("FOO"),
expected: "BAR-NEWWINDOW",
message: "value for FOO after changing"
});
assertions.push({
actual: window.opener.localStorage.getItem("FOO"),
expected: "BAR-NEWWINDOW",
message: "value for FOO in my opening window"
});
window.opener.postMessage(assertions, '*');
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<title>WebStorage Test: sessionStorage - second page</title>
</head>
<body>
<script>
var storage = window.sessionStorage;
var assertions = [];
assertions.push({
actual: storage.getItem("FOO"),
expected: "BAR",
message: "storage.getItem('FOO')"
});
storage.setItem("FOO", "BAR-NEWWINDOW");
assertions.push({
actual: storage.getItem("FOO"),
expected: "BAR-NEWWINDOW",
message: "value for FOO after changing"
});
assertions.push({
actual: window.opener.sessionStorage.getItem("FOO"),
expected: "BAR",
message: "value for FOO in my opening window"
});
window.opener.postMessage(assertions, '*');
</script>
</body>
</html>