Skip to content

Commit

Permalink
Bug 1295010 - Removed testActor from highlighterHelper in inspector t…
Browse files Browse the repository at this point in the history
…ests; r=me

MozReview-Commit-ID: GMksl81iGcp
  • Loading branch information
Patrick Brosset committed Sep 7, 2016
1 parent 2d94c54 commit f2f98d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,22 @@ const MOVE_EVENTS_DATA = [
];

add_task(function* () {
let helper = yield openInspectorForURL("data:text/html;charset=utf-8,"
+ encodeURIComponent(TEST_URI)
).then(getHighlighterHelperFor(HIGHLIGHTER_TYPE));
let {inspector, testActor} = yield openInspectorForURL(
"data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
let helper = yield getHighlighterHelperFor(HIGHLIGHTER_TYPE)({inspector, testActor});

helper.prefix = ID;

yield helper.show("html");
yield respondsToMoveEvents(helper);
yield respondsToMoveEvents(helper, testActor);
yield respondsToReturnAndEscape(helper);

helper.finalize();
});

function* respondsToMoveEvents(helper) {
function* respondsToMoveEvents(helper, testActor) {
info("Checking that the eyedropper responds to events from the mouse and keyboard");
let {mouse, testActor} = helper;
let {mouse} = helper;
let {width, height} = yield testActor.getBoundingClientRect("html");

for (let {type, x, y, key, shift, expected, desc} of MOVE_EVENTS_DATA) {
Expand Down
4 changes: 1 addition & 3 deletions devtools/client/inspector/test/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,7 @@ const getHighlighterHelperFor = (type) => Task.async(
finalize: function* () {
highlightedNode = null;
yield highlighter.finalize();
},

testActor: testActor
}
};
}
);
Expand Down

0 comments on commit f2f98d1

Please sign in to comment.