WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Using QSignalSpy to control whether a load finished signal has been emited instead of just wait for some miliseconds.
fixed_hasSetFocus.diff (text/plain), 2.42 KB, created by
Andre Pedralho
on 2009-07-27 11:39:18 PDT
(
hide
)
Description:
Using QSignalSpy to control whether a load finished signal has been emited instead of just wait for some miliseconds.
Filename:
MIME Type:
Creator:
Andre Pedralho
Created:
2009-07-27 11:39:18 PDT
Size:
2.42 KB
patch
obsolete
>commit c5c523573d7e7af9446917bff328b3d459c951d4 >Author: Andre Pedralho <andre.pedralho@openbossa.org> >Date: Fri Jul 24 10:44:53 2009 -0400 > > 2009-07-24 Andre Pedralho <andre.pedralho@openbossa.org> > > Reviewed by NOBODY (OOPS!). > > Fixed tst_QWebFrame::hasSetFocus test which was using > an undefined resource. > https://bugs.webkit.org/show_bug.cgi?id=27512 > > * tests/qwebframe/tst_qwebframe.cpp: > >diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog >index 8d6a9d8..866d795 100644 >--- a/WebKit/qt/ChangeLog >+++ b/WebKit/qt/ChangeLog >@@ -1,3 +1,13 @@ >+2009-07-24 Andre Pedralho <andre.pedralho@openbossa.org> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fixed tst_QWebFrame::hasSetFocus test which was using >+ an undefined resource. >+ https://bugs.webkit.org/show_bug.cgi?id=27512 >+ >+ * tests/qwebframe/tst_qwebframe.cpp: >+ > 2009-07-27 Volker Hilsheimer <volker.hilsheimer@nokia.com> > > Reviewed by Simon Hausmann. >diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp >index 1616b5f..135b3fb 100644 >--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp >+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp >@@ -2544,16 +2544,29 @@ void tst_QWebFrame::baseUrl() > > void tst_QWebFrame::hasSetFocus() > { >+ QString html("<html><body><p>top</p>" \ >+ "<iframe width='80%' height='30%'/>" \ >+ "</body></html>"); >+ > QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool))); >- QUrl url = QUrl("qrc:///frametest/iframe.html"); >- m_page->mainFrame()->load(url); >+ m_page->mainFrame()->setHtml(html); >+ >+ QTest::qWait(200); >+ QCOMPARE(loadSpy.size(), 1); >+ >+ QList<QWebFrame*> children = m_page->mainFrame()->childFrames(); >+ QWebFrame *frame = children.at(0); >+ QString innerHtml("<html><body><p>another iframe</p>" \ >+ "<iframe width='80%' height='30%'/>" \ >+ "</body></html>"); >+ frame->setHtml(innerHtml); > >- ::waitForSignal(m_page, SIGNAL(loadFinished(bool))); >+ QTest::qWait(200); >+ QCOMPARE(loadSpy.size(), 2); > > m_page->mainFrame()->setFocus(); > QVERIFY(m_page->mainFrame()->hasFocus()); > >- QList<QWebFrame*> children = m_page->mainFrame()->childFrames(); > for (int i = 0; i < children.size(); ++i) { > children.at(i)->setFocus(); > QVERIFY(children.at(i)->hasFocus());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
hausmann
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 27512
:
33207
|
33445
| 33560