Cover another branch in CPDFSDK_BAAnnot::SetAnnotName()

Exercise the path where setting the name to an empty string
deletes from the dictionary.

Change-Id: If7e24fb6f05fa342bee4fcaa18ec620336509d9c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84930
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/javascript/annot_properties.in b/testing/resources/javascript/annot_properties.in
index 939365c..e143ac8 100644
--- a/testing/resources/javascript/annot_properties.in
+++ b/testing/resources/javascript/annot_properties.in
@@ -74,6 +74,15 @@
 } catch (e) {
   app.alert("ERROR: " + e);
 }
+app.alert("Test setting empty name under changed name");
+try {
+  var annot = this.getAnnot(0, "nonesuch");
+  annot.name = "";
+  app.alert("name after empty name change: " + annot.name);
+} catch (e) {
+  app.alert("ERROR: " + e);
+}
+
 endstream
 endobj
 {{object 22 0}} <<
diff --git a/testing/resources/javascript/annot_properties_expected.txt b/testing/resources/javascript/annot_properties_expected.txt
index 54548e6..252fd2b 100644
--- a/testing/resources/javascript/annot_properties_expected.txt
+++ b/testing/resources/javascript/annot_properties_expected.txt
@@ -14,3 +14,5 @@
 Alert: SUCCESS: Document.getAnnot: Object no longer exists.
 Alert: Test lookup under changed name
 Alert: nonesuch after name change: object
+Alert: Test setting empty name under changed name
+Alert: name after empty name change: