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

Unified Diff: LayoutTests/fast/dom/idl-dictionary-unittest.html

Issue 429853002: IDL: Add build target for IDL dictionary impl generation in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 4 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/fast/dom/idl-dictionary-unittest.html
diff --git a/LayoutTests/fast/dom/idl-dictionary-unittest.html b/LayoutTests/fast/dom/idl-dictionary-unittest.html
new file mode 100644
index 0000000000000000000000000000000000000000..9c525d58ece6830115f6d2c222d676cbc0054483
--- /dev/null
+++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script>
+description('IDL dictionary unittest');
+
+if (window.internals && internals.dictionaryTest) {
+ var dictionaryTest = window.internals.dictionaryTest();
+
+ dictionaryTest.set({});
+ dict = dictionaryTest.get();
+ shouldBeUndefined('dict.longMember');
+ shouldBe('dict.stringMember', '"defaultStringValue"');
haraken 2014/08/26 04:00:40 shouldBeEqualToString
bashi 2014/08/27 05:06:31 Done.
+ shouldBeNull('dict.booleanOrNullMember');
+
+ dictionaryTest.set({longMember: 3, stringMember: 'modifiedString',
+ stringSequenceMember: ['foo', 'bar', 'baz'],
+ invalidMember: 'invalid'});
haraken 2014/08/26 04:00:40 I want to add more test cases about null, undefine
bashi 2014/08/27 05:06:31 Partially done. Not all tests passed and it's not
+ dict = dictionaryTest.get();
+ shouldBe('dict.longMember', '3');
+ shouldBe('dict.stringMember', '"modifiedString"');
haraken 2014/08/26 04:00:40 shouldBeEqualToString
bashi 2014/08/27 05:06:31 Done.
+ shouldBe('dict.stringSequenceMember', '["foo", "bar", "baz"]');
+ shouldBeUndefined('dict.invalidMember');
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698