WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34167
[Qt] DRT WebHistory support
https://bugs.webkit.org/show_bug.cgi?id=34167
Summary
[Qt] DRT WebHistory support
Diego Gonzalez
Reported
2010-01-26 07:56:31 PST
Activate WebHistory support in Qt DRT. Implement the keepWebHistory() and webHistoryItemCount() in LayoutTestController LayoutTests: http/tests/history
Attachments
Activate history in DRT
(2.43 KB, patch)
2010-01-26 08:23 PST
,
Diego Gonzalez
no flags
Details
Formatted Diff
Diff
Proposed patch to pass history tests
(5.81 KB, patch)
2010-01-26 11:28 PST
,
Diego Gonzalez
kenneth
: review-
Details
Formatted Diff
Diff
Proposed patch v0.2
(5.81 KB, patch)
2010-01-26 11:35 PST
,
Diego Gonzalez
no flags
Details
Formatted Diff
Diff
Proposed patch v0.3
(5.81 KB, patch)
2010-01-26 11:44 PST
,
Diego Gonzalez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Diego Gonzalez
Comment 1
2010-01-26 08:23:07 PST
Created
attachment 47412
[details]
Activate history in DRT Possible way to activate the history in Qt DRT
Diego Gonzalez
Comment 2
2010-01-26 09:36:32 PST
The tests is not passing with the patch above (47412) because in the redirect file page (LayoutTests/http/tests/history/resources/redirect-target.html) the webHistoryItemCount is increased in one according the code below. function testHistoryItemCount() { var expected = parseInt(location.hash.slice(1)); var actual = layoutTestController.webHistoryItemCount + 1; // Add one to include the referring page, which loaded before we started recording history. if (actual === expected) log("PASS: History item count should be " + expected + " and is."); else log("FAIL: History item count should be " + expected + " but instead is " + actual + "."); } In our case is not necessary to add one to webHistoryItemCount because QWebHistory, created in QWebPage, records the referred page. One possible way to make the tests succeed is use specific expected files for Qt port use in these tests. Other ways coukd be: decrease in one the return of layoutTestController.webHistoryItemCount(); use the backItems() size; or limit the maximum count of QWebHistory. Someone has any suggestion or comment of the the best way to solve it?
Antonio Gomes
Comment 3
2010-01-26 09:42:43 PST
> In our case is not necessary to add one to webHistoryItemCount because > QWebHistory, created in QWebPage, records the referred page. > > One possible way to make the tests succeed is use specific expected files for > Qt port use in these tests.
I vote for this option.
> > Other ways coukd be: decrease in one the return of > layoutTestController.webHistoryItemCount(); use the backItems() size; or limit > the maximum count of QWebHistory.
This way, we would be adapting our implementation to match a test result. @kenneth, simon: thoughts ?
Kenneth Rohde Christiansen
Comment 4
2010-01-26 09:46:13 PST
(In reply to
comment #3
)
> > In our case is not necessary to add one to webHistoryItemCount because > > QWebHistory, created in QWebPage, records the referred page. > > > > One possible way to make the tests succeed is use specific expected files for > > Qt port use in these tests. > > I vote for this option.
Expected results saying FAIL. That doesn't sound good. Better just add 1 to the result.
Diego Gonzalez
Comment 5
2010-01-26 09:55:29 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > > In our case is not necessary to add one to webHistoryItemCount because > > > QWebHistory, created in QWebPage, records the referred page. > > > > > > One possible way to make the tests succeed is use specific expected files for > > > Qt port use in these tests. > > > > I vote for this option. > > Expected results saying FAIL. That doesn't sound good. Better just add 1 to the > result.
Kenneth, you mean add 1 in the expected file or when the method returns?
Diego Gonzalez
Comment 6
2010-01-26 11:28:25 PST
Created
attachment 47427
[details]
Proposed patch to pass history tests With this patch the following tests are passing now: http/tests/history/redirect-js-form-submit-2-seconds.html http/tests/history/redirect-js-location-2-seconds.html http/tests/history/redirect-js-location-assign-before-load.html http/tests/history/redirect-js-location-href-2-seconds.html http/tests/history/redirect-js-location-href-0-seconds.html http/tests/history/redirect-js-location-replace-2-seconds.html http/tests/history/redirect-js-document-location-before-load.html http/tests/history/redirect-js-location-assign-0-seconds.html http/tests/history/redirect-js-location-0-seconds.html http/tests/history/redirect-meta-refresh-2-seconds.html http/tests/history/redirect-js-document-location-2-seconds.html http/tests/history/redirect-js-location-replace-before-load.html http/tests/history/redirect-js-form-submit-0-seconds.html http/tests/history/redirect-js-location-before-load.html http/tests/history/redirect-js-location-href-before-load.html http/tests/history/redirect-js-form-submit-before-load.html http/tests/history/redirect-js-document-location-0-seconds.html http/tests/history/redirect-js-location-assign-2-seconds.html http/tests/history/redirect-js-location-replace-0-seconds.html http/tests/history/redirect-meta-refresh-0-seconds.html http/tests/history/redirect-301.pl http/tests/history/redirect-303.pl http/tests/history/redirect-200-refresh-2-seconds.pl http/tests/history/redirect-307.pl http/tests/history/redirect-302.pl http/tests/history/redirect-200-refresh-0-seconds.pl
Kenneth Rohde Christiansen
Comment 7
2010-01-26 11:29:39 PST
Comment on
attachment 47427
[details]
Proposed patch to pass history tests Please don't mark your own patches as r+
Kenneth Rohde Christiansen
Comment 8
2010-01-26 11:31:39 PST
Comment on
attachment 47427
[details]
Proposed patch to pass history tests
> + // Subtract one here as out QWebHistory::count() includes the actual page, > + // which is not considered in the DRT tests.
our, not out
> + return m_webHistory->count() - 1; > +} > + > void LayoutTestController::keepWebHistory() > { > - // FIXME: implement > + m_webHistory = m_drt->webPage()->history(); > }
Diego Gonzalez
Comment 9
2010-01-26 11:35:14 PST
Created
attachment 47428
[details]
Proposed patch v0.2 Fixed typo
Diego Gonzalez
Comment 10
2010-01-26 11:44:40 PST
Created
attachment 47429
[details]
Proposed patch v0.3 return -1 if web history doesn't exists
WebKit Commit Bot
Comment 11
2010-01-26 21:21:17 PST
Comment on
attachment 47429
[details]
Proposed patch v0.3 Clearing flags on attachment: 47429 Committed
r53895
: <
http://trac.webkit.org/changeset/53895
>
WebKit Commit Bot
Comment 12
2010-01-26 21:21:23 PST
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 13
2010-01-26 23:56:00 PST
There are 4 failing tests on buildbot after
http://trac.webkit.org/changeset/53895
http/tests/history/redirect-301.pl http/tests/history/redirect-302.pl http/tests/history/redirect-303.pl http/tests/history/redirect-307.pl Skipped them by
http://trac.webkit.org/changeset/53906
Csaba Osztrogonác
Comment 14
2010-01-26 23:57:20 PST
detailed results:
http://build.webkit.org/results/Qt%20Linux%20Release/r53905%20%286565%29/results.html
Diego Gonzalez
Comment 15
2010-01-27 04:46:10 PST
(In reply to
comment #14
)
> detailed results: >
http://build.webkit.org/results/Qt%20Linux%20Release/r53905%20%286565%29/results.html
I'm taking a look
Diego Gonzalez
Comment 16
2010-01-27 05:28:11 PST
For some reason LayoutTestController is not being instatiated in these tests. I'm checking it now!
Diego Gonzalez
Comment 17
2010-01-27 05:43:18 PST
(In reply to
comment #16
)
> For some reason LayoutTestController is not being instatiated in these tests. > I'm checking it now!
Actually the LayoutTestController is being instantiated. The keepWebHistory() is not being called because the check: if (window.layoutTestController) { layoutTestController.keepWebHistory(); layoutTestController.waitUntilDone(); } is not passing.
Diego Gonzalez
Comment 18
2010-01-27 05:51:22 PST
(In reply to
comment #17
)
> (In reply to
comment #16
) > > For some reason LayoutTestController is not being instatiated in these tests. > > I'm checking it now! > > Actually the LayoutTestController is being instantiated. The keepWebHistory() > is not being called because the check: > > if (window.layoutTestController) { > layoutTestController.keepWebHistory(); > layoutTestController.waitUntilDone(); > } > > is not passing.
Created another bug:
https://bugs.webkit.org/show_bug.cgi?id=34212
to investigate it. So, closing it
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug