Test fixes

This commit is contained in:
dragonmacher 2022-12-05 11:14:59 -05:00
parent 91d8510993
commit 41c2f0bf26
2 changed files with 12 additions and 9 deletions

View file

@ -237,12 +237,12 @@ public class AnalyzeAllOpenProgramsTaskTest extends AbstractGhidraHeadedIntegrat
}
/**
* Verifies that changing the analyzers to be run affects the task list for
* Verifies that changing the analyzers to be run affects the task list for
* all open programs.
* <p>
* For this test we'll verify that a specific analyzer is enabled, then turn off all
* analyzers and check again to verify that the analyzer is no longer enabled.
*
*
* @throws Exception if there is a problem building the test programs
*/
@Test
@ -277,7 +277,7 @@ public class AnalyzeAllOpenProgramsTaskTest extends AbstractGhidraHeadedIntegrat
/**
* Returns true if the given analyzer is enabled.
*
*
* @param name the name of the analyzer
* @param program the program to check
* @return true if the analyzer is enabled; false otherwise
@ -310,8 +310,7 @@ public class AnalyzeAllOpenProgramsTaskTest extends AbstractGhidraHeadedIntegrat
pressButtonByText(warningDialog, "Continue");
}
AnalysisOptionsDialog optionsDialog =
waitForDialogComponent(AnalysisOptionsDialog.class);
AnalysisOptionsDialog optionsDialog = waitForDialogComponent(AnalysisOptionsDialog.class);
// select some options
JComponent root = optionsDialog.getComponent();
@ -325,8 +324,7 @@ public class AnalyzeAllOpenProgramsTaskTest extends AbstractGhidraHeadedIntegrat
}
private void cancelAnalysisDialog() {
AnalysisOptionsDialog optionsDialog =
waitForDialogComponent(AnalysisOptionsDialog.class);
AnalysisOptionsDialog optionsDialog = waitForDialogComponent(AnalysisOptionsDialog.class);
// press Apply
pressButtonByText(optionsDialog, "Cancel");
@ -431,6 +429,11 @@ public class AnalyzeAllOpenProgramsTaskTest extends AbstractGhidraHeadedIntegrat
public void close() {
runSwing(() -> super.close());
}
@Override
public void saveTool() {
// do not save our stub tool
}
}
private class AnalyzeProgramStrategySpy extends AnalyzeProgramStrategy {

View file

@ -444,8 +444,8 @@ public abstract class PluginTool extends AbstractDockingTool {
/**
* Request tool to accept specified URL. Acceptance of URL depends greatly on the plugins
* confiugred into tool. If no plugin accepts URL it will be rejected and false returned.
* If a plugin can accept the specified URL it will attempt to process and return true if
* configured into tool. If no plugin accepts URL it will be rejected and false returned.
* If a plugin can accept the specified URL it will attempt to process and return true if
* successful. The user may be prompted if connecting to the URL requires user authentication.
* @param url read-only resource URL
* @return true if URL accepted and processed else false