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

Unified Diff: LayoutTests/fast/events/clipboard-clearData.html

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: 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/events/clipboard-clearData.html
diff --git a/LayoutTests/fast/events/clipboard-clearData.html b/LayoutTests/fast/events/clipboard-clearData.html
index 744bc277a0ac366be557a5e2ebae182a37745b82..514cbf8230d09c54692938c7c3e00404a90135ad 100644
--- a/LayoutTests/fast/events/clipboard-clearData.html
+++ b/LayoutTests/fast/events/clipboard-clearData.html
@@ -15,7 +15,6 @@ function copy(event)
testDataTransfer.setData('custom-data', 'hello world');
shouldNotThrow('testDataTransfer.clearData(null)'); // Gets converted to "null" string.
- shouldNotThrow('testDataTransfer.clearData(undefined)'); // Gets converted to "undefined" string.
shouldBeEqualToString('testDataTransfer.getData("text")', 'sample');
shouldBeEqualToString('testDataTransfer.getData("url")', 'http://www.google.com/');
@@ -33,6 +32,17 @@ function copy(event)
shouldBeEqualToString('testDataTransfer.getData("url")', '');
shouldBeEqualToString('testDataTransfer.getData("text/html")', '');
shouldBeEqualToString('testDataTransfer.getData("custom-data")', '');
+
+ testDataTransfer.setData('text', 'sample');
+ testDataTransfer.setData('url', 'http://www.google.com/');
+ testDataTransfer.setData('text/html', '<em>Markup</em>');
+ testDataTransfer.setData('custom-data', 'hello world');
+
+ shouldNotThrow('testDataTransfer.clearData(undefined)');
+ shouldBeEqualToString('testDataTransfer.getData("text")', '');
+ shouldBeEqualToString('testDataTransfer.getData("url")', '');
+ shouldBeEqualToString('testDataTransfer.getData("text/html")', '');
+ shouldBeEqualToString('testDataTransfer.getData("custom-data")', '');
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698