The test file at https://github.com/mozilla/pdf.js/blob/master/test/pdfs/annotation-choice-widget.pdf contains listboxes, which are not rendered correctly when printed right now. These kinds of fields are made by https://github.com/mozilla/pdf.js/blob/master/src/display/annotation_layer.js#L672-L678.

/cc @calixteman 
const xref = new XRefMock([{ ref: widgetRef, data: widgetDict }]
      const { data } = await AnnotationFactory.create(
        xref,
        widgetRef,
        pdfManagerMock,
        idFactoryMock
      
      expect(data.annotationType).toEqual(AnnotationType.WIDGET
      expect(data.fieldName).toEqual("foo"
    }
    it("should construct the field name when there are ancestors", async function () {
      const firstParent = new Dict(
      firstParent.set("T", "foo"
      const secondParent = new Dict(
      secondParent.set("Parent", firstParent
      secondParent.set("T", "bar"
      widgetDict.set("Parent", secondParent
      widgetDict.set("T", "baz"
      const widgetRef = Ref.get(22, 0
      const xref = new XRefMock([{ ref: widgetRef, data: widgetDict }]
      const { data } = await AnnotationFactory.create(
        xref,
        widgetRef,
        pdfManagerMock,
        idFactoryMock
      
      expect(data.annotationType).toEqual(AnnotationType.WIDGET
      expect(data.fieldName).toEqual("foo.bar.baz"
    }
    it(