5 <title>Test bug
1433073</title>
6 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
8 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css"/>
10 function synthesizeAccelKeyAndClickAt(aElementId
) {
11 const element
= document
.getElementById(aElementId
);
12 synthesizeMouseAtCenter(element
, { accelKey
: true });
15 function synthesizeAccelKeyAndC() {
16 synthesizeKey("C", { accelKey
: true });
19 async
function runTest() {
20 synthesizeAccelKeyAndClickAt("x");
21 synthesizeAccelKeyAndClickAt("y");
22 synthesizeAccelKeyAndClickAt("u");
23 synthesizeAccelKeyAndClickAt("v");
26 // Assert content contains the table.
27 // TODO: the `<meta>` element is missing; which is a defect in the
28 // test-code, see https://bugzilla.mozilla.org/show_bug.cgi?id=1632183.
29 const expectedString
= "\
43 const flavor
= "text/html";
44 await SimpleTest
.promiseClipboardChange(expectedString
,
45 synthesizeAccelKeyAndC
, flavor
);
49 // The key point of this check is that the string doesn't contain a
50 // `<tr>`. It's possible that `<tbody>` could be removed, but it's
51 // unknown if other applications rely on it being included.
52 const expectedString
= "\
54 <body onload=\"onLoad()\">\
56 <table><tbody></tbody></table></div></body></html>";
57 const flavor
= "text/_moz_htmlcontext";
58 await SimpleTest
.promiseClipboardChange(expectedString
,
59 synthesizeAccelKeyAndC
, flavor
);
66 SimpleTest
.waitForExplicitFinish();
67 SimpleTest
.waitForFocus(runTest
);
71 <body onLoad=
"onLoad()">
72 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1433073">Mozilla Bug
1433073</a>