diff options
author | Kirill Burtsev <kirill.burtsev@qt.io> | 2020-07-31 16:02:36 +0200 |
---|---|---|
committer | Kirill Burtsev <kirill.burtsev@qt.io> | 2020-08-31 10:05:07 +0200 |
commit | d25075fb681fa92fad1f9bdcb262a3e361e7659e (patch) | |
tree | f68a40335197e0966bd850a4a8d2722922baa914 /tests/auto/shared | |
parent | 5f1f7e8913b74f9a88864b4155db8753007db52c (diff) |
Don't send duplicate load progress values
Suppress duplicated progress values coming from chromium.
Verify this behavior reliably (and not only 0 and 100 value) by loading html
with subresources with minor delay through test http server.
Change-Id: Id034dda9012212d54d12fc95d5939ba301577c1c
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'tests/auto/shared')
-rw-r--r-- | tests/auto/shared/data/loadprogress/downloadable.tar.gz | bin | 0 -> 131 bytes | |||
-rw-r--r-- | tests/auto/shared/data/loadprogress/main.html | 30 | ||||
-rw-r--r-- | tests/auto/shared/data/loadprogress/page1.html | 8 | ||||
-rw-r--r-- | tests/auto/shared/data/loadprogress/page2.html | 14 | ||||
-rw-r--r-- | tests/auto/shared/data/loadprogress/page3.html | 20 | ||||
-rw-r--r-- | tests/auto/shared/data/loadprogress/page4.html | 8 |
6 files changed, 80 insertions, 0 deletions
diff --git a/tests/auto/shared/data/loadprogress/downloadable.tar.gz b/tests/auto/shared/data/loadprogress/downloadable.tar.gz Binary files differnew file mode 100644 index 000000000..741cb8ca6 --- /dev/null +++ b/tests/auto/shared/data/loadprogress/downloadable.tar.gz diff --git a/tests/auto/shared/data/loadprogress/main.html b/tests/auto/shared/data/loadprogress/main.html new file mode 100644 index 000000000..3b7d2034b --- /dev/null +++ b/tests/auto/shared/data/loadprogress/main.html @@ -0,0 +1,30 @@ +<html> +<head><title>Load Progress Test Page</title> + <style> + .monospace { font-family: "Lucida Console", Courier, monospace; } + </style> + <title>page1</title> + <script> + function addP(t) { + var p = document.createElement('p') + p.class = 'monospace' + p.innerHTML = t + var d = document.createElement('div') + d.appendChild(p) + document.body.appendChild(d) + } + window.addEventListener('DOMContentLoaded', (event) => { addP('DOMContentLoaded') }) + </script> +</head> +<body> + <h1>Hello.</h1> + <script> + addP('sometext') + </script> + <p class="monospace">body in monospace</p> + <iframe id="page1" src="page1.html"></iframe> + <iframe id="page2" src="page2.html"></iframe> + <iframe id="page3" src="page3.html"></iframe> + <iframe id="page4" src="page4.html"></iframe> +</body> +</html> diff --git a/tests/auto/shared/data/loadprogress/page1.html b/tests/auto/shared/data/loadprogress/page1.html new file mode 100644 index 000000000..5cd479ab6 --- /dev/null +++ b/tests/auto/shared/data/loadprogress/page1.html @@ -0,0 +1,8 @@ +<html> + <head> + <title>page1</title> + </head> + <body> + <h1>page1</h1> + </body> +</html> diff --git a/tests/auto/shared/data/loadprogress/page2.html b/tests/auto/shared/data/loadprogress/page2.html new file mode 100644 index 000000000..e3031f56a --- /dev/null +++ b/tests/auto/shared/data/loadprogress/page2.html @@ -0,0 +1,14 @@ +<html> + <head> + <title>page2</title> + </head> + <style> + .fardown { + position: absolute; + top: 2500px; + } + </style> + <body> + <div class="fardown" id="anchor">page2 anchor</div> + </body> +</html> diff --git a/tests/auto/shared/data/loadprogress/page3.html b/tests/auto/shared/data/loadprogress/page3.html new file mode 100644 index 000000000..d38ca31f0 --- /dev/null +++ b/tests/auto/shared/data/loadprogress/page3.html @@ -0,0 +1,20 @@ +<html> + <head> + <title>page3</title> + </head> + <script> + setTimeout(function(){ + document.getElementById('anchorLink').click(); + },500); + </script> + <style> + .fardown { + position: absolute; + top: 2500px; + } + </style> + <body> + <div><a id="anchorLink" href="#anchor">page3</a></div> + <div class="fardown" id="anchor">page3 anchor</div> + </body> +</html> diff --git a/tests/auto/shared/data/loadprogress/page4.html b/tests/auto/shared/data/loadprogress/page4.html new file mode 100644 index 000000000..61976b4fb --- /dev/null +++ b/tests/auto/shared/data/loadprogress/page4.html @@ -0,0 +1,8 @@ +<html> + <head> + <title>page4</title> + </head> + <body onload="document.getElementById('downloadLink').focus();"> + <a id="downloadLink" href="downloadable.tar.gz">download</a> + </body> +</html> |