зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271096 - Make sure source links can be tabbed into;r=fitzgen
MozReview-Commit-ID: FPwYQyLQw4m
This commit is contained in:
Родитель
a24690a8d4
Коммит
664d1ca656
|
@ -103,7 +103,11 @@ module.exports = createClass({
|
|||
// it an anchor link, as we can't link to it.
|
||||
if (isLinkable) {
|
||||
sourceEl = dom.a({
|
||||
onClick,
|
||||
onClick: e => {
|
||||
e.preventDefault();
|
||||
onClick(e);
|
||||
},
|
||||
href: source,
|
||||
className: "frame-link-source",
|
||||
title: l10n.getFormatStr("frame.viewsourceindebugger", tooltip)
|
||||
}, sourceElements);
|
||||
|
|
|
@ -141,7 +141,7 @@ var TEST_TREE = {
|
|||
/**
|
||||
* Frame
|
||||
*/
|
||||
function checkFrameString({ frame, file, line, column, shouldLink, tooltip }) {
|
||||
function checkFrameString({ frame, file, line, column, source, shouldLink, tooltip }) {
|
||||
let el = frame.getDOMNode();
|
||||
let $ = selector => el.querySelector(selector);
|
||||
|
||||
|
@ -155,6 +155,9 @@ function checkFrameString({ frame, file, line, column, shouldLink, tooltip }) {
|
|||
is(el.getAttribute("data-column"), column ? `${column}` : null, "Expected `data-column` found");
|
||||
is($source.getAttribute("title"), tooltip, "Correct tooltip");
|
||||
is($source.tagName, shouldLink ? "A" : "SPAN", "Correct linkable status");
|
||||
if (shouldLink) {
|
||||
is($source.getAttribute("href"), source, "Correct source");
|
||||
}
|
||||
|
||||
if (line != null) {
|
||||
is(+$line.textContent, +line);
|
||||
|
|
|
@ -147,7 +147,8 @@ window.onload = Task.async(function* () {
|
|||
onClick: () => {},
|
||||
}), window.document.body);
|
||||
yield forceRender(frame);
|
||||
checkFrameString(Object.assign({ frame }, expected));
|
||||
let source = input.source;
|
||||
checkFrameString(Object.assign({ frame, source }, expected));
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче