forked from mirrors/gecko-dev
Bug 1316809 - Fix eslint errors in devtools/client/sourceeditor/test. r=tromey
MozReview-Commit-ID: HjmCUoAsqlZ --HG-- extra : rebase_source : 13d471df5390dba8c01f2af08edb476a638b81c7
This commit is contained in:
parent
b018550c9e
commit
296c2dc383
12 changed files with 178 additions and 140 deletions
|
|
@ -95,7 +95,6 @@ devtools/client/shadereditor/**
|
|||
devtools/client/shared/*.jsm
|
||||
devtools/client/shared/webgl-utils.js
|
||||
devtools/client/shared/widgets/*.jsm
|
||||
devtools/client/sourceeditor/test/*.js
|
||||
devtools/client/webaudioeditor/**
|
||||
devtools/client/webconsole/**
|
||||
!devtools/client/webconsole/panel.js
|
||||
|
|
@ -172,6 +171,7 @@ devtools/client/shared/demangle.js
|
|||
devtools/client/shared/vendor/*
|
||||
devtools/client/sourceeditor/codemirror/*.js
|
||||
devtools/client/sourceeditor/codemirror/**/*.js
|
||||
devtools/client/sourceeditor/test/cm_mode_ruby.js
|
||||
devtools/client/sourceeditor/test/codemirror/*
|
||||
devtools/client/inspector/markup/test/lib_*
|
||||
devtools/client/jsonview/lib/require.js
|
||||
|
|
|
|||
|
|
@ -2,5 +2,9 @@
|
|||
|
||||
module.exports = {
|
||||
// Extend from the shared list of defined globals for mochitests.
|
||||
"extends": "../../../.eslintrc.mochitests.js"
|
||||
"extends": "../../../.eslintrc.mochitests.js",
|
||||
"globals": {
|
||||
"runCodeMirrorTest": true,
|
||||
"gBrowser": true
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const TESTS_URI = "http://mochi.test:8888/browser/devtools/client" +
|
|||
"/sourceeditor/test/css_autocompletion_tests.json";
|
||||
|
||||
const source = read(CSS_URI);
|
||||
const tests = eval(read(TESTS_URI));
|
||||
const {tests} = JSON.parse(read(TESTS_URI));
|
||||
|
||||
const TEST_URI = "data:text/html;charset=UTF-8," + encodeURIComponent(
|
||||
["<!DOCTYPE html>",
|
||||
|
|
@ -60,7 +60,9 @@ const TEST_URI = "data:text/html;charset=UTF-8," + encodeURIComponent(
|
|||
" <div class='hidden-labels-box devtools-toolbarbutton devtools-menulist'></div>",
|
||||
" <div class='devtools-menulist'></div>",
|
||||
" <div class='devtools-menulist'></div>",
|
||||
/* eslint-disable max-len */
|
||||
" <tabs class='devtools-toolbarbutton'><tab></tab><tab></tab><tab></tab></tabs><tabs></tabs>",
|
||||
/* eslint-enable max-len */
|
||||
" <button class='category-name visible'></button>",
|
||||
" <div class='devtools-toolbarbutton' label='true'>",
|
||||
" <hbox class='toolbarbutton-menubutton-button'></hbox></div>",
|
||||
|
|
@ -78,7 +80,9 @@ let inspector;
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
addTab(TEST_URI).then(function () {
|
||||
/* eslint-disable mozilla/no-cpows-in-tests */
|
||||
doc = content.document;
|
||||
/* eslint-enable mozilla/no-cpows-in-tests */
|
||||
runTests();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ const source = [
|
|||
// expectedProperty, - The expected property name for states value and property
|
||||
// expectedValue, - If state is value, then the expected value
|
||||
// ]
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const tests = [
|
||||
[{line: 0, ch: 13}, "selector", ".devtools-toolbar"],
|
||||
[{line: 8, ch: 13}, "property", ["#devtools-menu.devtools-menulist",
|
||||
|
|
@ -79,6 +81,7 @@ const tests = [
|
|||
".devtools-toolbarbutton#devtools-menu "], "background",
|
||||
"linear-gradient(hsla(212,7%,57%,.35),\n hsla(212,7%,57%,.1)) padding-box"],
|
||||
];
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const TEST_URI = "data:text/html;charset=UTF-8," + encodeURIComponent(
|
||||
["<!DOCTYPE html>",
|
||||
|
|
@ -125,14 +128,18 @@ function test() {
|
|||
waitForExplicitFinish();
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
/* eslint-disable mozilla/no-cpows-in-tests */
|
||||
doc = content.document;
|
||||
/* eslint-enable mozilla/no-cpows-in-tests */
|
||||
runTests();
|
||||
});
|
||||
gBrowser.loadURI(TEST_URI);
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
let completer = new CSSCompleter({cssProperties: getClientCssProperties()});
|
||||
let completer = new CSSCompleter({
|
||||
cssProperties: getClientCssProperties()
|
||||
});
|
||||
let matches = (arr, toCheck) => !arr.some((x, i) => x != toCheck[i]);
|
||||
let checkState = (expected, actual) => {
|
||||
if (expected[0] == "null" && actual == null) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const TESTS_URI = "http://mochi.test:8888/browser/devtools/client" +
|
|||
"/sourceeditor/test/css_statemachine_tests.json";
|
||||
|
||||
const source = read(CSS_URI);
|
||||
const tests = eval(read(TESTS_URI));
|
||||
const {tests} = JSON.parse(read(TESTS_URI));
|
||||
|
||||
const TEST_URI = "data:text/html;charset=UTF-8," + encodeURIComponent(
|
||||
["<!DOCTYPE html>",
|
||||
|
|
@ -59,13 +59,17 @@ function test() {
|
|||
waitForExplicitFinish();
|
||||
gBrowser.selectedTab = gBrowser.addTab(TEST_URI);
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
/* eslint-disable mozilla/no-cpows-in-tests */
|
||||
doc = content.document;
|
||||
/* eslint-enable mozilla/no-cpows-in-tests */
|
||||
runTests();
|
||||
});
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
let completer = new CSSCompleter({cssProperties: getClientCssProperties()});
|
||||
let completer = new CSSCompleter({
|
||||
cssProperties: getClientCssProperties()
|
||||
});
|
||||
let checkState = state => {
|
||||
if (state[0] == "null" && (!completer.state || completer.state == "null")) {
|
||||
return true;
|
||||
|
|
@ -89,15 +93,15 @@ function runTests() {
|
|||
let progress = doc.getElementById("progress");
|
||||
let progressDiv = doc.querySelector("#progress > div");
|
||||
let i = 0;
|
||||
for (let test of tests) {
|
||||
for (let testcase of tests) {
|
||||
progress.dataset.progress = ++i;
|
||||
progressDiv.style.width = 100 * i / tests.length + "%";
|
||||
completer.resolveState(limit(source, test[0]),
|
||||
{line: test[0][0], ch: test[0][1]});
|
||||
if (checkState(test[1])) {
|
||||
completer.resolveState(limit(source, testcase[0]),
|
||||
{line: testcase[0][0], ch: testcase[0][1]});
|
||||
if (checkState(testcase[1])) {
|
||||
ok(true, "Test " + i + " passed. ");
|
||||
} else {
|
||||
ok(false, "Test " + i + " failed. Expected state : [" + test[1] + "] " +
|
||||
ok(false, "Test " + i + " failed. Expected state : [" + testcase[1] + "] " +
|
||||
"but found [" + completer.state + ", " + completer.selectorState +
|
||||
", " + completer.completing + ", " +
|
||||
(completer.propertyName || completer.selector) + "].");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
"use strict";
|
||||
|
||||
const {InspectorFront} = require("devtools/shared/fronts/inspector");
|
||||
const AUTOCOMPLETION_PREF = "devtools.editor.autocomplete";
|
||||
const TEST_URI = "data:text/html;charset=UTF-8,<html><body><bar></bar>" +
|
||||
"<div id='baz'></div><body></html>";
|
||||
|
||||
|
|
@ -99,7 +98,9 @@ function* testKeyboardCSSComma(ed, win) {
|
|||
|
||||
let isPopupOpened = false;
|
||||
let popupOpened = ed.getAutocompletionPopup().once("popup-opened");
|
||||
popupOpened.then(() => isPopupOpened = true);
|
||||
popupOpened.then(() => {
|
||||
isPopupOpened = true;
|
||||
});
|
||||
|
||||
EventUtils.synthesizeKey(",", { }, win);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ const FIND_KEY = L10N.getStr("find.key");
|
|||
const FINDNEXT_KEY = L10N.getStr("findNext.key");
|
||||
const FINDPREV_KEY = L10N.getStr("findPrev.key");
|
||||
// the replace's key with the appropriate modifiers based on OS
|
||||
const REPLACE_KEY = OS == "Darwin" ? L10N.getStr("replaceAllMac.key") : L10N.getStr("replaceAll.key");
|
||||
const REPLACE_KEY = OS == "Darwin" ? L10N.getStr("replaceAllMac.key")
|
||||
: L10N.getStr("replaceAll.key");
|
||||
|
||||
// values like it's not selected – even if the selection is visible.
|
||||
// For the record, setting the selection's range immediately doesn't have
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* global editor */
|
||||
|
||||
"use strict";
|
||||
|
||||
window.addEventListener("editorReady", function () {
|
||||
|
|
|
|||
|
|
@ -1,39 +1,43 @@
|
|||
// Test states to be tested for css state machine in css-autocompelter.js file.
|
||||
// Test cases are of the following format:
|
||||
// [
|
||||
// [
|
||||
// line, // The line location of the cursor
|
||||
// ch // The column locaiton of the cursor
|
||||
// ],
|
||||
// suggestions // Array of expected results
|
||||
// ]
|
||||
[
|
||||
[[0, 10], []],
|
||||
[[4, 7], ['.devtools-menulist', '.devtools-toolbarbutton']],
|
||||
[[5, 8], ['-moz-animation', '-moz-animation-delay', '-moz-animation-direction',
|
||||
'-moz-animation-duration', '-moz-animation-fill-mode',
|
||||
'-moz-animation-iteration-count', '-moz-animation-name',
|
||||
'-moz-animation-play-state', '-moz-animation-timing-function',
|
||||
'-moz-appearance']],
|
||||
[[12, 20], ['none', 'number-input']],
|
||||
[[12, 22], ['none']],
|
||||
[[17, 22], ['hsl', 'hsla']],
|
||||
[[19, 10], ['background', 'background-attachment', 'background-blend-mode',
|
||||
'background-clip', 'background-color', 'background-image',
|
||||
'background-origin', 'background-position', 'background-position-x',
|
||||
'background-position-y', 'background-repeat', 'background-size']],
|
||||
[[21, 9], ["-moz-calc", "auto", "calc", "inherit", "initial","unset"]],
|
||||
[[25, 26], ['.devtools-toolbarbutton > tab',
|
||||
'.devtools-toolbarbutton > hbox',
|
||||
'.devtools-toolbarbutton > .toolbarbutton-menubutton-button']],
|
||||
[[25, 31], ['.devtools-toolbarbutton > hbox.toolbarbutton-menubutton-button']],
|
||||
[[29, 20], ['.devtools-menulist:after', '.devtools-menulist:active']],
|
||||
[[30, 10], ['#devtools-anotherone', '#devtools-itjustgoeson', '#devtools-menu',
|
||||
'#devtools-okstopitnow', '#devtools-toolbarbutton', '#devtools-yetagain']],
|
||||
[[39, 39], ['.devtools-toolbarbutton:not([label]) > tab']],
|
||||
[[43, 51], ['.devtools-toolbarbutton:not([checked=true]):hover:after',
|
||||
'.devtools-toolbarbutton:not([checked=true]):hover:active']],
|
||||
[[58, 36], ['!important;']],
|
||||
[[73, 42], [':lang(', ':last-of-type', ':link', ':last-child']],
|
||||
[[77, 25], ['.visible']],
|
||||
]
|
||||
{
|
||||
"description": [
|
||||
"Test states to be tested for css state machine in css-autocompelter.js file.",
|
||||
"Test cases are of the following format:",
|
||||
"[",
|
||||
" [",
|
||||
" line, # The line location of the cursor",
|
||||
" ch # The column locaiton of the cursor",
|
||||
" ],",
|
||||
" suggestions # Array of expected results",
|
||||
"]"
|
||||
],
|
||||
"tests": [
|
||||
[[0, 10], []],
|
||||
[[4, 7], [".devtools-menulist", ".devtools-toolbarbutton"]],
|
||||
[[5, 8], ["-moz-animation", "-moz-animation-delay", "-moz-animation-direction",
|
||||
"-moz-animation-duration", "-moz-animation-fill-mode",
|
||||
"-moz-animation-iteration-count", "-moz-animation-name",
|
||||
"-moz-animation-play-state", "-moz-animation-timing-function",
|
||||
"-moz-appearance"]],
|
||||
[[12, 20], ["none", "number-input"]],
|
||||
[[12, 22], ["none"]],
|
||||
[[17, 22], ["hsl", "hsla"]],
|
||||
[[19, 10], ["background", "background-attachment", "background-blend-mode",
|
||||
"background-clip", "background-color", "background-image",
|
||||
"background-origin", "background-position", "background-position-x",
|
||||
"background-position-y", "background-repeat", "background-size"]],
|
||||
[[21, 9], ["-moz-calc", "auto", "calc", "inherit", "initial","unset"]],
|
||||
[[25, 26], [".devtools-toolbarbutton > tab",
|
||||
".devtools-toolbarbutton > hbox",
|
||||
".devtools-toolbarbutton > .toolbarbutton-menubutton-button"]],
|
||||
[[25, 31], [".devtools-toolbarbutton > hbox.toolbarbutton-menubutton-button"]],
|
||||
[[29, 20], [".devtools-menulist:after", ".devtools-menulist:active"]],
|
||||
[[30, 10], ["#devtools-anotherone", "#devtools-itjustgoeson", "#devtools-menu",
|
||||
"#devtools-okstopitnow", "#devtools-toolbarbutton", "#devtools-yetagain"]],
|
||||
[[39, 39], [".devtools-toolbarbutton:not([label]) > tab"]],
|
||||
[[43, 51], [".devtools-toolbarbutton:not([checked=true]):hover:after",
|
||||
".devtools-toolbarbutton:not([checked=true]):hover:active"]],
|
||||
[[58, 36], ["!important;"]],
|
||||
[[73, 42], [":lang(", ":last-of-type", ":link", ":last-child"]],
|
||||
[[77, 25], [".visible"]]
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,84 +1,88 @@
|
|||
// Test states to be tested for css state machine in css-autocompelter.js file.
|
||||
// Test cases are of the following format:
|
||||
// [
|
||||
// [
|
||||
// line, // The line location of the cursor
|
||||
// ch // The column locaiton of the cursor
|
||||
// ],
|
||||
// [
|
||||
// state, // one of CSS_STATES
|
||||
// selectorState, // one of SELECTOR_STATES
|
||||
// completing, // what is being completed
|
||||
// propertyName, // what property is being completed in case of value state
|
||||
// // or the current selector that is being completed
|
||||
// ]
|
||||
// ]
|
||||
[
|
||||
[[0, 10], ['null', '', '', '']],
|
||||
[[4, 3], ['selector', 'class', 'de', '.de']],
|
||||
[[5, 8], ['property', 'null', '-moz-a']],
|
||||
[[5, 21], ['value', 'null', 'no', '-moz-appearance']],
|
||||
[[6, 18], ['property', 'null', 'padding']],
|
||||
[[6, 24], ['value', 'null', '3', 'padding']],
|
||||
[[6, 29], ['property', 'null', 'bo']],
|
||||
[[6, 50], ['value', 'null', '1p', 'border-bottom-width']],
|
||||
[[7, 24], ['value', 'null', 's', 'border-bottom-style']],
|
||||
[[9, 0], ['null', 'null', '', '']],
|
||||
[[10, 6], ['selector', 'id', 'devto', '#devto']],
|
||||
[[10, 17], ['selector', 'class', 'de', '#devtools-menu.de']],
|
||||
[[11, 5], ['selector', 'class', 'devt', '.devt']],
|
||||
[[11, 30], ['selector', 'id', 'devtoo', '.devtools-toolbarbutton#devtoo']],
|
||||
[[12, 10], ['property', 'null', '-moz-app']],
|
||||
[[16, 27], ['value', 'null', 'hsl', 'text-shadow']],
|
||||
[[19, 24], ['value', 'null', 'linear-gra', 'background']],
|
||||
[[19, 55], ['value', 'null', 'hsl', 'background']],
|
||||
[[19, 79], ['value', 'null', 'paddin', 'background']],
|
||||
[[20, 47], ['value', 'null', 'ins', 'box-shadow']],
|
||||
[[22, 15], ['value', 'null', 'inheri', 'color']],
|
||||
[[25, 26], ['selector', 'null', '', '.devtools-toolbarbutton > ']],
|
||||
[[25, 28], ['selector', 'tag', 'hb', '.devtools-toolbarbutton > hb']],
|
||||
[[25, 41], ['selector', 'class', 'toolbarbut', '.devtools-toolbarbutton > hbox.toolbarbut']],
|
||||
[[29, 21], ['selector', 'pseudo', 'ac', '.devtools-menulist:ac']],
|
||||
[[30, 27], ['selector', 'pseudo', 'foc', '#devtools-toolbarbutton:foc']],
|
||||
[[31, 18], ['value', 'null', 'dot', 'outline']],
|
||||
[[32, 25], ['value', 'null', '-4p', 'outline-offset']],
|
||||
[[35, 26], ['selector', 'pseudo', 'no', '.devtools-toolbarbutton:no']],
|
||||
[[35, 28], ['selector', 'null', 'not', '']],
|
||||
[[35, 30], ['selector', 'attribute', 'l', '[l']],
|
||||
[[39, 46], ['selector', 'class', 'toolba', '.devtools-toolbarbutton:not([label]) > .toolba']],
|
||||
[[43, 39], ['selector', 'value', 'tr', '[checked=tr']],
|
||||
[[43, 47], ['selector', 'pseudo', 'hov', '.devtools-toolbarbutton:not([checked=true]):hov']],
|
||||
[[43, 53], ['selector', 'pseudo', 'act', '.devtools-toolbarbutton:not([checked=true]):hover:act']],
|
||||
[[47, 22], ['selector', 'attribute', 'op', '.devtools-menulist[op']],
|
||||
[[47, 33], ['selector', 'value', 'tr', '.devtools-menulist[open =tr']],
|
||||
[[48, 38], ['selector', 'value', 'tr', '.devtools-toolbarbutton[open = tr']],
|
||||
[[49, 40], ['selector', 'value', 'true', '.devtools-toolbarbutton[checked= true']],
|
||||
[[53, 34], ['selector', 'value', '=', '.devtools-toolbarbutton[checked=']],
|
||||
[[58, 38], ['value', 'null', '!impor', 'background-color']],
|
||||
[[61, 41], ['selector', 'pseudo', 'hov', '.devtools-toolbarbutton[checked=true]:hov']],
|
||||
[[65, 47], ['selector', 'class', 'to', '.devtools-toolbarbutton[type=menu-button] > .to']],
|
||||
[[69, 44], ['selector', 'pseudo', 'first-of', '.devtools-sidebar-tabs > tabs > tab:first-of']],
|
||||
[[73, 45], ['selector', 'pseudo', 'last', ':last']],
|
||||
[[77, 27], ['selector', 'class', 'vis', '.vis']],
|
||||
[[78, 34], ['selector', 'class', 'hidd', '.hidden-labels-box.visible ~ .hidd']],
|
||||
[[83, 5], ['media', 'null', 'medi']],
|
||||
[[83, 22], ['media', 'null', '800']],
|
||||
[[84, 9], ['selector', 'class', 'catego', '.catego']],
|
||||
[[89, 9], ['media', 'null', 'al']],
|
||||
[[90, 6], ['selector', 'id', 'err', '#err']],
|
||||
[[93, 11], ['property', 'null', 'backgro']],
|
||||
[[98, 6], ['selector', 'tag', 'butt', 'butt']],
|
||||
[[99, 22], ['value', 'null', '!impor', 'width']],
|
||||
[[103, 5], ['keyframes', 'null', 'ke']],
|
||||
[[104, 7], ['frame', 'null', 'fro']],
|
||||
[[104, 15], ['property', 'null', 'opac']],
|
||||
[[104, 29], ['property', 'null', 'transf']],
|
||||
[[104, 38], ['value', 'null', 'scal', 'transform']],
|
||||
[[105, 8], ['frame', 'null', '']],
|
||||
[[113, 6], ['keyframes', 'null', 'keyfr']],
|
||||
[[114, 4], ['frame', 'null', 'fr']],
|
||||
[[115, 3], ['frame', 'null', '2']],
|
||||
[[117, 8], ['property', 'null', 'opac']],
|
||||
[[117, 16], ['value', 'null', '0', 'opacity']],
|
||||
[[121, 0], ['null', '', '']],
|
||||
]
|
||||
{
|
||||
"description": [
|
||||
"Test states to be tested for css state machine in css-autocompleter.js file.",
|
||||
"Test cases are of the following format:",
|
||||
"[",
|
||||
" [",
|
||||
" line, // The line location of the cursor",
|
||||
" ch // The column locaiton of the cursor",
|
||||
" ],",
|
||||
" [",
|
||||
" state, // one of CSS_STATES",
|
||||
" selectorState, // one of SELECTOR_STATES",
|
||||
" completing, // what is being completed",
|
||||
" propertyName, // what property is being completed in case of value state",
|
||||
" // or the current selector that is being completed",
|
||||
" ]",
|
||||
"]"
|
||||
],
|
||||
"tests": [
|
||||
[[0, 10], ["null", "", "", ""]],
|
||||
[[4, 3], ["selector", "class", "de", ".de"]],
|
||||
[[5, 8], ["property", "null", "-moz-a"]],
|
||||
[[5, 21], ["value", "null", "no", "-moz-appearance"]],
|
||||
[[6, 18], ["property", "null", "padding"]],
|
||||
[[6, 24], ["value", "null", "3", "padding"]],
|
||||
[[6, 29], ["property", "null", "bo"]],
|
||||
[[6, 50], ["value", "null", "1p", "border-bottom-width"]],
|
||||
[[7, 24], ["value", "null", "s", "border-bottom-style"]],
|
||||
[[9, 0], ["null", "null", "", ""]],
|
||||
[[10, 6], ["selector", "id", "devto", "#devto"]],
|
||||
[[10, 17], ["selector", "class", "de", "#devtools-menu.de"]],
|
||||
[[11, 5], ["selector", "class", "devt", ".devt"]],
|
||||
[[11, 30], ["selector", "id", "devtoo", ".devtools-toolbarbutton#devtoo"]],
|
||||
[[12, 10], ["property", "null", "-moz-app"]],
|
||||
[[16, 27], ["value", "null", "hsl", "text-shadow"]],
|
||||
[[19, 24], ["value", "null", "linear-gra", "background"]],
|
||||
[[19, 55], ["value", "null", "hsl", "background"]],
|
||||
[[19, 79], ["value", "null", "paddin", "background"]],
|
||||
[[20, 47], ["value", "null", "ins", "box-shadow"]],
|
||||
[[22, 15], ["value", "null", "inheri", "color"]],
|
||||
[[25, 26], ["selector", "null", "", ".devtools-toolbarbutton > "]],
|
||||
[[25, 28], ["selector", "tag", "hb", ".devtools-toolbarbutton > hb"]],
|
||||
[[25, 41], ["selector", "class", "toolbarbut", ".devtools-toolbarbutton > hbox.toolbarbut"]],
|
||||
[[29, 21], ["selector", "pseudo", "ac", ".devtools-menulist:ac"]],
|
||||
[[30, 27], ["selector", "pseudo", "foc", "#devtools-toolbarbutton:foc"]],
|
||||
[[31, 18], ["value", "null", "dot", "outline"]],
|
||||
[[32, 25], ["value", "null", "-4p", "outline-offset"]],
|
||||
[[35, 26], ["selector", "pseudo", "no", ".devtools-toolbarbutton:no"]],
|
||||
[[35, 28], ["selector", "null", "not", ""]],
|
||||
[[35, 30], ["selector", "attribute", "l", "[l"]],
|
||||
[[39, 46], ["selector", "class", "toolba", ".devtools-toolbarbutton:not([label]) > .toolba"]],
|
||||
[[43, 39], ["selector", "value", "tr", "[checked=tr"]],
|
||||
[[43, 47], ["selector", "pseudo", "hov", ".devtools-toolbarbutton:not([checked=true]):hov"]],
|
||||
[[43, 53], ["selector", "pseudo", "act", ".devtools-toolbarbutton:not([checked=true]):hover:act"]],
|
||||
[[47, 22], ["selector", "attribute", "op", ".devtools-menulist[op"]],
|
||||
[[47, 33], ["selector", "value", "tr", ".devtools-menulist[open =tr"]],
|
||||
[[48, 38], ["selector", "value", "tr", ".devtools-toolbarbutton[open = tr"]],
|
||||
[[49, 40], ["selector", "value", "true", ".devtools-toolbarbutton[checked= true"]],
|
||||
[[53, 34], ["selector", "value", "=", ".devtools-toolbarbutton[checked="]],
|
||||
[[58, 38], ["value", "null", "!impor", "background-color"]],
|
||||
[[61, 41], ["selector", "pseudo", "hov", ".devtools-toolbarbutton[checked=true]:hov"]],
|
||||
[[65, 47], ["selector", "class", "to", ".devtools-toolbarbutton[type=menu-button] > .to"]],
|
||||
[[69, 44], ["selector", "pseudo", "first-of", ".devtools-sidebar-tabs > tabs > tab:first-of"]],
|
||||
[[73, 45], ["selector", "pseudo", "last", ":last"]],
|
||||
[[77, 27], ["selector", "class", "vis", ".vis"]],
|
||||
[[78, 34], ["selector", "class", "hidd", ".hidden-labels-box.visible ~ .hidd"]],
|
||||
[[83, 5], ["media", "null", "medi"]],
|
||||
[[83, 22], ["media", "null", "800"]],
|
||||
[[84, 9], ["selector", "class", "catego", ".catego"]],
|
||||
[[89, 9], ["media", "null", "al"]],
|
||||
[[90, 6], ["selector", "id", "err", "#err"]],
|
||||
[[93, 11], ["property", "null", "backgro"]],
|
||||
[[98, 6], ["selector", "tag", "butt", "butt"]],
|
||||
[[99, 22], ["value", "null", "!impor", "width"]],
|
||||
[[103, 5], ["keyframes", "null", "ke"]],
|
||||
[[104, 7], ["frame", "null", "fro"]],
|
||||
[[104, 15], ["property", "null", "opac"]],
|
||||
[[104, 29], ["property", "null", "transf"]],
|
||||
[[104, 38], ["value", "null", "scal", "transform"]],
|
||||
[[105, 8], ["frame", "null", ""]],
|
||||
[[113, 6], ["keyframes", "null", "keyfr"]],
|
||||
[[114, 4], ["frame", "null", "fr"]],
|
||||
[[115, 3], ["frame", "null", "2"]],
|
||||
[[117, 8], ["property", "null", "opac"]],
|
||||
[[117, 16], ["value", "null", "0", "opacity"]],
|
||||
[[121, 0], ["null", "", ""]]
|
||||
]
|
||||
}
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
/* import-globals-from ../../framework/test/shared-head.js */
|
||||
/* exported promiseWaitForFocus, setup, ch, teardown, loadHelperScript,
|
||||
limit, ch, read, codemirrorSetStatus */
|
||||
|
||||
"use strict";
|
||||
|
||||
// shared-head.js handles imports, constants, and utility functions
|
||||
|
|
@ -104,16 +107,16 @@ function loadHelperScript(filePath) {
|
|||
* This method returns the portion of the input string `source` up to the
|
||||
* [line, ch] location.
|
||||
*/
|
||||
function limit(source, [line, ch]) {
|
||||
function limit(source, [line, char]) {
|
||||
line++;
|
||||
let list = source.split("\n");
|
||||
if (list.length < line) {
|
||||
return source;
|
||||
}
|
||||
if (line == 1) {
|
||||
return list[0].slice(0, ch);
|
||||
return list[0].slice(0, char);
|
||||
}
|
||||
return [...list.slice(0, line - 1), list[line - 1].slice(0, ch)].join("\n");
|
||||
return [...list.slice(0, line - 1), list[line - 1].slice(0, char)].join("\n");
|
||||
}
|
||||
|
||||
function read(url) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* exported runCodeMirrorTest */
|
||||
/* globals codemirrorSetStatus */
|
||||
|
||||
"use strict";
|
||||
|
|
@ -24,6 +26,7 @@ function runCodeMirrorTest(browser) {
|
|||
// 1) Proxy CM test harness calls into ok() calls
|
||||
// 2) Detecting when it finishes by checking the DOM and
|
||||
// setting a timeout to check again if not.
|
||||
/* eslint-disable max-len */
|
||||
mm.loadFrameScript("data:," +
|
||||
"content.wrappedJSObject.mozilla_setStatus = function(statusMsg, type, customMsg) {" +
|
||||
" sendSyncMessage('setStatus', {statusMsg: statusMsg, type: type, customMsg: customMsg});" +
|
||||
|
|
@ -35,4 +38,5 @@ function runCodeMirrorTest(browser) {
|
|||
"}" +
|
||||
"check();"
|
||||
, true);
|
||||
/* eslint-enable max-len */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue