dom/tests/mochitest/bugs/test_bug534362.html
author Peter Van der Beken <peterv@propagandism.org>
Sun, 13 Dec 2009 21:48:20 -0800
changeset 35712 f1742529aaa793c487e6a2e67664d3d1a9272701
parent 35708 1c53517269200bd7436b7f15c04ef0dfdc1c45d0
permissions -rw-r--r--
Fix error in test.

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=534362
-->
<head>
  <title>Test for Bug 534362</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"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=534362">Mozilla Bug 534362</a>
<p id="display"></p>
<div id="content" style="display: none">
  <iframe src="http://example.org/tests/dom/tests/mochitest/bugs/iframe_bug534362.html" name="testFrame" onload="changeLocation();"></iframe>
</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 534362 **/

function checkSetterCalled(called, shouldCall)
{
  is(called, shouldCall, "Setter " + (called ? "" : "not ") + "called.");
  if (!shouldCall) {
    SimpleTest.finish();
  }
}

function changeLocation()
{
  checkSetterCalled(setterCalled, true);
  setterCalled = false;
  frames["testFrame"].location.href = "javascript:";
  checkSetterCalled(setterCalled, false);
}

SimpleTest.waitForExplicitFinish();

</script>
</pre>
</body>
</html>