Changeset 86697 in webkit
- Timestamp:
- May 17, 2011 12:35:37 PM (13 years ago)
- Location:
- trunk/Source/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/qt/ChangeLog
r86664 r86697 1 2011-05-17 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] Simplify syntax in test code to make prepare-ChangeLog less confused 6 https://bugs.webkit.org/show_bug.cgi?id=60978 7 8 Backslash to escape newlines was confusing both prepare-ChangeLog and the 9 QtCreator highlight system. 10 11 * tests/qwebframe/tst_qwebframe.cpp: 12 (tst_QWebFrame::evalJSV): 13 Remove usage of backslash to escape newlines in string literal. 14 1 15 2011-05-17 Young Han Lee <joybro@company100.net> 2 16 -
trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r85772 r86697 683 683 QString escaped = s; 684 684 escaped.replace('\'', "\\'"); // Don't preescape your single quotes! 685 evalJS("var retvalue;\ 686 var typevalue; \ 687 try {\ 688 retvalue = eval('" + escaped + "'); \ 689 typevalue = typeof retvalue; \ 690 if (retvalue instanceof Array) \ 691 typevalue = 'array'; \ 692 } \ 693 catch(e) {\ 694 retvalue = e.name + ': ' + e.message;\ 695 typevalue = 'error';\ 696 }"); 685 QString code("var retvalue; " 686 "var typevalue; " 687 "try { " 688 " retvalue = eval('%1'); " 689 " typevalue = typeof retvalue; " 690 " if (retvalue instanceof Array) " 691 " typevalue = 'array'; " 692 "} catch(e) { " 693 " retvalue = e.name + ': ' + e.message; " 694 " typevalue = 'error'; " 695 "}"); 696 evalJS(code.arg(escaped)); 697 697 698 QVariant ret = evalJSV("retvalue"); 698 699 if (ret.userType() != QMetaType::Void)
Note: See TracChangeset
for help on using the changeset viewer.