summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/data
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-04-12 17:35:19 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-05-04 12:27:20 +0000
commit240efee49a8e4402f2048a05c596605b2feadbd3 (patch)
tree8df93a1a1732bafe78192f70cfdb54bde8b1b3b5 /tests/auto/quick/qmltests/data
parent0bf8a13a4d0391339bae686e199fb922b64a1dcc (diff)
Combine candidate icons for a page into a single icon
For the Widget API the QIcon returned by QWebEnginePage::icon() function contains all the candidate icons for the current page. For the Quick API the QQuickWebEngineFaviconProvider provides the best quality icon for the requested size from the candidates. Task-number: QTBUG-51179 Change-Id: I42b8427f957e2f2fc745dd0111bedcc71b577216 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qmltests/data')
-rw-r--r--tests/auto/quick/qmltests/data/favicon-candidates-gray.html29
-rw-r--r--tests/auto/quick/qmltests/data/favicon-multi-gray.html16
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray128.pngbin0 -> 146 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray16.pngbin0 -> 72 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray255.pngbin0 -> 335 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray32.pngbin0 -> 79 bytes
-rw-r--r--tests/auto/quick/qmltests/data/icons/gray64.pngbin0 -> 99 bytes
-rw-r--r--tests/auto/quick/qmltests/data/tst_favicon.qml33
8 files changed, 66 insertions, 12 deletions
diff --git a/tests/auto/quick/qmltests/data/favicon-candidates-gray.html b/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
new file mode 100644
index 000000000..3cbc4a4c3
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/favicon-candidates-gray.html
@@ -0,0 +1,29 @@
+<html>
+ <head>
+ <title>Gray Candidate Favicons Test</title>
+ <link rel="shortcut icon" href="icons/gray16.png" />
+ <link rel="shortcut icon" href="icons/gray32.png" />
+ <link rel="shortcut icon" href="icons/gray64.png" />
+ <link rel="shortcut icon" href="icons/gray128.png" />
+ <link rel="shortcut icon" href="icons/gray255.png" />
+ </head>
+ <body>
+ <h1>Gray Candidate Favicons Test</h1>
+ <table style="width:100%">
+ <tr>
+ <td align="center"><img src="icons/gray16.png" height="16" width="16" /></td>
+ <td align="center"><img src="icons/gray32.png" height="32" width="32" /></td>
+ <td align="center"><img src="icons/gray64.png" height="64" width="64" /></td>
+ <td align="center"><img src="icons/gray128.png" height="128" width="128" /></td>
+ <td align="center"><img src="icons/gray255.png" height="255" width="255" /></td>
+ </tr>
+ <tr>
+ <td align="center">16x16</td>
+ <td align="center">32x32</td>
+ <td align="center">64x64</td>
+ <td align="center">128x128</td>
+ <td align="center">255x255</td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/tests/auto/quick/qmltests/data/favicon-multi-gray.html b/tests/auto/quick/qmltests/data/favicon-multi-gray.html
index d6ac0909f..9b9b7432d 100644
--- a/tests/auto/quick/qmltests/data/favicon-multi-gray.html
+++ b/tests/auto/quick/qmltests/data/favicon-multi-gray.html
@@ -5,5 +5,21 @@
</head>
<body>
<h1>Gray Multi-sized Favicon Test</h1>
+ <table style="width:100%">
+ <tr>
+ <td align="center"><img src="icons/gray16.png" height="16" width="16" /></td>
+ <td align="center"><img src="icons/gray32.png" height="32" width="32" /></td>
+ <td align="center"><img src="icons/gray64.png" height="64" width="64" /></td>
+ <td align="center"><img src="icons/gray128.png" height="128" width="128" /></td>
+ <td align="center"><img src="icons/gray255.png" height="255" width="255" /></td>
+ </tr>
+ <tr>
+ <td align="center">16x16</td>
+ <td align="center">32x32</td>
+ <td align="center">64x64</td>
+ <td align="center">128x128</td>
+ <td align="center">255x255</td>
+ </tr>
+ </table>
</body>
</html>
diff --git a/tests/auto/quick/qmltests/data/icons/gray128.png b/tests/auto/quick/qmltests/data/icons/gray128.png
new file mode 100644
index 000000000..bf1cfaba0
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/icons/gray128.png
Binary files differ
diff --git a/tests/auto/quick/qmltests/data/icons/gray16.png b/tests/auto/quick/qmltests/data/icons/gray16.png
new file mode 100644
index 000000000..2a1a91a76
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/icons/gray16.png
Binary files differ
diff --git a/tests/auto/quick/qmltests/data/icons/gray255.png b/tests/auto/quick/qmltests/data/icons/gray255.png
new file mode 100644
index 000000000..549169551
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/icons/gray255.png
Binary files differ
diff --git a/tests/auto/quick/qmltests/data/icons/gray32.png b/tests/auto/quick/qmltests/data/icons/gray32.png
new file mode 100644
index 000000000..b269a528f
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/icons/gray32.png
Binary files differ
diff --git a/tests/auto/quick/qmltests/data/icons/gray64.png b/tests/auto/quick/qmltests/data/icons/gray64.png
new file mode 100644
index 000000000..e02559e5b
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/icons/gray64.png
Binary files differ
diff --git a/tests/auto/quick/qmltests/data/tst_favicon.qml b/tests/auto/quick/qmltests/data/tst_favicon.qml
index e959f19be..633859add 100644
--- a/tests/auto/quick/qmltests/data/tst_favicon.qml
+++ b/tests/auto/quick/qmltests/data/tst_favicon.qml
@@ -261,16 +261,26 @@ TestWebEngineView {
function test_faviconProvider_data() {
return [
- { tag: "8x8", size: 8, value: 16 },
- { tag: "16x16", size: 16, value: 16 },
- { tag: "17x17", size: 17, value: 32 },
- { tag: "31x31", size: 31, value: 32 },
- { tag: "32x32", size: 32, value: 32 },
- { tag: "33x33", size: 33, value: 64 },
- { tag: "64x64", size: 64, value: 64 },
- { tag: "128x128", size: 128, value: 128 },
- { tag: "255x255", size: 255, value: 255 },
- { tag: "256x256", size: 256, value: 255 },
+ { tag: "multi 8x8", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 8, value: 16 },
+ { tag: "multi 16x16", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 16, value: 16 },
+ { tag: "multi 17x17", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 17, value: 32 },
+ { tag: "multi 31x31", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 31, value: 32 },
+ { tag: "multi 32x32", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 32, value: 32 },
+ { tag: "multi 33x33", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 33, value: 64 },
+ { tag: "multi 64x64", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 64, value: 64 },
+ { tag: "multi 128x128", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 128, value: 128 },
+ { tag: "multi 255x255", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 255, value: 255 },
+ { tag: "multi 256x256", url: Qt.resolvedUrl("favicon-multi-gray.html"), size: 256, value: 255 },
+ { tag: "candidate 8x8", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 8, value: 16 },
+ { tag: "candidate 16x16", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 16, value: 16 },
+ { tag: "candidate 17x17", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 17, value: 32 },
+ { tag: "candidate 31x31", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 31, value: 32 },
+ { tag: "candidate 32x32", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 32, value: 32 },
+ { tag: "candidate 33x33", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 33, value: 64 },
+ { tag: "candidate 64x64", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 64, value: 64 },
+ { tag: "candidate 128x128", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 128, value: 128 },
+ { tag: "candidate 255x255", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 255, value: 255 },
+ { tag: "candidate 256x256", url: Qt.resolvedUrl("favicon-candidates-gray.html"), size: 256, value: 255 },
];
}
@@ -287,8 +297,7 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("favicon-multi-gray.html")
- webEngineView.url = url
+ webEngineView.url = row.url
verify(webEngineView.waitForLoadSucceeded())
iconChangedSpy.wait()