summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/tst_qmltests.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-07-19 14:12:54 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-11 17:25:32 +0000
commit7282fb4fb4861320539f2b7288f63e1d4f48749d (patch)
tree3fb62ed4d45875be975410b08c776888803748ec /tests/auto/quick/qmltests/tst_qmltests.cpp
parent82499104972d24027044acaff1136ea7d758efe2 (diff)
Adaptations for Chromium 60
Change-Id: I536258e22c2ec143f2fd3f1cbda229e0611b6af4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/quick/qmltests/tst_qmltests.cpp')
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 5dc909709..2aa24b76c 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -114,8 +114,17 @@ int main(int argc, char **argv)
// Force to use English language for testing due to error message checks
QLocale::setDefault(QLocale("en"));
- if (!QCoreApplication::instance())
- app.reset(new Application(argc, argv));
+ static QByteArrayList params = {QByteArrayLiteral("--use-fake-device-for-media-stream")};
+ QVector<const char *> w_argv(argc); \
+ for (int i = 0; i < argc; ++i) \
+ w_argv[i] = argv[i]; \
+ for (int i = 0; i < params.size(); ++i) \
+ w_argv.append(params[i].data()); \
+ int w_argc = w_argv.size(); \
+
+ if (!QCoreApplication::instance()) {
+ app.reset(new Application(w_argc, const_cast<char **>(w_argv.data())));
+ }
QtWebEngine::initialize();
QQuickWebEngineProfile::defaultProfile()->setOffTheRecord(true);