Bug 1714298 - [devtools] Remove unused testActor methods. r=jdescottes.

Differential Revision: https://phabricator.services.mozilla.com/D116692
This commit is contained in:
Nicolas Chevobbe 2021-06-04 05:27:35 +00:00
Родитель 70aa58af8f
Коммит 902f411249
1 изменённых файлов: 0 добавлений и 47 удалений

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

@ -101,13 +101,6 @@ var testSpec = protocol.generateActorSpec({
},
response: {},
},
waitForHighlighterEvent: {
request: {
event: Arg(0, "string"),
actorID: Arg(1, "string"),
},
response: {},
},
waitForEventOnNode: {
request: {
eventName: Arg(0, "string"),
@ -145,12 +138,6 @@ var testSpec = protocol.generateActorSpec({
value: RetVal("boolean"),
},
},
loadAndWaitForCustomEvent: {
request: {
url: Arg(0, "string"),
},
response: {},
},
hasNode: {
request: {
selector: Arg(0, "string"),
@ -392,18 +379,6 @@ var TestActor = protocol.ActorClassWithSpec(testSpec, {
});
},
/**
* Subscribe to a given highlighter event and respond when the event is received.
* @param {String} event The name of the highlighter event to listen to
* @param {String} actorID The highlighter actor ID
*/
waitForHighlighterEvent: function(event, actorID) {
const highlighter = this.conn.getActor(actorID);
const { _highlighter: h } = highlighter;
return h.once(event);
},
/**
* Wait for a specific event on a node matching the provided selector.
* @param {String} eventName The name of the event to listen to
@ -482,24 +457,6 @@ var TestActor = protocol.ActorClassWithSpec(testSpec, {
return InspectorUtils.hasPseudoClassLock(node, pseudo);
},
loadAndWaitForCustomEvent: function(url) {
return new Promise(resolve => {
// Wait for DOMWindowCreated first, as listening on the current outerwindow
// doesn't allow receiving test-page-processing-done.
this.targetActor.chromeEventHandler.addEventListener(
"DOMWindowCreated",
() => {
this.content.addEventListener("test-page-processing-done", resolve, {
once: true,
});
},
{ once: true }
);
this.content.location = url;
});
},
hasNode: function(selector) {
try {
// _querySelector throws if the node doesn't exists
@ -1072,10 +1029,6 @@ class TestFront extends protocol.FrontClassWithSpec(testSpec) {
};
}
waitForHighlighterEvent(event) {
return super.waitForHighlighterEvent(event, this.highlighter.actorID);
}
/**
* Get the "d" attribute value for one of the box-model highlighter's region
* <path> elements, and parse it to a list of points.