Bug 1093431 - Intermittent browser_styleinspector_tooltip-closes-on-new-selection.js; r=test-only

Make sure the test removes the toggling on hover of the rule-view tooltip to avoid intermittents
when mouseleave events are somehow simulated in previous tests.
And cleanup the test a little bit so it actually tests something.

--HG--
extra : commitid : D8pgKn4yT2Q
This commit is contained in:
Patrick Brosset 2015-08-17 13:58:56 +02:00
Родитель 76e8ea6fee
Коммит 42e6d83ec7
2 изменённых файлов: 19 добавлений и 3 удалений

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

@ -193,7 +193,7 @@ skip-if = e10s # bug 1040670 Cannot open inline styles in viewSourceUtils
[browser_styleinspector_refresh_when_active.js]
[browser_styleinspector_tooltip-background-image.js]
[browser_styleinspector_tooltip-closes-on-new-selection.js]
skip-if = e10s || os == 'linux' # Bug 1111546 (e10s), bug 1093431 (linux)
skip-if = e10s # Bug 1111546 (e10s)
[browser_styleinspector_tooltip-longhand-fontfamily.js]
[browser_styleinspector_tooltip-multiple-background-images.js]
[browser_styleinspector_tooltip-shorthand-fontfamily.js]

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

@ -23,9 +23,17 @@ add_task(function*() {
function* testRuleView(ruleView, inspector) {
info("Showing the tooltip");
let tooltip = ruleView.tooltips.previewTooltip;
tooltip.setTextContent({messages: ["rule-view tooltip"]});
// Stop listening for mouse movements because it's not needed for this test,
// and causes intermittent failures on Linux. When this test runs in the suite
// sometimes a mouseleave event is dispatched at the start, which causes the
// tooltip to hide in the middle of being shown, which causes timeouts later.
tooltip.stopTogglingOnHover();
let onShown = tooltip.once("shown");
tooltip.show();
tooltip.show(ruleView.styleDocument.firstElementChild);
yield onShown;
info("Selecting a new node");
@ -38,9 +46,17 @@ function* testRuleView(ruleView, inspector) {
function* testComputedView(computedView, inspector) {
info("Showing the tooltip");
let tooltip = computedView.tooltips.previewTooltip;
tooltip.setTextContent({messages: ["computed-view tooltip"]});
// Stop listening for mouse movements because it's not needed for this test,
// and causes intermittent failures on Linux. When this test runs in the suite
// sometimes a mouseleave event is dispatched at the start, which causes the
// tooltip to hide in the middle of being shown, which causes timeouts later.
tooltip.stopTogglingOnHover();
let onShown = tooltip.once("shown");
tooltip.show();
tooltip.show(computedView.styleDocument.firstElementChild);
yield onShown;
info("Selecting a new node");