[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
jorlow at chromium.org
jorlow at chromium.org
Thu Oct 29 20:39:51 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit fb0651f65982b832581acec072be320c1d842693
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 6 07:02:35 2009 +0000
2009-10-05 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Darin Fisher.
Convert DOM Storage's "remove-item" test into the new format.
https://bugs.webkit.org/show_bug.cgi?id=30099
Convert DOM Storage's "remove-item" test into the new format and add it for
session storage. Make it a (tiny bit) more robust as well.
* storage/domstorage/localstorage/remove-item-expected.txt:
* storage/domstorage/localstorage/remove-item.html:
* storage/domstorage/script-tests/remove-item.js: Added.
(runTest):
* storage/domstorage/sessionstorage/remove-item-expected.txt: Copied from LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt.
* storage/domstorage/sessionstorage/remove-item.html: Copied from LayoutTests/storage/domstorage/localstorage/remove-item.html.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 72401a3..db85ead 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,23 @@
Reviewed by Darin Fisher.
+ Convert DOM Storage's "remove-item" test into the new format.
+ https://bugs.webkit.org/show_bug.cgi?id=30099
+
+ Convert DOM Storage's "remove-item" test into the new format and add it for
+ session storage. Make it a (tiny bit) more robust as well.
+
+ * storage/domstorage/localstorage/remove-item-expected.txt:
+ * storage/domstorage/localstorage/remove-item.html:
+ * storage/domstorage/script-tests/remove-item.js: Added.
+ (runTest):
+ * storage/domstorage/sessionstorage/remove-item-expected.txt: Copied from LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt.
+ * storage/domstorage/sessionstorage/remove-item.html: Copied from LayoutTests/storage/domstorage/localstorage/remove-item.html.
+
+2009-10-05 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Darin Fisher.
+
Add a test to verify session storage does not have a quota
https://bugs.webkit.org/show_bug.cgi?id=30093
diff --git a/LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt b/LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt
index 34f59c9..e861dc5 100644
--- a/LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt
+++ b/LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt
@@ -1,11 +1,36 @@
-This test verifies removeItem's behavior in localStorage.
-foo (before anything) is: undefined
-foo (after an implicit settter set) is: bar
-foo (after a removeItem)is: undefined
-foo (after an indexed setter set) is: bar
-foo (after a removeItem('FOO') (not foo)) is: bar
-foo (after a removeItem) is: undefined
-foo (after an explicit setter set) is: bar
-foo (after a removeItem) is: undefined
-foo (after a redundant removeItem) is: undefined
+Test .removeItem within DOM Storage.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing window.localStorage
+storage.clear()
+PASS storage.length is 0
+
+PASS storage.foo1 is undefined.
+storage.foo1 = 'bar'
+PASS storage.foo1 is "bar"
+storage.removeItem('foo1')
+PASS storage.foo1 is undefined.
+storage.removeItem('foo1')
+PASS storage.foo1 is undefined.
+
+PASS storage['foo2'] is undefined.
+storage['foo2'] = 'bar'
+PASS storage['foo2'] is "bar"
+storage.removeItem('foo2')
+PASS storage['foo2'] is undefined.
+storage.removeItem('foo2')
+PASS storage['foo2'] is undefined.
+
+PASS storage.getItem('foo3') is null
+storage.setItem('foo3', 'bar')
+PASS storage.getItem('foo3') is "bar"
+storage.removeItem('foo3')
+PASS storage.getItem('foo3') is null
+storage.removeItem('foo3')
+PASS storage.getItem('foo3') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
diff --git a/LayoutTests/storage/domstorage/localstorage/remove-item.html b/LayoutTests/storage/domstorage/localstorage/remove-item.html
index 83a3037..b412cb8 100644
--- a/LayoutTests/storage/domstorage/localstorage/remove-item.html
+++ b/LayoutTests/storage/domstorage/localstorage/remove-item.html
@@ -1,47 +1,15 @@
<html>
<head>
-<script src="resources/clearLocalStorage.js"></script>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="../script-tests/remove-item.js"></script>
<script>
-
-if (window.layoutTestController)
- layoutTestController.dumpAsText();
-
-function log(a)
-{
- document.getElementById('logger').appendChild(document.createTextNode(a));
- document.getElementById('logger').appendChild(document.createElement("br"));
-}
-
-function runTest()
-{
- if (!window.localStorage) {
- log("window.localStorage DOES NOT exist");
- return;
- }
-
- log("foo (before anything) is: " + localStorage.foo);
- localStorage.foo = "bar";
- log("foo (after an implicit settter set) is: " + localStorage.foo);
- localStorage.removeItem("foo");
- log("foo (after a removeItem)is: " + localStorage.foo);
- localStorage["foo"] = "bar";
- log("foo (after an indexed setter set) is: " + localStorage.foo);
- localStorage.removeItem("FOO");
- log("foo (after a removeItem('FOO') (not foo)) is: " + localStorage.foo);
- localStorage.removeItem("foo");
- log("foo (after a removeItem) is: " + localStorage.foo);
- localStorage.setItem("foo", "bar");
- log("foo (after an explicit setter set) is: " + localStorage.foo);
- localStorage.removeItem("foo");
- log("foo (after a removeItem) is: " + localStorage.foo);
- localStorage.removeItem("foo");
- log("foo (after a redundant removeItem) is: " + localStorage.foo);
-}
-
+runTest("window.localStorage");
</script>
-</head>
-<body onload="runTest();">
-This test verifies removeItem's behavior in localStorage.<br><hr>
-<div id="logger"></div>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/storage/domstorage/script-tests/remove-item.js b/LayoutTests/storage/domstorage/script-tests/remove-item.js
new file mode 100644
index 0000000..3bd6bad
--- /dev/null
+++ b/LayoutTests/storage/domstorage/script-tests/remove-item.js
@@ -0,0 +1,45 @@
+description("Test .removeItem within DOM Storage.");
+
+function runTest(storageString)
+{
+ storage = eval(storageString);
+ if (!storage) {
+ testFailed(storageString + " DOES NOT exist");
+ return;
+ }
+
+ debug("Testing " + storageString);
+
+ evalAndLog("storage.clear()");
+ shouldBe("storage.length", "0");
+
+ debug("");
+ shouldBeUndefined("storage.foo1");
+ evalAndLog("storage.foo1 = 'bar'");
+ shouldBeEqualToString("storage.foo1", "bar");
+ evalAndLog("storage.removeItem('foo1')");
+ shouldBeUndefined("storage.foo1");
+ evalAndLog("storage.removeItem('foo1')");
+ shouldBeUndefined("storage.foo1");
+
+ debug("");
+ shouldBeUndefined("storage['foo2']");
+ evalAndLog("storage['foo2'] = 'bar'");
+ shouldBeEqualToString("storage['foo2']", "bar");
+ evalAndLog("storage.removeItem('foo2')");
+ shouldBeUndefined("storage['foo2']");
+ evalAndLog("storage.removeItem('foo2')");
+ shouldBeUndefined("storage['foo2']");
+
+ debug("");
+ shouldBeNull("storage.getItem('foo3')");
+ evalAndLog("storage.setItem('foo3', 'bar')");
+ shouldBeEqualToString("storage.getItem('foo3')", "bar");
+ evalAndLog("storage.removeItem('foo3')");
+ shouldBeNull("storage.getItem('foo3')");
+ evalAndLog("storage.removeItem('foo3')");
+ shouldBeNull("storage.getItem('foo3')");
+
+ window.successfullyParsed = true;
+}
+
diff --git a/LayoutTests/storage/domstorage/sessionstorage/remove-item-expected.txt b/LayoutTests/storage/domstorage/sessionstorage/remove-item-expected.txt
new file mode 100644
index 0000000..c80d9c7
--- /dev/null
+++ b/LayoutTests/storage/domstorage/sessionstorage/remove-item-expected.txt
@@ -0,0 +1,36 @@
+Test .removeItem within DOM Storage.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing window.sessionStorage
+storage.clear()
+PASS storage.length is 0
+
+PASS storage.foo1 is undefined.
+storage.foo1 = 'bar'
+PASS storage.foo1 is "bar"
+storage.removeItem('foo1')
+PASS storage.foo1 is undefined.
+storage.removeItem('foo1')
+PASS storage.foo1 is undefined.
+
+PASS storage['foo2'] is undefined.
+storage['foo2'] = 'bar'
+PASS storage['foo2'] is "bar"
+storage.removeItem('foo2')
+PASS storage['foo2'] is undefined.
+storage.removeItem('foo2')
+PASS storage['foo2'] is undefined.
+
+PASS storage.getItem('foo3') is null
+storage.setItem('foo3', 'bar')
+PASS storage.getItem('foo3') is "bar"
+storage.removeItem('foo3')
+PASS storage.getItem('foo3') is null
+storage.removeItem('foo3')
+PASS storage.getItem('foo3') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/domstorage/sessionstorage/remove-item.html b/LayoutTests/storage/domstorage/sessionstorage/remove-item.html
new file mode 100644
index 0000000..7fbc890
--- /dev/null
+++ b/LayoutTests/storage/domstorage/sessionstorage/remove-item.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="../script-tests/remove-item.js"></script>
+<script>
+runTest("window.sessionStorage");
+</script>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list