Bug 24869 - [Qt] tst_qwebpage.cpp has an incorrect case
Summary: [Qt] tst_qwebpage.cpp has an incorrect case
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 19:19 PDT by Erik L. Bunce
Modified: 2009-03-27 05:59 PDT (History)
1 user (show)

See Also:


Attachments
Fix to make the expected value 0 and not 2 (1.14 KB, patch)
2009-03-26 19:26 PDT, Erik L. Bunce
hausmann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik L. Bunce 2009-03-26 19:19:55 PDT
When running tst_qwebpage I get the following failure:
FAIL!  : tst_QWebPage::cursorMovements() Compared values are not the same
   Actual (page->selectionStartOffset()): 0
   Expected (2): 2
   Loc: [/Users/erik/work/webkit-svn2/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp(835)]

After analyzing the code, it turns out that the Expected value in the test was incorrect and not the Actual.

In this case the cursor is expected to be before the word "be", which occurs immediately after a <br/>, so the selectionStartOffset() should be 0, and not 2.
Comment 1 Erik L. Bunce 2009-03-26 19:26:41 PDT
Created attachment 28999 [details]
Fix to make the expected value 0 and not 2

Fix split out of patch 28829 of bug #24746 per request of Simon Hausmann.
Comment 2 Simon Hausmann 2009-03-27 05:59:41 PDT
Comment on attachment 28999 [details]
Fix to make the expected value 0 and not 2

Good catch.
Comment 3 Simon Hausmann 2009-03-27 05:59:55 PDT
Landed in r42035