void setHtmlWithJSAlert();
void ipv6HostEncoding();
void metaData();
-#if !defined(Q_WS_MAEMO_5)
- // as maemo 5 does not use QComboBoxes to implement the popups
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN)
+ // as maemo 5 && symbian do not use QComboBoxes to implement the popups
// this test does not make sense for it.
void popupFocus();
#endif
QString type;
QString ret = evalJS("(function() { }).connect()", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: Result of expression '(function() { }).connect' [undefined] is not a function."));
+ QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function"));
}
{
QString type;
QString ret = evalJS("var o = { }; o.connect = Function.prototype.connect; o.connect()", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: Result of expression 'o.connect' [undefined] is not a function."));
+ QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function"));
}
{
QString type;
QString ret = evalJS("(function() { }).connect(123)", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: Result of expression '(function() { }).connect' [undefined] is not a function."));
+ QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function"));
}
{
QString type;
QString ret = evalJS("var o = { }; o.connect = Function.prototype.connect; o.connect(123)", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: Result of expression 'o.connect' [undefined] is not a function."));
+ QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function"));
}
{
{
QTest::addColumn<QString>("html");
QTest::addColumn<int>("signalCount");
- QTest::newRow("with <script>") << "<html><body><script></script><p>hello world</p></body></html>" << 1;
+ QTest::newRow("with <script>") << "<html><body><script>i=0</script><p>hello world</p></body></html>" << 1;
+ // NOTE: Empty scripts no longer cause this signal to be emitted.
+ QTest::newRow("with empty <script>") << "<html><body><script></script><p>hello world</p></body></html>" << 0;
QTest::newRow("without <script>") << "<html><body><p>hello world</p></body></html>" << 0;
}
QCOMPARE(metaData.value("nonexistant"), QString());
}
-#if !defined(Q_WS_MAEMO_5)
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN)
void tst_QWebFrame::popupFocus()
{
QWebView view;
" </body>"
"</html>");
view.resize(400, 100);
+ // Call setFocus before show to work around http://bugreports.qt.nokia.com/browse/QTBUG-14762
+ view.setFocus();
view.show();
QTest::qWaitForWindowShown(&view);
- view.setFocus();
+ view.activateWindow();
QTRY_VERIFY(view.hasFocus());
// open the popup by clicking. check if focus is on the popup
// hide the popup and check if focus is on the page
combo->hidePopup();
- QTRY_VERIFY(view.hasFocus() && !combo->view()->hasFocus()); // Focus should be back on the WebView
+ QTRY_VERIFY(view.hasFocus()); // Focus should be back on the WebView
}
#endif
view.resize(400, 100);
view.show();
QTest::qWaitForWindowShown(&view);
+ view.activateWindow();
view.setFocus();
QTRY_VERIFY(view.hasFocus());