Skip to content

Commit

Permalink
merge fx-team to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Jul 1, 2016
2 parents 58a76ef + 434aea3 commit aead663
Show file tree
Hide file tree
Showing 50 changed files with 884 additions and 669 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ devtools/server/**
!devtools/server/actors/webbrowser.js
!devtools/server/actors/styles.js
!devtools/server/actors/string.js
!devtools/server/actors/csscoverage.js
devtools/shared/*.js
!devtools/shared/css-lexer.js
!devtools/shared/defer.js
Expand Down
7 changes: 0 additions & 7 deletions devtools/client/commandline/test/browser_cmd_screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ function* addTabWithToolbarRunTests(win) {
filename: { value: "" + file.path },
fullpage: { value: false },
clipboard: { value: false },
chrome: { value: false },
},
},
exec: {
Expand All @@ -123,7 +122,6 @@ function* addTabWithToolbarRunTests(win) {
check: {
args: {
clipboard: { value: true },
chrome: { value: false },
},
},
exec: {
Expand All @@ -143,7 +141,6 @@ function* addTabWithToolbarRunTests(win) {
args: {
fullpage: { value: true },
clipboard: { value: true },
chrome: { value: false },
},
},
exec: {
Expand All @@ -166,7 +163,6 @@ function* addTabWithToolbarRunTests(win) {
check: {
args: {
clipboard: { value: true },
chrome: { value: false },
},
},
exec: {
Expand Down Expand Up @@ -215,7 +211,6 @@ function* addTabWithToolbarRunTests(win) {
check: {
args: {
clipboard: { value: true },
chrome: { value: false },
},
},
exec: {
Expand All @@ -239,7 +234,6 @@ function* addTabWithToolbarRunTests(win) {
args: {
fullpage: { value: true },
clipboard: { value: true },
chrome: { value: false },
},
},
exec: {
Expand All @@ -264,7 +258,6 @@ function* addTabWithToolbarRunTests(win) {
check: {
args: {
clipboard: { value: true },
chrome: { value: false },
},
},
exec: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@ add_task(function* () {

function* addNewRuleFromContextMenu(inspector, view) {
info("Waiting for context menu to be shown");
let onPopup = once(view._contextmenu._menupopup, "popupshown");
let win = view.styleWindow;

EventUtils.synthesizeMouseAtCenter(view.element,
{button: 2, type: "contextmenu"}, win);
yield onPopup;
let allMenuItems = openStyleContextMenuAndGetAllItems(view, view.element);
let menuitemAddRule = allMenuItems.find(item => item.label ===
_STRINGS.GetStringFromName("styleinspector.contextmenu.addNewRule"));

ok(!view._contextmenu.menuitemAddRule.hidden, "Add rule is visible");
ok(menuitemAddRule.visible, "Add rule is visible");

info("Adding the new rule and expecting a ruleview-changed event");
let onRuleViewChanged = view.once("ruleview-changed");
view._contextmenu.menuitemAddRule.click();
view._contextmenu._menupopup.hidePopup();
menuitemAddRule.click();
yield onRuleViewChanged;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ function* testMdnContextMenuItemVisibility(view) {
let root = rootElement(view);
for (let node of iterateNodes(root)) {
info("Setting " + node + " as popupNode");
view.styleDocument.popupNode = node;
info("Creating context menu with " + node + " as popupNode");
let allMenuItems = openStyleContextMenuAndGetAllItems(view, node);
let menuitemShowMdnDocs = allMenuItems.find(item => item.label ===
_STRINGS.GetStringFromName("styleinspector.contextmenu.showMdnDocs"));

info("Updating context menu state");
view._contextmenu._updateMenuItems();
let isVisible = !view._contextmenu.menuitemShowMdnDocs.hidden;
let isVisible = menuitemShowMdnDocs.visible;
let shouldBeVisible = isPropertyNameNode(node);
let message = shouldBeVisible ? "shown" : "hidden";
is(isVisible, shouldBeVisible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ function* testShowMdnTooltip(view) {

let {nameSpan} = getRuleViewProperty(view, "element", PROPERTYNAME);

view.styleDocument.popupNode = nameSpan.firstChild;
view._contextmenu._updateMenuItems();
let allMenuItems = openStyleContextMenuAndGetAllItems(view, nameSpan.firstChild);
let menuitemShowMdnDocs = allMenuItems.find(item => item.label ===
_STRINGS.GetStringFromName("styleinspector.contextmenu.showMdnDocs"));

let cssDocs = view.tooltips.cssDocs;

info("Showing the MDN docs tooltip");
let onShown = cssDocs.tooltip.once("shown");
view._contextmenu.menuitemShowMdnDocs.click();
menuitemShowMdnDocs.click();
yield onShown;
ok(true, "The MDN docs tooltip was shown");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ function* testMdnContextMenuItemVisibility(view, shouldBeVisible) {
info("Set a CSS property name as popupNode");
let root = rootElement(view);
let node = root.querySelector("." + PROPERTY_NAME_CLASS).firstChild;
view.styleDocument.popupNode = node;
let allMenuItems = openStyleContextMenuAndGetAllItems(view, node);
let menuitemShowMdnDocs = allMenuItems.find(item => item.label ===
_STRINGS.GetStringFromName("styleinspector.contextmenu.showMdnDocs"));

info("Update context menu state");
view._contextmenu._updateMenuItems();
let isVisible = !view._contextmenu.menuitemShowMdnDocs.hidden;
let isVisible = menuitemShowMdnDocs.visible;
is(isVisible, shouldBeVisible,
"The MDN context menu item is " + message);
}
Expand Down
Loading

0 comments on commit aead663

Please sign in to comment.