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

Unified Diff: LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html

Issue 373043004: IDL: Treat undefined as missing for optional arguments with defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 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: LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html
diff --git a/LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html b/LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html
index 9d4262cd50fca3ddb22a7fa4b124d7d4d7261070..e051e5b963012e20e7d990db517404d7c6851f8a 100644
--- a/LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html
+++ b/LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html
@@ -40,6 +40,11 @@ dialog.show();
dialog.close();
shouldBe("dialog.returnValue", "'Should not change because no argument to close()'");
+dialog.returnValue = 'Should not change because of undefined argument to close()';
+dialog.show();
+dialog.close(undefined);
+shouldBe("dialog.returnValue", "'Should not change because of undefined argument to close()'");
+
dialog.returnValue = 'Should not change because close() is invalid';
shouldThrow("dialog.close('blah')", '"InvalidStateError: Failed to execute \'close\' on \'HTMLDialogElement\': The element does not have an \'open\' attribute, and therefore cannot be closed."');
shouldBe("dialog.returnValue", "'Should not change because close() is invalid'");

Powered by Google App Engine
This is Rietveld 408576698