Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 960663002: Implement a delegate for EmbedderTests. (Closed)

Created:
5 years, 10 months ago by Tom Sepez
Modified:
5 years, 10 months ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implement a delegate for EmbedderTests. This is the first step in allowing an embedder test to someday gMock its callbacks, so that it can check that they fired as expected. gMock wants a class, not a C-style function-based API, and EmbedderTest is made to bridge between the two. The EmbedderTest class itself is modified to inherit from the C JS API classes themselves, to make finding the delegate easier. For example, a future embedder test might send a keystroke to a page, which would then trigger JS, which would then trigger an Alert(). Mocking the Alert() callback would allow the test to check that the alert happened as expected. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/42a8adad1c53c060bb93457902243a53270cec36

Patch Set 1 #

Patch Set 2 : Remove unused member #

Total comments: 10

Patch Set 3 : Address reviewer comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -74 lines) Patch
M testing/embedder_test.h View 1 2 4 chunks +31 lines, -13 lines 0 comments Download
M testing/embedder_test.cpp View 1 2 6 chunks +98 lines, -61 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Tom Sepez
Lei, please review.
5 years, 10 months ago (2015-02-25 21:56:57 UTC) #2
Lei Zhang
https://codereview.chromium.org/960663002/diff/20001/testing/embedder_test.cpp File testing/embedder_test.cpp (left): https://codereview.chromium.org/960663002/diff/20001/testing/embedder_test.cpp#oldcode189 testing/embedder_test.cpp:189: FSDK_SetUnSpObjProcessHandler(&unsuppored_info); I'm surprised this ever worked. Wouldn't |unsuppored_info| have ...
5 years, 10 months ago (2015-02-25 23:02:51 UTC) #3
Tom Sepez
https://codereview.chromium.org/960663002/diff/20001/testing/embedder_test.cpp File testing/embedder_test.cpp (left): https://codereview.chromium.org/960663002/diff/20001/testing/embedder_test.cpp#oldcode189 testing/embedder_test.cpp:189: FSDK_SetUnSpObjProcessHandler(&unsuppored_info); On 2015/02/25 23:02:50, Lei Zhang wrote: > I'm ...
5 years, 10 months ago (2015-02-25 23:25:23 UTC) #4
Lei Zhang
lgtm
5 years, 10 months ago (2015-02-25 23:34:32 UTC) #5
Tom Sepez
5 years, 10 months ago (2015-02-26 00:00:13 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
42a8adad1c53c060bb93457902243a53270cec36 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698