Changeset 52069 in webkit
- Timestamp:
- Dec 13, 2009 2:34:54 PM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/ChangeLog
r52065 r52069 1 2009-12-13 Benjamin Poulain <benjamin.poulain@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005 6 https://bugs.webkit.org/show_bug.cgi?id=29008 7 8 * tests/qwebframe/tst_qwebframe.cpp: 9 1 10 2009-12-13 Simon Hausmann <hausmann@webkit.org> 2 11 -
trunk/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r52037 r52069 551 551 void objectDeleted(); 552 552 void typeConversion(); 553 void arrayObjectEnumerable(); 553 554 void symmetricUrl(); 554 555 void progressSignal(); … … 2071 2072 } 2072 2073 2074 class StringListTestObject : public QObject { 2075 Q_OBJECT 2076 public Q_SLOTS: 2077 QVariant stringList() 2078 { 2079 return QStringList() << "Q" << "t"; 2080 }; 2081 }; 2082 2083 void tst_QWebFrame::arrayObjectEnumerable() 2084 { 2085 QWebPage page; 2086 QWebFrame* frame = page.mainFrame(); 2087 QObject* qobject = new StringListTestObject(); 2088 frame->addToJavaScriptWindowObject("test", qobject, QScriptEngine::ScriptOwnership); 2089 2090 const QString script("var stringArray = test.stringList();" 2091 "var result = '';" 2092 "for (var i in stringArray) {" 2093 " result += stringArray[i];" 2094 "}" 2095 "result;"); 2096 QCOMPARE(frame->evaluateJavaScript(script).toString(), QString::fromLatin1("Qt")); 2097 } 2098 2073 2099 void tst_QWebFrame::symmetricUrl() 2074 2100 {
Note: See TracChangeset
for help on using the changeset viewer.