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

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

Issue 1476863003: bindings: Ignores the last undefined arguments when counting the args. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated layout tests. Created 5 years, 1 month 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/events/clipboard-clearData.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/clipboard-clearData.html b/third_party/WebKit/LayoutTests/fast/events/clipboard-clearData.html
index 744bc277a0ac366be557a5e2ebae182a37745b82..94c7f1805c50333bb1cddd79336c7490c463bb20 100644
--- a/third_party/WebKit/LayoutTests/fast/events/clipboard-clearData.html
+++ b/third_party/WebKit/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');
+ // clearData(undefined) is equivalent to clearData().
+ 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