2012-06-04 18:29:56 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=743666
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Test for Bug 743666</title>
|
|
|
|
<script type="application/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=743666">Mozilla Bug 743666</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 743666 **/
|
|
|
|
|
|
|
|
var called = false;
|
|
|
|
function uploadprogress()
|
|
|
|
{
|
|
|
|
called = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
2012-07-21 19:28:26 -07:00
|
|
|
xhr.upload.onprogress = uploadprogress;
|
2012-06-04 18:29:56 -07:00
|
|
|
var event = document.createEvent("ProgressEvent");
|
2012-07-21 19:28:26 -07:00
|
|
|
event.initProgressEvent("progress", false, false, false, false, 0);
|
|
|
|
xhr.upload.dispatchEvent(event);
|
2012-06-04 18:29:56 -07:00
|
|
|
ok(called,
|
2012-07-21 19:28:26 -07:00
|
|
|
"XMLHttpRequest.upload.onprogress sets upload progress event listener");
|
2012-06-04 18:29:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|