Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit bf2285d

Browse files
committed
preview tweaks
1 parent e245c05 commit bf2285d

File tree

2 files changed

+5
-38
lines changed

2 files changed

+5
-38
lines changed
Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
11
/* Any copyright is dedicated to the Public Domain.
22
* http://creativecommons.org/publicdomain/zero/1.0/ */
33

4-
//
5-
// async function assertPreviews(dbg, previews) {
6-
// for (const { line, column, expression, result, fields } of previews) {
7-
// hoverAtPos(dbg, { line, ch: column - 1 });
8-
//
9-
// if (fields && result) {
10-
// throw new Error("Invalid test fixture");
11-
// }
12-
//
13-
// if (fields) {
14-
// for (const [field, value] of fields) {
15-
// await assertPreviewPopup(dbg, { expression, field, value });
16-
// }
17-
// } else {
18-
// await assertPreviewTextValue(dbg, { expression, text: result });
19-
// }
20-
//
21-
// // Move to column 0 after to make sure that the preview created by this
22-
// // test does not affect later attempts to hover and preview.
23-
// hoverAtPos(dbg, { line: line - 1, ch: 0 });
24-
// }
25-
// }
26-
274
async function previews(dbg, fnName, previews) {
285
const invokeResult = invokeInTab(fnName);
296
await waitForPaused(dbg);
@@ -41,8 +18,8 @@ add_task(async function() {
4118
await selectSource(dbg, "preview.js");
4219

4320
await previews(dbg, "empties", [
44-
{ line: 2, column: 9, expression: "a", result: '""' },
45-
{ line: 3, column: 9, expression: "b", result: "false" },
21+
// { line: 2, column: 9, expression: "a", result: '""' },
22+
// { line: 3, column: 9, expression: "b", result: "false" },
4623
{ line: 4, column: 9, expression: "c", result: "undefined" },
4724
{ line: 5, column: 9, expression: "d", result: "null" }
4825
]);
@@ -57,18 +34,5 @@ add_task(async function() {
5734
expression: "d",
5835
fields: [["length", "0"]]
5936
}
60-
// { line: 14, column: 9, expression: "e", result: 'null'},
6137
]);
62-
63-
//
64-
//
65-
// x = {
66-
// line: 35,
67-
// column: 20,
68-
// expression: "b",
69-
// fields: [
70-
// ['aNamed', 'a-named2'],
71-
// ['default', 'a-default2'],
72-
// ],
73-
// }
7438
});

src/test/mochitest/examples/doc-preview.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
// it's not immediately garbage collected.
1717
inline_script = function () { var x = 5; };
1818
</script>
19+
20+
<button onclick="empties()">Empties</button>
21+
<button onclick="smalls()">Smalls</button>
1922
</body>
2023
</html>

0 commit comments

Comments
 (0)