Adds tests for passing and returning null strings to and from the methods of injected Java objects
Bug: 5222742
Change-Id: Id6222aebce7570b0649cd9cb7f4f16b0f0b640a8
diff --git a/tests/assets/bindings_test.html b/tests/assets/bindings_test.html
index 71f3438..2d20ada 100755
--- a/tests/assets/bindings_test.html
+++ b/tests/assets/bindings_test.html
@@ -7,7 +7,7 @@
}
function testObjectTypes() {
- return JNIBindingsTest.testObjectTypes("Foo", "", {"foo":"bar"}, {});
+ return JNIBindingsTest.testObjectTypes("Foo", "", null, {"foo":"bar"}, {});
}
function testArray() {
@@ -104,6 +104,12 @@
return false;
}
+ returned = JNIBindingsTest.returnNullString();
+ if (returned !== undefined) {
+ appendLog("returnNullString() failed: expected undefined, got " + returned);
+ return false;
+ }
+
returned = JNIBindingsTest.returnObject();
if (returned == null) {
appendLog("returnObject() failed: expected non-null, got " + returned);