DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5350524bb654)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=448987
-->
<head>
  <title>Test for Bug 448987</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <style>
    iframe {
      width: 500px;
      height: 300px;
    }
  </style>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448987">Mozilla Bug 448987</a>
<p id="display"></p>
<div id="content">
<iframe id="f1"></iframe>
<iframe id="f2"></iframe>
<iframe id="f3"></iframe>
</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 448987 **/
SimpleTest.waitForExplicitFinish();

SpecialPowers.setIntPref("accessibility.tabfocus", 7);

var f1 = document.getElementById("f1");
var f2 = document.getElementById("f2");
var f3 = document.getElementById("f3");

var snapshotf1;

SimpleTest.waitForFocus(function() {
  f1.src = "file_bug448987.html";
});

function firstIframeLoaded() {
  snapshotf1 = snapshotWindow(f1.contentWindow);
  f2.src="file_bug448987_ref.html";
}

function secondIframeLoaded() {
  ok(compareSnapshots(snapshotf1,
                      snapshotWindow(f2.contentWindow), true)[0],
     "<area shape=default> should render focus outline");
  f3.src="file_bug448987_notref.html";
}

function thirdIframeLoaded() {
  ok(compareSnapshots(snapshotf1,
                      snapshotWindow(f3.contentWindow), false)[0],
     "file_bug448987.html should render focus outline, file_bug448987_notref.html should not");
  finish();
}

function finish()
{
  SpecialPowers.clearUserPref("accessibility.tabfocus");
  SimpleTest.finish();
}
</script>
</pre>
</body>
</html>