Bug 1251033 - Part 3 - Fix unmerged chunk from eb9b84702b2c. a=philor

This commit is contained in:
Jordan Santell 2016-03-08 21:58:47 -08:00
Родитель 9846b8bfbe
Коммит bf88202287
1 изменённых файлов: 19 добавлений и 9 удалений

Просмотреть файл

@ -139,16 +139,26 @@ var TEST_TREE = {
*/
function checkFrameString (component, file, line, column) {
let el = component.getDOMNode();
is(el.querySelector(".frame-link-filename").textContent, file);
is(+el.querySelector(".frame-link-line").textContent, +line);
if (column != null) {
is(+el.querySelector(".frame-link-column").textContent, +column);
is(el.querySelectorAll(".frame-link-colon").length, 2);
let $ = selector => el.querySelector(selector);
let $line = $(".frame-link-line");
let $column = $(".frame-link-column");
is($(".frame-link-filename").textContent, file);
is(el.getAttribute("data-line"), line ? `${line}` : null, "Expected `data-line` found");
is(el.getAttribute("data-column"), column ? `${column}` : null, "Expected `data-column` found");
if (line != null) {
is(+$line.textContent, +line);
} else {
is(el.querySelector(".frame-link-column"), null,
"Should not render column when none specified");
is(el.querySelectorAll(".frame-link-colon").length, 1,
"Should only render one colon when no column specified");
ok(!$line, "Should not have an element for `line`");
}
if (column != null) {
is(+$column.textContent, +column);
} else {
ok(!$column, "Should not have an element for `column`");
}
}