Minor change to AP generation logic

Current behavior:
    Our CPVT_GenerateAP::Generate*AP() functions do not get called as
    long as the annotation dictionary has an "AP" entry.

Problem:
    We always need the "N" entry in AP dictionary to display an
    annotation. Even though the spec requires "AP" dictionary to have an
    "N" entry for normal mode appearance, in case of a malformed pdf
    with "AP" but without "N" in "AP", we won't be able to display the
    annotation at all.

Fix:
    Always check if "AP" has "N" entry to decide whether AP needs to be
    generated. If not, then we still need to generate AP, and add to the
    AP dictionary under the key "N".

Bug=pdfium:778
Change-Id: Icf0c6a681b3c8c22b0b67bf8d16ce6fefdc2c45b
Reviewed-on: https://pdfium-review.googlesource.com/6692
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index f818091..7e34260 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -266,7 +266,7 @@
   FPDF_DWORD fill_color = alpha ? 0x00000000 : 0xFFFFFFFF;
   FPDFBitmap_FillRect(bitmap, 0, 0, width, height, fill_color);
   FPDF_RenderPageBitmap(bitmap, page, 0, 0, width, height, 0, flags);
-  FPDF_FFLDraw(form_handle_, bitmap, page, 0, 0, width, height, 0, 0);
+  FPDF_FFLDraw(form_handle_, bitmap, page, 0, 0, width, height, 0, flags);
   return bitmap;
 }