mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Adding testx
This commit is contained in:
parent
1c55d78969
commit
e6fc4b3582
@ -48,12 +48,14 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
_TEST_FILES = \
|
||||
test_bug296375.xul \
|
||||
test_bug310107.html \
|
||||
test_bug366770.html \
|
||||
test_bug371724.xhtml \
|
||||
test_bug372769.xhtml \
|
||||
test_bug378866.xhtml \
|
||||
test_bug397934.xhtml \
|
||||
test_bug398135.xhtml \
|
||||
bug310107-resource.xhtml \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
20
content/xbl/test/bug310107-resource.xhtml
Normal file
20
content/xbl/test/bug310107-resource.xhtml
Normal file
@ -0,0 +1,20 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style>
|
||||
#bar {
|
||||
-moz-binding: url("#binding");
|
||||
}
|
||||
</style>
|
||||
<bindings xmlns="http://www.mozilla.org/xbl">
|
||||
<binding id="binding">
|
||||
<implementation>
|
||||
<property name="prop" readonly="true" onget="return 2;"/>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
||||
</head>
|
||||
<!-- Use a timeout so that we get bfcached -->
|
||||
<body onload="setTimeout(window.opener.runTest, 100)">
|
||||
<div id="bar"></div>
|
||||
</body>
|
||||
</html>
|
54
content/xbl/test/test_bug310107.html
Normal file
54
content/xbl/test/test_bug310107.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=310107
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 310107</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=310107">Mozilla Bug 310107</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
/** Test for Bug 310107 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var win = window.open("bug310107-resource.xhtml", "", "width=10, height=10");
|
||||
|
||||
function runTest() {
|
||||
window.el = win.document.getElementById("bar");
|
||||
window.doc = win.document;
|
||||
is(window.el.prop, 2, "Unexpected prop value at load");
|
||||
|
||||
win.location = "data:text/html,<body onload='window.opener.loadDone()'>";
|
||||
}
|
||||
|
||||
function loadDone() {
|
||||
is(window.el.prop, 2, "Prop still 2 because we're in bfcache");
|
||||
is(window.el, window.doc.getElementById("bar"),
|
||||
"document didn't get bfcached?");
|
||||
|
||||
// Remove our node from the DOM
|
||||
window.el.parentNode.removeChild(window.el);
|
||||
|
||||
is(window.el.prop, undefined, "Binding should have been detached");
|
||||
is(typeof(window.el.prop), "undefined", "Really undefined");
|
||||
|
||||
win.close();
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user