summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-12-05 14:38:17 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-12-12 14:48:11 +0100
commit893b57559f198304b627a594ca5e1c3ac36d0907 (patch)
treec5092e04171cfb2c3232ec70cd9d20715857c6fc /tests
parent6ec3268a30a63d5c15258ea6f4f792e21930b093 (diff)
QML API for WebEngineProfiles
Introduces the QML API for the WebEngineProfiles already implemented for QtWebEngineWidgets. [ChangeLog][QtWebEngineQML][QQuickWebEngineProfile] New API for profiles applying to groups of QQuickWebEnginePages. Change-Id: Ideccddb9f1fb19628297592fe0cec504c9890e46 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/quicktestbrowser/quickwindow.qml26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/quicktestbrowser/quickwindow.qml b/tests/quicktestbrowser/quickwindow.qml
index b1be6db3e..7bc9dd289 100644
--- a/tests/quicktestbrowser/quickwindow.qml
+++ b/tests/quicktestbrowser/quickwindow.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.1
-import QtWebEngine 1.0
+import QtWebEngine 1.1
import QtWebEngine.experimental 1.0
import QtQuick.Controls 1.0
@@ -73,6 +73,17 @@ ApplicationWindow {
property alias errorPageEnabled: errorPageEnabled.checked;
}
+ WebEngineProfile {
+ id: testProfile;
+ storageName: "Test";
+ httpCacheType: httpDiskCacheEnabled.checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache;
+ }
+
+ WebEngineProfile {
+ id: otrProfile;
+ offTheRecord: true;
+ }
+
// Make sure the Qt.WindowFullscreenButtonHint is set on Mac.
Component.onCompleted: flags = flags | Qt.WindowFullscreenButtonHint
@@ -235,6 +246,18 @@ ApplicationWindow {
checked: WebEngine.settings.errorPageEnabled
onCheckedChanged: WebEngine.settings.errorPageEnabled = checked
}
+ MenuItem {
+ id: offTheRecordEnabled
+ text: "Off The Record"
+ checkable: true
+ checked: false
+ }
+ MenuItem {
+ id: httpDiskCacheEnabled
+ text: "HTTP Disk Cache"
+ checkable: true
+ checked: (testProfile.httpCacheType == WebEngineProfile.DiskHttpCache)
+ }
}
}
}
@@ -312,6 +335,7 @@ ApplicationWindow {
WebEngineView {
id: webEngineView
+ profile: offTheRecordEnabled.checked ? otrProfile : testProfile
anchors {
fill: parent