Fix CFI bad casts in BackgroundLoaderOfflinerTest.
Previously these tests did not use the conventional TestRenderFrameHost and TestRenderViewHost objects, but instead used RenderFrameHostImpl and RenderViewHostImpl. This caused them to fail with CFI bad cast errors when code in TestWebContents attempted to cast these objects to the test classes. This change eliminates the bad casts by creating a RenderViewHostTestEnabler object in the scope of the test fixture. This ensures that any Render*Host objects created for the duration of the test are in fact of type TestRender*Host. Bug: 469376 Change-Id: I9d4d048e7c8f1162fd4c8bc8e67ffc0932b6d220 Reviewed-on: https://chromium-review.googlesource.com/792450Reviewed-by:Cathy Li <chili@chromium.org> Commit-Queue: Peter Collingbourne <pcc@chromium.org> Cr-Commit-Position: refs/heads/master@{#522212}
Showing
Please register or sign in to comment