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

Unified Diff: LayoutTests/storage/indexeddb/event-init.html

Issue 177633006: Implement IDBVersionChangeEvent ctor w/ IDBVersionChangeEventInit dict (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/event-init-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/storage/indexeddb/event-init.html
diff --git a/LayoutTests/storage/indexeddb/event-init.html b/LayoutTests/storage/indexeddb/event-init.html
new file mode 100644
index 0000000000000000000000000000000000000000..5afd20a6d3d1f8012b33699013e8076bed9dfbf4
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/event-init.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script>
+description("Verify the use of IDBVersionChangeEventInit");
+
+evalAndLog("event = new IDBVersionChangeEvent('default')");
+shouldBeTrue("event instanceof IDBVersionChangeEvent");
+shouldBeEqualToString("event.type", "default");
+shouldBe("event.oldVersion", "0");
+shouldBe("event.newVersion", "null");
+
+debug("");
+evalAndLog("initEvent = {oldVersion: 123, newVersion: 456}");
+evalAndLog("event = new IDBVersionChangeEvent('foo', initEvent)");
+shouldBeTrue("event instanceof IDBVersionChangeEvent");
+shouldBeEqualToString("event.type", "foo");
+shouldBe("event.oldVersion", "initEvent.oldVersion");
+shouldBe("event.newVersion", "initEvent.newVersion");
+
+debug("");
+evalAndLog("initEvent = {oldVersion: 'legacy', newVersion: null}");
+evalAndLog("event = new IDBVersionChangeEvent('bar', initEvent)");
+shouldBeTrue("event instanceof IDBVersionChangeEvent");
+shouldBeEqualToString("event.type", "bar");
+// We pull strings out of legacy databases, but don't let them be created
+shouldBe("event.oldVersion", "0");
+shouldBeNull("event.newVersion");
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/event-init-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698