Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions MotionMark/resources/debug-runner/debug-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,25 +356,29 @@ window.suitesManager = new class SuitesManager {
span.appendChild(document.createTextNode(" " + test.name + " "));

testElement.appendChild(document.createTextNode(" "));
var link = Utilities.createElement("span", {}, testElement);
var link = Utilities.createElement("a", {}, testElement);
link.classList.add("link");
link.textContent = "link";
link.suiteName = Utilities.stripUnwantedCharactersForURL(suiteCheckbox.suite.name);
link.testName = test.name;
link.onclick = function(event) {
var element = event.target;
var title = "Link to run “" + element.testName + "” with current options:";
var url = location.href.split(/[?#]/)[0];

function updateLinkHref() {
var options = optionsManager.updateLocalStorageFromUI();
Utilities.extendObject(options, {
"suite-name": element.suiteName,
"test-name": Utilities.stripUnwantedCharactersForURL(element.testName)
"suite-name": link.suiteName,
"test-name": Utilities.stripUnwantedCharactersForURL(link.testName)
});
var complexity = suitesManager._editElement(element.parentNode).value;
if (complexity)
options.complexity = complexity;
prompt(title, url + Utilities.convertObjectToQueryString(options));
};
var complexityInput = link.parentNode.querySelector("input[type='number']");
if (complexityInput && complexityInput.value)
options.complexity = complexityInput.value;

var url = location.href.split(/[?#]/)[0];
link.href = url + Utilities.convertObjectToQueryString(options);
}

link.addEventListener("mouseenter", updateLinkHref);
link.addEventListener("focus", updateLinkHref);
link.addEventListener("click", updateLinkHref);

var complexity = Utilities.createElement("input", { type: "number" }, testElement);
complexity.relatedCheckbox = testCheckbox;
Expand Down
7 changes: 6 additions & 1 deletion MotionMark/resources/debug-runner/motionmark.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,16 @@ label.tree-label {

.tree .link {
cursor: pointer;
color: #999;
font-style: italic;
margin-left: 2em;
text-decoration: none;
}

#intro .tree .link {
color: #999;
}


@media screen and (max-device-width: 414px),
screen and (max-device-height: 414px) and (orientation: landscape) {
.tree {
Expand Down