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

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

Issue 561633003: IDL: Enumerations support in dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove parens Created 6 years, 3 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/fast/dom/idl-dictionary-unittest-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index 137da4d6790eb6b24ca68080a95596675d8acb70..652829ef205dc4f90d693f81b2ef910fcb598cbe 100644
--- a/LayoutTests/fast/dom/idl-dictionary-unittest.html
+++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html
@@ -21,6 +21,9 @@ if (window.internals && internals.dictionaryTest) {
shouldBeUndefined('dict.stringSequenceOrNullMember');
shouldBeUndefined('dict.elementMember');
shouldBeUndefined('dict.elementOrNullMember');
+ shouldBeUndefined('dict.enumMember');
+ shouldBeEqualToString('dict.enumMemberWithDefault', 'foo');
+ shouldBeUndefined('dict.enumOrNullMember');
debug('');
debug('Test for setting undefined');
@@ -56,6 +59,9 @@ if (window.internals && internals.dictionaryTest) {
stringSequenceOrNullMember: [],
elementMember: element1,
elementOrNullMember: null,
+ enumMember: 'foo',
+ enumMemberWithDefault: 'bar',
+ enumOrNullMember: 'baz',
});
dict = dictionaryTest.get();
shouldBe('dict.longMember', '1');
@@ -71,6 +77,9 @@ if (window.internals && internals.dictionaryTest) {
shouldBe('dict.elementMember', 'element1');
// This will be undefined as the spec says
shouldBeUndefined('dict.elementOrNullMember');
+ shouldBeEqualToString('dict.enumMember', 'foo');
+ shouldBeEqualToString('dict.enumMemberWithDefault', 'bar');
+ shouldBeEqualToString('dict.enumOrNullMember', 'baz');
debug('');
debug('Test for explicit undefined or null, and missing members');
@@ -93,5 +102,9 @@ if (window.internals && internals.dictionaryTest) {
dict = dictionaryTest.get();
shouldBeUndefined('dict.invalidMember');
debug('');
+
+ debug('Test for setting invalid enum value');
+ shouldThrow("dictionaryTest.set({enumMember: 'invalid'})");
+ debug('');
}
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/idl-dictionary-unittest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698