[Webkit-unassigned] [Bug 29424] [Qt] QWebFrame: When a relative url is loaded then it will make it absolute internally, however this strips out any query/fragments

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 16 00:34:04 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=29424





--- Comment #6 from Aparna Nandyal <aparna.nand at wipro.com>  2011-02-16 00:34:04 PST ---
(In reply to comment #5)
> (From update of attachment 82506 [details])
> Needs a test. :)

Kling as discussed yesterday, I am able to write an automation test. The patch can get tested only when a relative url is passed to QWebView. But the way automation test framework is designed, the test html files are stored in resources directory and an absolute path like qrc:///resources/local.html needs to be passed. When this is passed, the code that needs to be tested is not hit. Tested the below code by passing relative url and it works fine. 

void tst_QWebView::loadRelativeUrl()
{
    QWebView view;
    QSignalSpy spy(view.page(), SIGNAL(loadFinished(bool)));

    // This is the line that should be in the final test. But its absolute path
    // QUrl url("qrc:///resources/local.html");

    // This url actually tests the patch
    QUrl url("local.html");

    url.setFragment("Overview");

    view.load(url);
    ::waitForSignal(&view, SIGNAL(loadFinished(bool)));
    QCOMPARE(spy.count(), 1);

    QUrl loadedUrl = view.page()->mainFrame()->url();
    QVERIFY(loadedUrl.hasFragment());
}

Any suggestions to get around this problem.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list