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

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

Issue 2183623004: Add IDLDictionaryBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix multi-level inheritance bug Created 4 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: third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest.html b/third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest.html
index b470d77a6ee88f26ed9a04e789c4048d7acc5afa..8170e50fece91f2a4a297c1d8501327a25dc4baf 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/idl-dictionary-unittest.html
@@ -311,6 +311,20 @@ if (window.internals && internals.dictionaryTest) {
shouldBeFalse('derived.requiredBooleanMember');
debug('');
+ debug('Test for triple level derived dictionary');
+ dictionaryTest.setDerivedDerived({
+ longMember: 1,
+ derivedStringMember: 'modifiedString',
+ derivedDerivedStringMember: 'modifiedString2',
+ requiredBooleanMember: false,
+ });
+ derived = dictionaryTest.getDerivedDerived();
+ shouldBe('derived.longMember', '1');
+ shouldBeEqualToString('derived.derivedStringMember', 'modifiedString');
+ shouldBeEqualToString('derived.derivedDerivedStringMember', 'modifiedString2');
+ shouldBeFalse('derived.requiredBooleanMember');
+ debug('');
+
debug('Test for passing invalid values as derived dictionary');
shouldThrow("dictionaryTest.setDerived({objectMember: 42, requiredBooleanMember: false })");
shouldThrow("dictionaryTest.setDerived({})"); // Missing required member.

Powered by Google App Engine
This is Rietveld 408576698