summaryrefslogtreecommitdiffstats
path: root/tests/auto/core/origins/resources/mixedSchemes.html
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-14 16:11:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-16 16:42:22 +0000
commit551b83b280bf83137e0c8ceefad59558bfe9e03e (patch)
treea3133e21416d599db2a635c9bbfec9b560516de7 /tests/auto/core/origins/resources/mixedSchemes.html
parent5f4fb14cb0f6b443885e79516f450853e44f650d (diff)
Stop using Widgets in WebEngineCore tests
With QWebEnginePage in Core we can now make the core tests core-only. Add the same times moves tests from widgets that only uses core classes. Change-Id: I67a25b534912d9a0891e16b0419f0db9bf434e92 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit b8c48ee53009365a39d9dde1f6773048ec5ee4a0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/core/origins/resources/mixedSchemes.html')
-rw-r--r--tests/auto/core/origins/resources/mixedSchemes.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/core/origins/resources/mixedSchemes.html b/tests/auto/core/origins/resources/mixedSchemes.html
new file mode 100644
index 000000000..c73e9ecdc
--- /dev/null
+++ b/tests/auto/core/origins/resources/mixedSchemes.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Mixed</title>
+ <script>
+ var result;
+ var canary;
+
+ function setIFrameUrl(url) {
+ result = undefined;
+ canary = undefined;
+ document.getElementById("iframe").setAttribute("src", url);
+ // Early fire is OK unless the test is expecting cannotLoad.
+ // If timeout is too short then a false positive is possible.
+ setTimeout(() => { result = result || "cannotLoad"; }, 500);
+ }
+
+ addEventListener("load", function() {
+ document.getElementById("iframe").addEventListener("load", function() {
+ if (canary && window[0].canary)
+ result = "canLoadAndAccess";
+ else
+ result = "canLoadButNotAccess";
+ });
+ });
+ </script>
+ </head>
+ <body>
+ <iframe id="iframe"></iframe>
+ </body>
+</html>