Skip to content

Commit 172e2fd

Browse files
committed
Address review comments: remove unused class and add tests
1 parent f23ec9f commit 172e2fd

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

720 Bytes
Binary file not shown.

test/test_manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8235,6 +8235,15 @@
82358235
"annotations": true,
82368236
"about": "Text annotation without a separate Popup annotation"
82378237
},
8238+
{
8239+
"id": "annotation-popup-subject",
8240+
"file": "pdfs/annotation-popup-subject.pdf",
8241+
"md5": "60eb42164ccf3408d2ba495aa7c9ce9c",
8242+
"rounds": 1,
8243+
"type": "eq",
8244+
"annotations": true,
8245+
"about": "Text annotation popup showing /Subj (subject) alongside /T (author) in the header"
8246+
},
82388247
{
82398248
"id": "annotation-underline",
82408249
"file": "pdfs/annotation-underline.pdf",

test/unit/annotation_spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ describe("annotation", function () {
649649
annotationDict.set("Type", Name.get("Annot"));
650650
annotationDict.set("Subtype", Name.get("Text"));
651651
annotationDict.set("T", "ParentTitle");
652+
annotationDict.set("Subj", "ParentSubject");
652653
annotationDict.set("Contents", "ParentText");
653654
annotationDict.set("CreationDate", "D:20180423");
654655
annotationDict.set("M", "D:20190423");
@@ -691,6 +692,7 @@ describe("annotation", function () {
691692
expect(data.inReplyTo).toEqual(annotationRef.toString());
692693
expect(data.replyType).toEqual("Group");
693694
expect(data.titleObj).toEqual({ str: "ParentTitle", dir: "ltr" });
695+
expect(data.subjectObj).toEqual({ str: "ParentSubject", dir: "ltr" });
694696
expect(data.contentsObj).toEqual({ str: "ParentText", dir: "ltr" });
695697
expect(data.creationDate).toEqual("D:20180423");
696698
expect(data.modificationDate).toEqual("D:20190423");
@@ -723,6 +725,7 @@ describe("annotation", function () {
723725
replyDict.set("IRT", annotationRef);
724726
replyDict.set("RT", Name.get("R"));
725727
replyDict.set("T", "ReplyTitle");
728+
replyDict.set("Subj", "ReplySubject");
726729
replyDict.set("Contents", "ReplyText");
727730
replyDict.set("CreationDate", "D:20180523");
728731
replyDict.set("M", "D:20190523");
@@ -746,6 +749,7 @@ describe("annotation", function () {
746749
expect(data.inReplyTo).toEqual(annotationRef.toString());
747750
expect(data.replyType).toEqual("R");
748751
expect(data.titleObj).toEqual({ str: "ReplyTitle", dir: "ltr" });
752+
expect(data.subjectObj).toEqual({ str: "ReplySubject", dir: "ltr" });
749753
expect(data.contentsObj).toEqual({ str: "ReplyText", dir: "ltr" });
750754
expect(data.creationDate).toEqual("D:20180523");
751755
expect(data.modificationDate).toEqual("D:20190523");
@@ -4142,6 +4146,7 @@ describe("annotation", function () {
41424146
annotationDict.set("Type", Name.get("Annot"));
41434147
annotationDict.set("Subtype", Name.get("Text"));
41444148
annotationDict.set("T", "Correct Title");
4149+
annotationDict.set("Subj", "Correct Subject");
41454150
annotationDict.set("Contents", "Correct Text");
41464151
annotationDict.set("M", "D:20190423");
41474152
annotationDict.set("C", [0, 0, 1]);
@@ -4184,6 +4189,7 @@ describe("annotation", function () {
41844189
idFactoryMock
41854190
);
41864191
expect(data.titleObj).toEqual({ str: "Correct Title", dir: "ltr" });
4192+
expect(data.subjectObj).toEqual({ str: "Correct Subject", dir: "ltr" });
41874193
expect(data.contentsObj).toEqual({ str: "Correct Text", dir: "ltr" });
41884194
expect(data.modificationDate).toEqual("D:20190423");
41894195
expect(data.color).toEqual(new Uint8ClampedArray([0, 0, 255]));

web/comment_manager.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,6 @@ class CommentPopup {
942942
time.className = "commentPopupTime";
943943

944944
const title = (this.#title = document.createElement("span"));
945-
title.className = "commentPopupTitle";
946945

947946
const buttons = (this.#buttonsContainer = document.createElement("div"));
948947
buttons.className = "commentPopupButtons";

0 commit comments

Comments
 (0)