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

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

Issue 2367543004: Extended implementation to use interface as arguments (Closed)
Patch Set: Addressed comments Created 4 years, 3 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-callback-function-unittest.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html b/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
index f8ff7e029adb70b8f7eb085f008685e54ccfdf7b..77cd15f96a247c37453aa595977b847c7aebfb83 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
@@ -2,8 +2,9 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
+var callbackFunctionTest = internals.callbackFunctionTest();
+
test(function() {
- var callbackFunctionTest = internals.callbackFunctionTest();
var callback1 = function(msg1, msg2) {
return msg1 + ', ' + msg2;
};
@@ -14,4 +15,13 @@ test(function() {
};
assert_equals(callbackFunctionTest.testCallback(callback2, 'hello', 'world'), 'SUCCESS: hellohello worldworld');
}, 'Callback function which takes two strings');
+
+test(function() {
+ var divElements = document.createElement('div');
bashi 2016/09/23 05:45:18 divElements -> divElement
lkawai 2016/09/23 06:05:36 Done.
+ var addInnerHTML = function(d) {
+ d.innerHTML = 'hello';
+ };
+ callbackFunctionTest.testInterfaceCallback(addInnerHTML, divElements);
+ assert_equals(divElements.innerHTML, 'hello');
+}, 'Callback function which takes a interface');
</script>

Powered by Google App Engine
This is Rietveld 408576698