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

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

Issue 765673005: IDL: Null values should be converted for non-nullable dictionary members (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: GN fix Created 6 years 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
index 897f0f719f1447828d4a88e12245f3d02fc42d77..d855f128c0fd279aaac7f1ec1d8225a1767d2b5f 100644
--- a/LayoutTests/fast/dom/idl-dictionary-unittest.html
+++ b/LayoutTests/fast/dom/idl-dictionary-unittest.html
@@ -124,10 +124,6 @@ if (window.internals && internals.dictionaryTest) {
doubleOrStringMember: null,
});
dict = dictionaryTest.get();
- // This behavior doesn't match the spec. The spec says it should be "null"
- // (of type string). This is an intentional mismatch; however, we might
- // want to follow the spec at some time.
- debug('This FAIL is intentional');
shouldBeEqualToString('dict.doubleOrStringMember', 'null');
dictionaryTest.set({
doubleOrStringMember: undefined,
@@ -146,7 +142,9 @@ if (window.internals && internals.dictionaryTest) {
});
dict = dictionaryTest.get();
shouldBeUndefined('dict.longMember');
- shouldBe('dict.longMemberWithDefault', '42');
+ // ToNumber(null) results in 0.
+ shouldBe('dict.longMemberWithDefault', '0');
+ // Passing undefined shouldn't invoke any conversion.
shouldBeUndefined('dict.longOrNullMember');
// Nullable and its default value is null
shouldBeNull('dict.longOrNullMemberWithDefault');

Powered by Google App Engine
This is Rietveld 408576698