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

Unified Diff: LayoutTests/imported/web-platform-tests/webstorage/event_local_storageeventinit.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_local_storageeventinit.html
diff --git a/LayoutTests/imported/web-platform-tests/webstorage/event_local_storageeventinit.html b/LayoutTests/imported/web-platform-tests/webstorage/event_local_storageeventinit.html
new file mode 100644
index 0000000000000000000000000000000000000000..4f964dfb49122fecf9eeb864ea3869bf0a1b06bd
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/webstorage/event_local_storageeventinit.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <title>WebStorage Test: localStorage event - StorageEventInit</title>
+ <script src="../../../resources/testharness.js"></script>
+ <script src="../../../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <h1>event_local_StorageEventInit</h1>
+ <div id="log"></div>
+ <script>
+ test(function() {
+ var t = async_test("storageeventinit test");
+ function onStorageEvent(event) {
+ t.step(function() {
+ assert_equals(event.key, 'key');
+ assert_equals(event.oldValue, 'oldValue');
+ assert_equals(event.newValue, 'newValue');
+ assert_equals(event.url, window.location.href);
+ assert_equals(event.storageArea, window.localStorage);
+ });
+ t.done();
+ }
+
+ window.addEventListener('storage', onStorageEvent, false);
+
+ var event = new StorageEvent('storage', {
+ key: 'key',
+ oldValue: 'oldValue',
+ newValue: 'newValue',
+ url: window.location.href,
+ storageArea: window.localStorage
+ });
+
+ window.dispatchEvent(event);
+ }, "Storage event is fired due to set values for StorageEventInit.");
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698