mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-9-23-25' into Ghidra_12.0
This commit is contained in:
commit
6c1a1b4600
2 changed files with 14 additions and 13 deletions
|
@ -15,13 +15,13 @@
|
||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.codebrowser;
|
package ghidra.app.plugin.core.codebrowser;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.*;
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
|
import docking.action.MenuData;
|
||||||
import ghidra.app.context.ProgramLocationActionContext;
|
import ghidra.app.context.ProgramLocationActionContext;
|
||||||
import ghidra.app.services.ProgramManager;
|
import ghidra.app.services.ProgramManager;
|
||||||
import ghidra.app.util.viewer.listingpanel.ListingModel;
|
import ghidra.app.util.viewer.listingpanel.ListingModel;
|
||||||
|
@ -217,13 +217,18 @@ public class ExpandCollapseDataActionsTest extends AbstractGhidraHeadedIntegrati
|
||||||
public void testExpandAllInSelectionEnablement() {
|
public void testExpandAllInSelectionEnablement() {
|
||||||
// Expand All In Selection is enabled whenever there is a selection
|
// Expand All In Selection is enabled whenever there is a selection
|
||||||
ProgramSelection selection = new ProgramSelection(addr(0), addr(10));
|
ProgramSelection selection = new ProgramSelection(addr(0), addr(10));
|
||||||
assertTrue(!expandAll.isEnabledForContext(getContext(addr(0x0), null)));
|
ActionContext context = getContext(addr(0x0), null);
|
||||||
assertEquals("Expand All Data", expandAll.getPopupMenuData().getMenuPath()[0]);
|
assertTrue(!expandAll.isEnabledForContext(context));
|
||||||
|
MenuData menuData = expandAll.getPopupMenuData();
|
||||||
|
String[] menuPath = menuData.getMenuPath();
|
||||||
|
assertArrayEquals(menuPath, new String[] { "Data", "Expand All Data" });
|
||||||
|
|
||||||
assertTrue(
|
context = getContextWithSelection(addr(STRUCT_1), selection);
|
||||||
expandAll.isEnabledForContext(getContextWithSelection(addr(STRUCT_1), selection)));
|
assertTrue(expandAll.isEnabledForContext(context));
|
||||||
// When there is a selection, the pop-up menu changes
|
// When there is a selection, the pop-up menu changes
|
||||||
assertEquals("Expand All Data In Selection", expandAll.getPopupMenuData().getMenuPath()[0]);
|
menuData = expandAll.getPopupMenuData();
|
||||||
|
menuPath = menuData.getMenuPath();
|
||||||
|
assertArrayEquals(menuPath, new String[] { "Data", "Expand All Data In Selection" });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -224,10 +224,6 @@ public class KeyBindingsTest extends AbstractGhidraHeadedIntegrationTest {
|
||||||
assertKeyFieldText(ks);
|
assertKeyFieldText(ks);
|
||||||
apply();
|
apply();
|
||||||
assertEquals(ks, getKeyStroke(action1));
|
assertEquals(ks, getKeyStroke(action1));
|
||||||
|
|
||||||
// verify the additional binding for 'Alt Graph'
|
|
||||||
action = (Action) TestUtils.invokeInstanceMethod("getActionForKeyStroke", dwm, keyStroke);
|
|
||||||
assertNotNull(action);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue