Skip to content
Permalink
Browse files
2011-02-27 Aparna Nandyal <aparna.nand@wipro.com>
        Reviewed by Antonio Gomes.

        [Qt] QtTestBrowser - Horizontal scrollbar disappears on navigating pages using Back/Forward
        https://bugs.webkit.org/show_bug.cgi?id=53917

        The bug got fixed by other changes. Adding test case to avoid
        regressions in the future.

        * fast/overflow/horizontal-scroll-after-back-expected.txt: Added.
        * fast/overflow/horizontal-scroll-after-back.html: Added.
2011-02-27  Aparna Nandyal  <aparna.nand@wipro.com>

        Reviewed by Antonio Gomes.

        [Qt] QtTestBrowser - Horizontal scrollbar disappears on navigating pages using Back/Forward
        https://bugs.webkit.org/show_bug.cgi?id=53917

        Adding test case to check the scenario to avoid regressions in the
        future.

        * tests/qwebframe/tst_qwebframe.cpp:

Canonical link: https://commits.webkit.org/69761@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Feb 28, 2011
1 parent fc4828f commit a6e553c2a85d1cb926502790cf898f3fff51871d
Showing 5 changed files with 112 additions and 0 deletions.
@@ -1,3 +1,16 @@
2011-02-27 Aparna Nandyal <aparna.nand@wipro.com>

Reviewed by Antonio Gomes.

[Qt] QtTestBrowser - Horizontal scrollbar disappears on navigating pages using Back/Forward
https://bugs.webkit.org/show_bug.cgi?id=53917

The bug got fixed by other changes. Adding test case to avoid
regressions in the future.

* fast/overflow/horizontal-scroll-after-back-expected.txt: Added.
* fast/overflow/horizontal-scroll-after-back.html: Added.

2011-02-27 Adam Roben <aroben@apple.com>

Add Windows expected failure results for fast/events/pageshow-pagehide-on-back-cached.html
@@ -0,0 +1 @@
PASS
@@ -0,0 +1,62 @@
<html>
<script>

// Navigation steps
// 1. loads this page and it has a horizontal scrollbar
// 2. Navigates to a data URL and navigates back
function verifyPage()
{
var result = (innerHeight === document.documentElement.offsetHeight)
? "FAIL: Scrollbar did not appear"
: "PASS";
document.body.innerHTML = result;
if (window.layoutTestController)
layoutTestController.notifyDone();
}

function navigateAwayAndBack()
{
// Simulate a link click to create a history entry
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,
0, 0, 0, 0, 0, false, false, false, false, 0, null);
document.getElementById('anchor').dispatchEvent(evt);
}

function runTestStep()
{
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
}
window.setTimeout("navigateAwayAndBack()", 200);
}

function onVerifyPage(evt)
{
// If pageshow is happening as result of navigation back then we proceed.
if (evt.persisted)
setTimeout("verifyPage()", 200);
}

window.onpageshow = onVerifyPage;
</script>
<head>
<style type="text/css">
<!--
#content {
background: #fff;
position: absolute;
top: 2px;
left: 2px;
width: 1500px;
height: 1500px;
}
-->
</style>
</head>
<body onload='runTestStep()'>
<div id="content"> <a id='anchor' href='data:text/html,<body onload="history.back()"></body>'>Where is the scrollbar?</a></div>
</body>
</html>
@@ -1,3 +1,15 @@
2011-02-27 Aparna Nandyal <aparna.nand@wipro.com>

Reviewed by Antonio Gomes.

[Qt] QtTestBrowser - Horizontal scrollbar disappears on navigating pages using Back/Forward
https://bugs.webkit.org/show_bug.cgi?id=53917

Adding test case to check the scenario to avoid regressions in the
future.

* tests/qwebframe/tst_qwebframe.cpp:

2011-02-27 Benjamin Poulain <benjamin.poulain@nokia.com>

Reviewed by Andreas Kling.
@@ -590,6 +590,7 @@ public slots:
void cleanup();

private slots:
void horizontalScrollAfterBack();
void getSetStaticProperty();
void getSetDynamicProperty();
void getSetChildren();
@@ -3102,6 +3103,29 @@ void tst_QWebFrame::scrollbarsOff()
QCOMPARE(mainFrame->documentElement().findAll("span").at(0).toPlainText(), QString("SUCCESS"));
}

void tst_QWebFrame::horizontalScrollAfterBack()
{
QWebView view;
QWebFrame* frame = view.page()->mainFrame();
QSignalSpy loadSpy(view.page(), SIGNAL(loadFinished(bool)));

view.page()->settings()->setMaximumPagesInCache(2);
frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);

view.load(QUrl("qrc:/testiframe2.html"));
view.resize(200, 200);
QTRY_COMPARE(loadSpy.count(), 1);
QTRY_VERIFY((frame->scrollBarGeometry(Qt::Horizontal)).height());

view.load(QUrl("qrc:/testiframe.html"));
QTRY_COMPARE(loadSpy.count(), 2);

view.page()->triggerAction(QWebPage::Back);
QTRY_COMPARE(loadSpy.count(), 3);
QTRY_VERIFY((frame->scrollBarGeometry(Qt::Horizontal)).height());
}

void tst_QWebFrame::evaluateWillCauseRepaint()
{
QWebView view;

0 comments on commit a6e553c

Please sign in to comment.