summaryrefslogtreecommitdiffstats
path: root/tests/quicktestbrowser/utils.h
diff options
context:
space:
mode:
authorPaulo Pinheiro <paulovap.os@gmail.com>2015-02-25 22:00:57 -0300
committerPaulo Pinheiro <paulovap.os@gmail.com>2015-03-04 20:14:03 +0000
commit378fbbcbc9c65d1462ea6994f1f680412531a043 (patch)
tree05aa071b3ea4e4edf47df676e821697288873079 /tests/quicktestbrowser/utils.h
parent5b1f762887b2332cea0d71f1f57b29f710c4cb15 (diff)
Quick: Fix handling of multiple certificate errors per request
This patch enables Quick API to handle multiple certificate errors per requests and update the example projects. Chromium 40 branch raise an certificate error for every resource loaded in a request (.js, .css, .html) instead of only one (previous behavior), so requests with more than one certificate error were automatically rejected. Change-Id: Ibaa3027cd6e7f22b5dc51dcd52f76ccf5ea162d3 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Diffstat (limited to 'tests/quicktestbrowser/utils.h')
-rw-r--r--tests/quicktestbrowser/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/quicktestbrowser/utils.h b/tests/quicktestbrowser/utils.h
index 0f4460df..52025b7e 100644
--- a/tests/quicktestbrowser/utils.h
+++ b/tests/quicktestbrowser/utils.h
@@ -48,6 +48,7 @@ class Utils : public QObject {
Q_OBJECT
public:
Q_INVOKABLE static QUrl fromUserInput(const QString& userInput);
+ Q_INVOKABLE static QString domainFromString(const QString& urlString);
};
inline QUrl Utils::fromUserInput(const QString& userInput)
@@ -58,4 +59,9 @@ inline QUrl Utils::fromUserInput(const QString& userInput)
return QUrl::fromUserInput(userInput);
}
+inline QString Utils::domainFromString(const QString& urlString)
+{
+ return QUrl::fromUserInput(urlString).host();
+}
+
#endif // UTILS_H