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

Unified Diff: LayoutTests/imported/web-platform-tests/webstorage/event_session_removeitem.html

Issue 1220543007: Import web-platform-tests/webstorage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 5 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
Index: LayoutTests/imported/web-platform-tests/webstorage/event_session_removeitem.html
diff --git a/LayoutTests/imported/web-platform-tests/webstorage/event_session_removeitem.html b/LayoutTests/imported/web-platform-tests/webstorage/event_session_removeitem.html
new file mode 100644
index 0000000000000000000000000000000000000000..c6239cdccbe0e622759919187c8ad226a21d396e
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/webstorage/event_session_removeitem.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML>
+<meta charset="utf-8">
+<title>Web Storage Test: event - sessionStorage removeItem</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+
+<div id="log"></div>
+
+<script>
+
+var t = async_test("key property test of session event");
+
+t.step(function() {
+ sessionStorage.clear();
+
+ var event_index = 0;
+ window.addEventListener('storage', t.step_func(function(event) {
+ switch(++event_index) {
+ case 1:
+ assert_equals(event.key, "name", "set key");
+ assert_equals(event.oldValue, null, "set oldValue");
+ assert_equals(event.newValue, "user1", "set newValue");
+ assert_equals(event.url, el.contentDocument.documentURI, "set url");
+ assert_equals(event.storageArea, sessionStorage, "set storageArea");
+ break;
+ case 2:
+ assert_equals(event.key, "name", "remove key");
+ assert_equals(event.oldValue, "user1", "remove oldValue");
+ assert_equals(event.newValue, null, "remove newValue");
+ assert_equals(event.url, el.contentDocument.documentURI, "remove url");
+ assert_equals(event.storageArea, sessionStorage, "remove storageArea");
+ t.done();
+ break;
+ }
+ }), false);
+
+ var el = document.createElement("iframe");
+ el.setAttribute('id', 'ifrm');
+ el.setAttribute('src', 'resources/session_set_item_remove_iframe.html');
+ document.body.appendChild(el);
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698