layout/generic/test/test_bug448987.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=448987
     5 -->
     6 <head>
     7   <title>Test for Bug 448987</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    10   <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
    11   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    12   <style>
    13     iframe {
    14       width: 500px;
    15       height: 300px;
    16     }
    17   </style>
    18 </head>
    19 <body>
    20 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448987">Mozilla Bug 448987</a>
    21 <p id="display"></p>
    22 <div id="content">
    23 <iframe id="f1"></iframe>
    24 <iframe id="f2"></iframe>
    25 <iframe id="f3"></iframe>
    26 </div>
    27 <pre id="test">
    28 <script type="application/javascript">
    30 /** Test for Bug 448987 **/
    31 SimpleTest.waitForExplicitFinish();
    33 SpecialPowers.setIntPref("accessibility.tabfocus", 7);
    35 var f1 = document.getElementById("f1");
    36 var f2 = document.getElementById("f2");
    37 var f3 = document.getElementById("f3");
    39 var snapshotf1;
    41 SimpleTest.waitForFocus(function() {
    42   f1.src = "file_bug448987.html";
    43 });
    45 function firstIframeLoaded() {
    46   snapshotf1 = snapshotWindow(f1.contentWindow);
    47   f2.src="file_bug448987_ref.html";
    48 }
    50 function secondIframeLoaded() {
    51   ok(compareSnapshots(snapshotf1,
    52                       snapshotWindow(f2.contentWindow), true)[0],
    53      "<area shape=default> should render focus outline");
    54   f3.src="file_bug448987_notref.html";
    55 }
    57 function thirdIframeLoaded() {
    58   ok(compareSnapshots(snapshotf1,
    59                       snapshotWindow(f3.contentWindow), false)[0],
    60      "file_bug448987.html should render focus outline, file_bug448987_notref.html should not");
    61   finish();
    62 }
    64 function finish()
    65 {
    66   SpecialPowers.clearUserPref("accessibility.tabfocus");
    67   SimpleTest.finish();
    68 }
    69 </script>
    70 </pre>
    71 </body>
    72 </html>

mercurial