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

Issue 2880353002: Add webkit unit test case for ComputeTextQuads

Created:
3 years, 7 months ago by tanvir
Modified:
3 years, 7 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add webkit unit test case for ComputeTextQuads This CL add's webkit unit test case for ComputeTextQuads. Currently ComputeTextQuads do not have any test case. BUG=691198

Patch Set 1 #

Patch Set 2 : for review #

Patch Set 3 : onlyDOMPatch #

Total comments: 2

Patch Set 4 : WIP #

Total comments: 1

Patch Set 5 : updated patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -0 lines) Patch
M third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (20 generated)
tanvir
PTAL!!! Added webkit unit test case for ComputeTextQuads. Currently ComputeTextQuads do not have any callSite ...
3 years, 7 months ago (2017-05-16 05:35:12 UTC) #5
yosin_UTC9
https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right): https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp#newcode1983 third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp:1983: TEST_F(VisibleUnitsTest, computeTextQuadDOM) { nit: s/compute/Compute/ https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp#newcode1985 third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp:1985: "<p id='host'>00" ...
3 years, 7 months ago (2017-05-16 10:05:07 UTC) #8
tanvir
On 2017/05/16 10:05:07, yosin_UTC9 wrote: > https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp > File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right): > > https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp#newcode1983 > ...
3 years, 7 months ago (2017-05-17 14:08:58 UTC) #19
Xiaocheng
https://codereview.chromium.org/2880353002/diff/60001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right): https://codereview.chromium.org/2880353002/diff/60001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp#newcode1985 third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp:1985: "<style> font-family: Ahem; </style>" This is not correct CSS. ...
3 years, 7 months ago (2017-05-17 18:46:39 UTC) #20
tanvir
On 2017/05/17 18:46:39, Xiaocheng wrote: > https://codereview.chromium.org/2880353002/diff/60001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp > File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right): > > https://codereview.chromium.org/2880353002/diff/60001/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp#newcode1985 > ...
3 years, 7 months ago (2017-05-19 07:53:01 UTC) #25
Xiaocheng
3 years, 7 months ago (2017-05-19 18:15:57 UTC) #26
On 2017/05/19 at 07:53:01, tanvir.rizvi wrote:
> On 2017/05/17 18:46:39, Xiaocheng wrote:
> >
https://codereview.chromium.org/2880353002/diff/60001/third_party/WebKit/Sour...
> > File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right):
> > 
> >
https://codereview.chromium.org/2880353002/diff/60001/third_party/WebKit/Sour...
> > third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp:1985: "<style>
> > font-family: Ahem; </style>"
> > This is not correct CSS. There should be a selector:
> > 
> > <style>p {font-family: Ahem}</style>
> > 
> > Could you try again with this fixed?
> 
> We can still see the failure. 
> So will these kind of test case below be sufficient ?
> EXPECT_TRUE(quads_start_to_two[0].ContainsQuad(quads_start_to_three[0]));
> EXPECT_TRUE(quads_start_to_two[1].ContainsQuad(quads_start_to_three[1]));

It seems better to check the relative positions:

EXPECT_EQ(2u, quads_start_to_two.size());
EXPECT_EQ(3u, quads_start_to_three.size());
EXPECT_EQ(quads_start_to_three[0], quads_start_to_two[0]);
EXPECT_EQ(quads_start_to_three[1], quads_start_to_two[1]);
assert that quads_start_to_three[1] is to the right of quads_start_to_three[0]
assert that quads_start_to_three[2] is to the right of quads_start_to_three[1]

Powered by Google App Engine
This is Rietveld 408576698