зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1714994 - [devtools] Remove testActor from runEditOuterHTMLTests r=nchevobbe
Depends on D116965 Differential Revision: https://phabricator.services.mozilla.com/D117001
This commit is contained in:
Родитель
8e5bb0f75d
Коммит
024c25abe1
|
@ -105,7 +105,7 @@ const TEST_URL =
|
|||
"</html>";
|
||||
|
||||
add_task(async function() {
|
||||
const { inspector, testActor } = await openInspectorForURL(TEST_URL);
|
||||
const { inspector } = await openInspectorForURL(TEST_URL);
|
||||
inspector.markup._frame.focus();
|
||||
await runEditOuterHTMLTests(TEST_DATA, inspector, testActor);
|
||||
await runEditOuterHTMLTests(TEST_DATA, inspector);
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ const TEST_DATA = [
|
|||
selector: "#badMarkup1",
|
||||
oldHTML: '<div id="badMarkup1">badMarkup1</div>',
|
||||
newHTML: '<div id="badMarkup1">badMarkup1</div> hanging</div>',
|
||||
validate: async function({ pageNodeFront, selectedNodeFront, testActor }) {
|
||||
validate: async function({ pageNodeFront, selectedNodeFront }) {
|
||||
is(pageNodeFront, selectedNodeFront, "Original element is selected");
|
||||
|
||||
const [textNodeName, textNodeData] = await SpecialPowers.spawn(
|
||||
|
@ -35,7 +35,7 @@ const TEST_DATA = [
|
|||
newHTML:
|
||||
'<div id="badMarkup2">badMarkup2</div> hanging<div></div>' +
|
||||
"</div></div></body>",
|
||||
validate: async function({ pageNodeFront, selectedNodeFront, testActor }) {
|
||||
validate: async function({ pageNodeFront, selectedNodeFront }) {
|
||||
is(pageNodeFront, selectedNodeFront, "Original element is selected");
|
||||
|
||||
const [textNodeName, textNodeData] = await SpecialPowers.spawn(
|
||||
|
@ -57,7 +57,7 @@ const TEST_DATA = [
|
|||
newHTML:
|
||||
'<div id="badMarkup3">badMarkup3 <em>Emphasized <strong> ' +
|
||||
"and strong</div>",
|
||||
validate: async function({ pageNodeFront, selectedNodeFront, testActor }) {
|
||||
validate: async function({ pageNodeFront, selectedNodeFront }) {
|
||||
is(pageNodeFront, selectedNodeFront, "Original element is selected");
|
||||
|
||||
const emText = await getContentPageElementProperty(
|
||||
|
@ -76,7 +76,7 @@ const TEST_DATA = [
|
|||
selector: "#badMarkup4",
|
||||
oldHTML: '<div id="badMarkup4">badMarkup4</div>',
|
||||
newHTML: '<div id="badMarkup4">badMarkup4</p>',
|
||||
validate: async function({ pageNodeFront, selectedNodeFront, testActor }) {
|
||||
validate: async function({ pageNodeFront, selectedNodeFront }) {
|
||||
is(pageNodeFront, selectedNodeFront, "Original element is selected");
|
||||
|
||||
const divText = await getContentPageElementProperty(
|
||||
|
@ -107,7 +107,7 @@ const TEST_DATA = [
|
|||
selector: "#badMarkup5",
|
||||
oldHTML: '<p id="badMarkup5">badMarkup5</p>',
|
||||
newHTML: '<p id="badMarkup5">badMarkup5 <div>with a nested div</div></p>',
|
||||
validate: async function({ pageNodeFront, selectedNodeFront, testActor }) {
|
||||
validate: async function({ pageNodeFront, selectedNodeFront }) {
|
||||
is(pageNodeFront, selectedNodeFront, "Original element is selected");
|
||||
|
||||
const num = await getNumberOfMatchingElementsInContentPage(
|
||||
|
@ -151,7 +151,7 @@ const TEST_URL =
|
|||
"</html>";
|
||||
|
||||
add_task(async function() {
|
||||
const { inspector, testActor } = await openInspectorForURL(TEST_URL);
|
||||
const { inspector } = await openInspectorForURL(TEST_URL);
|
||||
inspector.markup._frame.focus();
|
||||
await runEditOuterHTMLTests(TEST_DATA, inspector, testActor);
|
||||
await runEditOuterHTMLTests(TEST_DATA, inspector);
|
||||
});
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
* @param {Array} tests See runEditOuterHTMLTest for the structure
|
||||
* @param {InspectorPanel} inspector The instance of InspectorPanel currently
|
||||
* opened
|
||||
* @param {TestActorFront} testActor The current TestActorFront instance
|
||||
* @return a promise that resolves when the tests have run
|
||||
*/
|
||||
function runEditOuterHTMLTests(tests, inspector, testActor) {
|
||||
function runEditOuterHTMLTests(tests, inspector) {
|
||||
info("Running " + tests.length + " edit-outer-html tests");
|
||||
return (async function() {
|
||||
for (const step of tests) {
|
||||
await runEditOuterHTMLTest(step, inspector, testActor);
|
||||
await runEditOuterHTMLTest(step, inspector);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
@ -39,10 +38,9 @@ function runEditOuterHTMLTests(tests, inspector, testActor) {
|
|||
* after the new outer-html has been inserted. Should be used to verify
|
||||
* the actual DOM, see if it corresponds to the newHTML string provided
|
||||
* @param {InspectorPanel} inspector The instance of InspectorPanel currently
|
||||
* @param {TestActorFront} testActor The current TestActorFront instance
|
||||
* opened
|
||||
*/
|
||||
async function runEditOuterHTMLTest(test, inspector, testActor) {
|
||||
async function runEditOuterHTMLTest(test, inspector) {
|
||||
info("Running an edit outerHTML test on '" + test.selector + "'");
|
||||
await selectNode(test.selector, inspector);
|
||||
|
||||
|
@ -70,7 +68,6 @@ async function runEditOuterHTMLTest(test, inspector, testActor) {
|
|||
pageNodeFront,
|
||||
selectedNodeFront,
|
||||
inspector,
|
||||
testActor,
|
||||
});
|
||||
} else {
|
||||
is(
|
||||
|
|
Загрузка…
Ссылка в новой задаче