mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add a test for bug 517224.
This commit is contained in:
parent
c5e5b72709
commit
a74df9df58
@ -103,6 +103,8 @@ _TEST_FILES = test_acid3_test46.html \
|
||||
test_bug470769.html \
|
||||
test_bug499655.html \
|
||||
test_bug499655.xhtml \
|
||||
test_bug517224.html \
|
||||
test_bug524175.html \
|
||||
test_cascade.html \
|
||||
test_compute_data_with_start_struct.html \
|
||||
test_computed_style_no_pseudo.html \
|
||||
@ -169,7 +171,7 @@ _TEST_FILES = test_acid3_test46.html \
|
||||
media_queries_dynamic_xbl_iframe.html \
|
||||
media_queries_dynamic_xbl_style.css \
|
||||
bug453896_iframe.html \
|
||||
test_bug524175.html \
|
||||
bug517224.sjs \
|
||||
$(NULL)
|
||||
|
||||
_BROWSER_FILES = \
|
||||
|
24
layout/style/test/bug517224.sjs
Normal file
24
layout/style/test/bug517224.sjs
Normal file
@ -0,0 +1,24 @@
|
||||
function handleRequest(request, response)
|
||||
{
|
||||
response.setHeader("Cache-Control", "no-cache", false);
|
||||
switch (request.queryString) {
|
||||
case "reset":
|
||||
response.setHeader("Content-Type", "application/ecmascript", false);
|
||||
setState("imageloaded", "");
|
||||
break;
|
||||
case "image":
|
||||
setState("imageloaded", "imageloaded");
|
||||
response.setStatusLine("1.1", 302, "Found");
|
||||
// redirect to a solid blue image
|
||||
response.setHeader("Location", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12NgYPgPAAEDAQDZqt2zAAAAAElFTkSuQmCC");
|
||||
response.setHeader("Content-Type", "text/plain", false);
|
||||
break;
|
||||
case "result":
|
||||
response.setHeader("Content-Type", "application/ecmascript", false);
|
||||
var state = getState("imageloaded");
|
||||
response.write("is('" + state +
|
||||
"', '', 'image should not have been loaded')\n");
|
||||
response.write("SimpleTest.finish()");
|
||||
break;
|
||||
}
|
||||
}
|
46
layout/style/test/test_bug517224.html
Normal file
46
layout/style/test/test_bug517224.html
Normal file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=517224
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 517224</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/ecmascript" src="bug517224.sjs?reset"></script>
|
||||
<style type="text/css">
|
||||
|
||||
p#display { background: url(bug517224.sjs?image); }
|
||||
p#display { background-image: none; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=517224">Mozilla Bug 517224</a>
|
||||
<p id="display">Element with overridden background</p>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 517224 **/
|
||||
|
||||
// Test that we don't load background images for style rules that are
|
||||
// always overridden.
|
||||
|
||||
// Make sure the style has been computed
|
||||
var bi =
|
||||
getComputedStyle(document.getElementById('display'), "").backgroundImage;
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
window.onload = run;
|
||||
|
||||
function run()
|
||||
{
|
||||
var script = document.createElement("script");
|
||||
script.setAttribute("src", "bug517224.sjs?result");
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user