Skip to content

Commit

Permalink
Clear stored history for Base URLs, test cases and test suites. Fixes…
Browse files Browse the repository at this point in the history
… issue SeleniumHQ#6135
  • Loading branch information
samitbadle committed Sep 9, 2013
1 parent f8e0b54 commit 4d5b02d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ide/main/src/content/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ Editor.controller = {
case "cmd_selenium_speed_faster":
case "cmd_selenium_speed_slower":
case "cmd_selenium_speed_slowest":
case "cmd_selenium_clear_base_URL_history":
case "cmd_selenium_clear_test_cases_history":
case "cmd_selenium_clear_test_suites_history":
return true;
default:
return false;
Expand All @@ -286,6 +289,9 @@ Editor.controller = {
case "cmd_save_suite":
case "cmd_save_suite_as":
case "cmd_selenium_testcase_clear":
case "cmd_selenium_clear_base_URL_history":
case "cmd_selenium_clear_test_cases_history":
case "cmd_selenium_clear_test_suites_history":
return true;
case "cmd_selenium_play":
return editor.app.isPlayable() && editor.selDebugger.state != Debugger.PLAYING;
Expand Down Expand Up @@ -401,6 +407,15 @@ Editor.controller = {
case "cmd_selenium_speed_slowest":
editor.updateInterval(1000);
break;
case "cmd_selenium_clear_base_URL_history":
editor.app.baseURLHistory.clear();
break;
case "cmd_selenium_clear_test_cases_history":
editor.app.recentTestCases.clear();
break;
case "cmd_selenium_clear_test_suites_history":
editor.app.recentTestSuites.clear();
break;
default:
}
},
Expand Down
10 changes: 10 additions & 0 deletions ide/main/src/content/selenium-ide-common.xul
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ limitations under the License.
<command id="cmd_selenium_speed_faster" oncommand="goDoCommand('cmd_selenium_speed_faster')"/>
<command id="cmd_selenium_speed_slower" oncommand="goDoCommand('cmd_selenium_speed_slower')"/>
<command id="cmd_selenium_speed_slowest" oncommand="goDoCommand('cmd_selenium_speed_slowest')"/>
<command id="cmd_selenium_clear_base_URL_history" oncommand="goDoCommand('cmd_selenium_clear_base_URL_history')"/>
<command id="cmd_selenium_clear_test_cases_history" oncommand="goDoCommand('cmd_selenium_clear_test_cases_history')"/>
<command id="cmd_selenium_clear_test_suites_history" oncommand="goDoCommand('cmd_selenium_clear_test_suites_history')"/>
</commandset>
<!-- <commandset id="stateUpdater" commandupdater="true" events="focus,selenium-ide-state" oncommandupdate="alert('commandupdate: window.editor=' + window.editor);if (window.editor) { editor.updateSeleniumCommands() }"/>-->
<commandset id="seleniumIDEUpdater" commandupdater="true" events="focus,selenium-ide-state" oncommandupdate="if (window.editor) { window.editor.updateSeleniumCommands() }"/>
Expand Down Expand Up @@ -216,6 +219,13 @@ limitations under the License.
<menupopup id="popup_clipboard_formats" onpopupshowing="window.editor.populateFormatsPopup(this, 'switchClipboardFormat', window.editor.app.clipboardFormat)" oncommand="window.editor.app.setClipboardFormat(window.editor.app.formats.selectFormat(event.target.getAttribute('value')))">
</menupopup>
</menu>
<menu id="clearHistoryMenu" label="Clear history">
<menupopup id="popup_clear_history">
<menuitem label="Clear base URL history" command="cmd_selenium_clear_base_URL_history"/>
<menuitem label="Clear recent test cases history" command="cmd_selenium_clear_test_cases_history"/>
<menuitem label="Clear recent test suites history" command="cmd_selenium_clear_test_suites_history"/>
</menupopup>
</menu>
<menuitem id="internalTestsMenu" label="&internalTestsMenu.label;" oncommand="window.editor.showInBrowser('chrome://selenium-ide/content/tests/index.html');" />
</menupopup>
</menu>
Expand Down

0 comments on commit 4d5b02d

Please sign in to comment.