diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/qmltests/data/script-with-metadata.js | 4 | ||||
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_userScripts.qml | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/quick/qmltests/data/script-with-metadata.js b/tests/auto/quick/qmltests/data/script-with-metadata.js index 4dcf50f55..de2e3974c 100644 --- a/tests/auto/quick/qmltests/data/script-with-metadata.js +++ b/tests/auto/quick/qmltests/data/script-with-metadata.js @@ -2,8 +2,10 @@ // @name Test script // @homepageURL http://www.qt.io/ // @description Test script with metadata block -// @include *test*.html +// @include *data/test*.html +// @include /favicon.html?$/ // @exclude *test2.html +// @exclude /test[-]iframe/ // @run-at document-end // ==/UserScript== diff --git a/tests/auto/quick/qmltests/data/tst_userScripts.qml b/tests/auto/quick/qmltests/data/tst_userScripts.qml index e9a4eba99..d7c7d5983 100644 --- a/tests/auto/quick/qmltests/data/tst_userScripts.qml +++ b/tests/auto/quick/qmltests/data/tst_userScripts.qml @@ -170,7 +170,7 @@ Item { webEngineView.userScripts = [ scriptWithMetadata ]; - // @include *test*.html + // @include *data/test*.html webEngineView.url = Qt.resolvedUrl("test1.html"); webEngineView.waitForLoadSucceeded(); tryCompare(webEngineView, "title", "New title"); @@ -179,6 +179,16 @@ Item { webEngineView.url = Qt.resolvedUrl("test2.html"); webEngineView.waitForLoadSucceeded(); tryCompare(webEngineView, "title", "Test page with huge link area"); + + // @include /favicon.html?$/ + webEngineView.url = Qt.resolvedUrl("favicon.html"); + webEngineView.waitForLoadSucceeded(); + tryCompare(webEngineView, "title", "New title"); + + // @exclude /test[-]iframe/ + webEngineView.url = Qt.resolvedUrl("test-iframe.html"); + webEngineView.waitForLoadSucceeded(); + tryCompare(webEngineView, "title", "Test page with huge link area and iframe"); } function test_profileWideScript() { |