Rename field.fragment subfields to more descriptive names

Change-Id: I0a75db1f727f4ce5d63e85727aac3e9699271d42
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/52661
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/javascript/field.fragment b/testing/resources/javascript/field.fragment
index 9e44436..7aed37f 100644
--- a/testing/resources/javascript/field.fragment
+++ b/testing/resources/javascript/field.fragment
@@ -49,7 +49,7 @@
 {{object 6 0}} <<
   /FT /Tx
   /Parent 5 0 R
-  /T (Sub_X)
+  /T (MyText)
   /Type /Annot
   /Subtype /Widget
   /Rect [200 200 220 220]
@@ -59,7 +59,7 @@
   /FT /Btn
   /Ff 65536
   /Parent 5 0 R
-  /T (Sub_A)
+  /T (MyPushButton)
   /Type /Annot
   /Subtype /Widget
   /Rect [220 220 240 240]
@@ -69,7 +69,7 @@
   /FT /Btn
   /Ff 32768
   /Parent 5 0 R
-  /T (Sub_Z)
+  /T (MyRadio)
   /Type /Annot
   /Subtype /Widget
   /Rect [240 240 260 260]
@@ -79,7 +79,7 @@
   /FT /Btn
   /Ff 0
   /Parent 5 0 R
-  /T (Sub_B)
+  /T (MyCheckBox)
   /Type /Annot
   /Subtype /Widget
   /Rect [260 260 280 280]
diff --git a/testing/resources/javascript/field_methods.in b/testing/resources/javascript/field_methods.in
index 0ec1123..aebbf71 100644
--- a/testing/resources/javascript/field_methods.in
+++ b/testing/resources/javascript/field_methods.in
@@ -12,8 +12,8 @@
   try {
     var field = this.getField("MyField");
     app.alert("field is " + field.name);
-    var sub_a = this.getField("MyField.Sub_A");
-    app.alert("sub_a is " + sub_a.name);
+    var button = this.getField("MyField.MyPushButton");
+    app.alert("button is " + button.name);
     var nonesuch = this.getField("MyField.nonesuch");
     app.alert("nonesuch is " + nonesuch);
   } catch (e) {
@@ -36,9 +36,9 @@
 testGetField();
 testGetArray();
 
-expect("this.getField('MyField.Sub_A').buttonGetCaption()", "");
-expect("this.getField('MyField.Sub_A').buttonGetIcon()", "[object Object]");
-expect("this.getField('MyField.Sub_A').buttonImportIcon()", undefined);
+expect("this.getField('MyField.MyPushButton').buttonGetCaption()", "");
+expect("this.getField('MyField.MyPushButton').buttonGetIcon()", "[object Object]");
+expect("this.getField('MyField.MyPushButton').buttonImportIcon()", undefined);
 
 expectError("this.getField('MyField').checkThisBox()");
 expectError("this.getField('MyField').checkThisBox({})");
@@ -57,7 +57,7 @@
 expect("this.getField('MyField').setFocus()", undefined);
 
 // TODO(tsepez): these need a different kind of object to pass
-expectError("this.getField('MyField.Sub_X').browseForFileToSubmit()");
+expectError("this.getField('MyField.MyText').browseForFileToSubmit()");
 expectError("this.getField('MyField').checkThisBox(0, true)");
 expectError("this.getField('MyField').getItemAt(0)");
 
diff --git a/testing/resources/javascript/field_methods_expected.txt b/testing/resources/javascript/field_methods_expected.txt
index 2f16c23..ca41d7f 100644
--- a/testing/resources/javascript/field_methods_expected.txt
+++ b/testing/resources/javascript/field_methods_expected.txt
@@ -1,14 +1,14 @@
 Alert: field is MyField
-Alert: sub_a is MyField.Sub_A
+Alert: button is MyField.MyPushButton
 Alert: nonesuch is undefined
 Alert: found 4 sub-fields:
-Alert: MyField.Sub_A
-Alert: MyField.Sub_B
-Alert: MyField.Sub_X
-Alert: MyField.Sub_Z
-Alert: PASS: this.getField('MyField.Sub_A').buttonGetCaption() = 
-Alert: PASS: this.getField('MyField.Sub_A').buttonGetIcon() = [object Object]
-Alert: PASS: this.getField('MyField.Sub_A').buttonImportIcon() = undefined
+Alert: MyField.MyCheckBox
+Alert: MyField.MyPushButton
+Alert: MyField.MyRadio
+Alert: MyField.MyText
+Alert: PASS: this.getField('MyField.MyPushButton').buttonGetCaption() = 
+Alert: PASS: this.getField('MyField.MyPushButton').buttonGetIcon() = [object Object]
+Alert: PASS: this.getField('MyField.MyPushButton').buttonImportIcon() = undefined
 Alert: PASS: this.getField('MyField').checkThisBox() threw Field.checkThisBox: Incorrect number of parameters passed to function.
 Alert: PASS: this.getField('MyField').checkThisBox({}) threw Field.checkThisBox: Object is of the wrong type.
 Alert: PASS: this.getField('MyField').defaultIsChecked() threw Field.defaultIsChecked: Incorrect number of parameters passed to function.
@@ -20,7 +20,7 @@
 Alert: PASS: this.getField('MyField').isDefaultChecked(20) threw Field.isDefaultChecked: Incorrect parameter value.
 Alert: PASS: this.getField('MyField').isDefaultChecked(0) = false
 Alert: PASS: this.getField('MyField').setFocus() = undefined
-Alert: PASS: this.getField('MyField.Sub_X').browseForFileToSubmit() threw Field.browseForFileToSubmit: Object is of the wrong type.
+Alert: PASS: this.getField('MyField.MyText').browseForFileToSubmit() threw Field.browseForFileToSubmit: Object is of the wrong type.
 Alert: PASS: this.getField('MyField').checkThisBox(0, true) threw Field.checkThisBox: Object is of the wrong type.
 Alert: PASS: this.getField('MyField').getItemAt(0) threw Field.getItemAt: Object is of the wrong type.
 Alert: These always succeed without actually doing anything:
diff --git a/testing/resources/javascript/field_properties.in b/testing/resources/javascript/field_properties.in
index 5e12fad..9999dd7 100644
--- a/testing/resources/javascript/field_properties.in
+++ b/testing/resources/javascript/field_properties.in
@@ -10,9 +10,10 @@
 function testProperties() {
   try {
     var field = this.getField("MyField");
-    var button = this.getField("MyField.Sub_A");
-    var radio = this.getField("MyField.Sub_Z");
-    var check = this.getField("MyField.Sub_B");
+    var text = this.getField("MyField.MyText");
+    var button = this.getField("MyField.MyPushButton");
+    var radio = this.getField("MyField.MyRadio");
+    var check = this.getField("MyField.MyCheckBox");
     app.alert('Testing properties under delay');
     testRWProperty(field, "delay", false, true);
     // TODO(tsepez): try this case, too.