diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-04-06 10:36:47 (GMT) |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-04-06 10:36:47 (GMT) |
commit | bb35b65bbfba82e0dd0ac306d3dab54436cdaff6 (patch) | |
tree | 8174cb262a960ff7b2e4aa8f1aaf154db71d2636 /src/3rdparty/webkit/WebKit/qt/tests/qwebinspector | |
parent | 4b27d0d887269583a0f76e922948f8c25e96ab88 (diff) | |
download | Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.zip Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.gz Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.bz2 |
Update src/3rdparty/webkit from trunk.
Imported from 839d8709327f925aacb3b6362c06152594def97e
in branch qtwebkit-2.0 of repository
git://gitorious.org/+qtwebkit-developers/webkit/qtwebkit.git
Rubber-stamped-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/tests/qwebinspector')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp | 68 |
2 files changed, 70 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro new file mode 100644 index 0000000..ac51929 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro @@ -0,0 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. +include(../tests.pri) diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp new file mode 100644 index 0000000..12cd630 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp @@ -0,0 +1,68 @@ +/* + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <QtTest/QtTest> + +#include <qdir.h> +#include <qwebinspector.h> +#include <qwebpage.h> +#include <qwebsettings.h> + +class tst_QWebInspector : public QObject { + Q_OBJECT + +private slots: + void attachAndDestroy(); +}; + +void tst_QWebInspector::attachAndDestroy() +{ + { // External inspector + manual destruction of page first + QWebPage* page = new QWebPage(); + page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); + QWebInspector* inspector = new QWebInspector(); + inspector->setPage(page); + page->updatePositionDependentActions(QPoint(0, 0)); + page->triggerAction(QWebPage::InspectElement); + + delete page; + delete inspector; + } + { // External inspector + manual destruction of inspector first + QWebPage* page = new QWebPage(); + page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); + QWebInspector* inspector = new QWebInspector(); + inspector->setPage(page); + page->updatePositionDependentActions(QPoint(0, 0)); + page->triggerAction(QWebPage::InspectElement); + + delete inspector; + delete page; + } + { // Internal inspector + QWebPage page; + page.settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); + page.updatePositionDependentActions(QPoint(0, 0)); + page.triggerAction(QWebPage::InspectElement); + } +} + +QTEST_MAIN(tst_QWebInspector) + +#include "tst_qwebinspector.moc" |