|
|
DescriptionAdd 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 #Messages
Total messages: 26 (20 generated)
Description was changed from ========== Make ComputeTextQuads to support EphemeralRangeInFlatTree strategy This CL makes ComputeTextQuads to support EphemeralRangeInFlatTree strategy. EphemeralRange is a strategy class and it supports DOM tree and flat tree. Currently ComputeTextQuads supported only DOM tree EphemeralRange. BUG=691198 ========== to ========== Make ComputeTextQuads to support EphemeralRangeInFlatTree strategy This CL makes ComputeTextQuads to support EphemeralRangeInFlatTree strategy. EphemeralRange is a strategy class and it supports DOM tree and flat tree. Currently ComputeTextQuads supported only DOM tree EphemeralRange. BUG=691198 ==========
tanvir.rizvi@samsung.com changed reviewers: + shanmuga.m@samsung.com, srirama.m@samsung.com
Description was changed from ========== Make ComputeTextQuads to support EphemeralRangeInFlatTree strategy This CL makes ComputeTextQuads to support EphemeralRangeInFlatTree strategy. EphemeralRange is a strategy class and it supports DOM tree and flat tree. Currently ComputeTextQuads supported only DOM tree EphemeralRange. BUG=691198 ========== to ========== 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 ==========
tanvir.rizvi@samsung.com changed reviewers: + xiaochengh@chromium.org, yosin@chromium.org
PTAL!!! Added webkit unit test case for ComputeTextQuads. Currently ComputeTextQuads do not have any callSite with EphemeralRangeInFlatTree so didn't added the test case for Flat Tree. Thanks!!!
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right): https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Sour... 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/Sour... third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp:1985: "<p id='host'>00" I guess We need to have |<style>font-family: Ahem;</style>| to get same results on all platform, but not sure. Let's see trybots results. Another way is checking relation for ranges, e.g. containment, disjoint, upper/lower, etc.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by tanvir.rizvi@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer,_not_ a full super star committer. Committers are members of the group "project-chromium-committers". Note that this has nothing to do with OWNERS files.
The CQ bit was checked by shanmuga.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
On 2017/05/16 10:05:07, yosin_UTC9 wrote: > https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp (right): > > https://codereview.chromium.org/2880353002/diff/40001/third_party/WebKit/Sour... > 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/Sour... > third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp:1985: "<p > id='host'>00" > I guess We need to have |<style>font-family: Ahem;</style>| to get same results > on all platform, > but not sure. > > Let's see trybots results. > > Another way is checking relation for ranges, e.g. containment, disjoint, > upper/lower, etc. @Yosin, as you suspected the test case is failing on Mac and Windows. regarding the second approach, will the below code be sufficient to verify ComputeTextQuads ? 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]));
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?
The CQ bit was checked by srirama.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
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]));
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] |