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

Issue 2251893004: Use parameterized tests to test multiple render text implementations. (Closed)

Created:
4 years, 4 months ago by karandeepb
Modified:
4 years, 3 months ago
Reviewers:
msw
CC:
chromium-reviews, derat+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@selection_direction
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use parameterized tests to test multiple render text implementations. Currently, on Mac most of the tests in render_text_unittest.cc use RenderText::CreateInstance to create their render text instance. Also, many tests which would fail on Mac with RenderTextMac are not compiled on Mac. As a result there is negligible test coverage for RenderTextHarfBuzz on Mac. This CL uses parameterized tests to test both RenderTextMac and RenderTextHarfBuzz on Mac. It does this by introducing three new test fixture classes which support parameterized tests- -RenderTextTest -RenderTextHarfBuzzTest -RenderTextMacTest The test helper class RenderTextAllBackends is removed. Before this CL, 65 tests in render_text_unittest.cc are run on Mac. After this CL, a total of 129 tests in render_text_unittest.cc are run on Mac. BUG=639194 Committed: https://crrev.com/50b6fa15b332c7f049069a1f569ca1e374462601 Cr-Commit-Position: refs/heads/master@{#414644}

Patch Set 1 #

Patch Set 2 : Remove RenderTextAllBackends. #

Patch Set 3 : Fix linux compile. #

Patch Set 4 : Refer crbug. #

Total comments: 2

Patch Set 5 #

Patch Set 6 : Decrease diff. #

Patch Set 7 #

Total comments: 27

Patch Set 8 : Rename RenderTextTestAll->RenderTextTest #

Patch Set 9 : Address nits. #

Total comments: 2

Patch Set 10 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+726 lines, -666 lines) Patch
M tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt View 1 2 9 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/platform_font_win.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 2 chunks +12 lines, -12 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.h View 1 chunk +22 lines, -18 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text_mac.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 7 8 9 106 chunks +686 lines, -631 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 65 (57 generated)
karandeepb
PTAL msw@. Thanks. https://codereview.chromium.org/2251893004/diff/80001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (left): https://codereview.chromium.org/2251893004/diff/80001/ui/gfx/render_text_unittest.cc#oldcode1918 ui/gfx/render_text_unittest.cc:1918: TEST_F(RenderTextTest, StringSizeEmptyString) { This doesn't fail ...
4 years, 4 months ago (2016-08-24 03:36:28 UTC) #43
msw
Nice change; some minor comments; mostly optional nits. https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt File tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt (right): https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt#newcode2 tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt:2: RenderTextHarfBuzzTest.DisplayRectShowsCursorLTR ...
4 years, 3 months ago (2016-08-25 03:02:19 UTC) #46
karandeepb
PTAL msw@. https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt File tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt (right): https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt#newcode2 tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt:2: RenderTextHarfBuzzTest.DisplayRectShowsCursorLTR On 2016/08/25 03:02:19, msw wrote: > ...
4 years, 3 months ago (2016-08-25 08:13:11 UTC) #56
msw
lgtm with a nit, and maybe leave the valgrind exception in for now. https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt File ...
4 years, 3 months ago (2016-08-25 15:20:37 UTC) #57
karandeepb
https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt File tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt (right): https://codereview.chromium.org/2251893004/diff/280001/tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt#newcode2 tools/valgrind/gtest_exclude/ui_base_unittests.gtest-memcheck.txt:2: RenderTextHarfBuzzTest.DisplayRectShowsCursorLTR On 2016/08/25 15:20:37, msw wrote: > On 2016/08/25 ...
4 years, 3 months ago (2016-08-26 00:47:29 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2251893004/340001
4 years, 3 months ago (2016-08-26 00:48:18 UTC) #61
commit-bot: I haz the power
Committed patchset #10 (id:340001)
4 years, 3 months ago (2016-08-26 03:26:28 UTC) #63
commit-bot: I haz the power
4 years, 3 months ago (2016-08-26 03:29:24 UTC) #65
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/50b6fa15b332c7f049069a1f569ca1e374462601
Cr-Commit-Position: refs/heads/master@{#414644}

Powered by Google App Engine
This is Rietveld 408576698