1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/xpconnect/tests/mochitest/test_bug871887.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=871887 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 871887</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 + <script type="application/javascript;version=1.7"> 1.15 + 1.16 + /** Test for Bug 871887 **/ 1.17 + SimpleTest.waitForExplicitFinish(); 1.18 + 1.19 + // NB: onstart ends up getting invoked twice, for mysterious and potentially- 1.20 + // IE6-related reasons. 1.21 + function checkpoint(invocant) { 1.22 + ok(true, "onstart called"); 1.23 + is(invocant, $('llama'), "this-binding is correct"); 1.24 + $('llama').loop = 1; 1.25 + $('llama').scrollDelay = 1; 1.26 + $('llama').scrollAmount = 500; 1.27 + } 1.28 + 1.29 + function done(invocant) { 1.30 + is(invocant, $('llama'), "this-binding is correct"); 1.31 + ok(true, "onfinish called"); 1.32 + SimpleTest.finish(); 1.33 + } 1.34 + 1.35 + </script> 1.36 +</head> 1.37 +<body> 1.38 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=871887">Mozilla Bug 871887</a> 1.39 +<p id="display"></p> 1.40 +<div id="content"> 1.41 +<marquee id="llama" onstart="checkpoint(this);" onfinish="done(this);">Watch the Llama</marquee> 1.42 +</div> 1.43 +<pre id="test"> 1.44 +</pre> 1.45 +</body> 1.46 +</html>