From a2a97bcad6de0d45d4b5a29ee7064aeb955cd726 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Fri, 9 Nov 2018 16:22:56 +0000 Subject: [PATCH] Delete the old IDE We've not done a release a loooong time, and this code is no longer needed. This also paves the way for us to start the process of bringing the shiny new Selenium IDE TNG into the tree. Can we just take a moment to remember the time, care, thought, and energy that went into writing this and maintaining it through the years. Thanks everyone who contributed for all your work. :wq --- .idea/modules.xml | 1 - Rakefile | 16 +- ide/build.desc | 41 - ide/ide.iml | 15 - ide/install.rdf | 24 - ide/main/build.desc | 22 - .../SeleniumIDEGenericAutoCompleteSearch.xpt | Bin 353 -> 0 bytes ide/main/src/chrome.manifest | 21 - ide/main/src/chrome.manifest.production | 21 - .../src/chrome/icons/default/selenium-ide.ico | Bin 5430 -> 0 bytes .../SeleniumIDEGenericAutoCompleteSearch.js | 164 - ide/main/src/content/HelpView.html | 7 - ide/main/src/content/LogFrame.html | 10 - ide/main/src/content/api.js | 150 - ide/main/src/content/application.js | 422 -- .../content/browser/mozilla/prompt-service.js | 54 - ide/main/src/content/commandBuilders.js | 192 - ide/main/src/content/contents.rdf | 26 - ide/main/src/content/debugger.js | 260 - ide/main/src/content/dnd-observers.js | 73 - ide/main/src/content/dndReorderedListbox.js | 212 - ide/main/src/content/editor.js | 1732 ------ ide/main/src/content/file-utils.js | 238 - ide/main/src/content/format-source-dialog.js | 55 - ide/main/src/content/format-source-dialog.xul | 40 - ide/main/src/content/format.js | 558 -- ide/main/src/content/formats/blank.js | 36 - .../formats/formatCommandOnlyAdapter.js | 129 - ide/main/src/content/formats/html.js | 397 -- ide/main/src/content/formats/remoteControl.js | 381 -- ide/main/src/content/formats/webdriver.js | 844 --- ide/main/src/content/health/diag-info.js | 30 - ide/main/src/content/health/diag-info.xul | 55 - .../src/content/health/firefox-diagnostics.js | 20 - ide/main/src/content/health/health-service.js | 248 - .../health/selenium-ide-diagnostics.js | 17 - ide/main/src/content/help.html | 4 - .../content/images/selenium-ide-logo16.png | Bin 852 -> 0 bytes .../content/images/selenium-ide-logo32.png | Bin 2144 -> 0 bytes ide/main/src/content/locatorBuilders.js | 543 -- ide/main/src/content/log-frame.css | 4 - ide/main/src/content/optionsDialog.js | 445 -- ide/main/src/content/optionsDialog.xul | 175 - ide/main/src/content/plugin.js | 282 - ide/main/src/content/preferences.js | 181 - ide/main/src/content/recorder-handlers.js | 216 - ide/main/src/content/recorder.js | 354 -- .../remote-selenium-commandhandlers.js | 460 -- ide/main/src/content/rollup-view.html | 6 - .../scheduler/natural-language-english.js | 201 - ide/main/src/content/scheduler/schedule.js | 531 -- .../content/scheduler/scheduler-selenium.js | 243 - ide/main/src/content/scheduler/schedulerui.js | 466 -- .../src/content/scheduler/schedulerui.xul | 165 - ide/main/src/content/selenium-api-override.js | 0 .../src/content/selenium-core/TestSuite.html | 15 - .../src/content/selenium-core/iedoc-core.xml | 1832 ------ ide/main/src/content/selenium-core/iedoc.xml | 1841 ------ .../src/content/selenium-core/reference.html | 5081 ----------------- .../scripts/selenium-testrunner-original.js | 1362 ----- .../scripts/selenium-testrunner.js | 10 - .../selenium-core/scripts/user-extensions.js | 61 - ide/main/src/content/selenium-ide-common.xul | 353 -- ide/main/src/content/selenium-ide-loader.js | 96 - ide/main/src/content/selenium-ide-overlay.js | 288 - ide/main/src/content/selenium-ide-overlay.xul | 101 - ide/main/src/content/selenium-ide-sidebar.xul | 152 - ide/main/src/content/selenium-ide.xul | 174 - ide/main/src/content/selenium-runner.js | 582 -- .../src/content/selenium-src/TestSuite.html | 15 - .../scripts/selenium-testrunner.js | 10 - ide/main/src/content/sidebar-editor.js | 42 - ide/main/src/content/sourceView.js | 108 - ide/main/src/content/standalone-editor.js | 37 - ide/main/src/content/storedHistory.js | 69 - ide/main/src/content/suiteTreeView.js | 288 - ide/main/src/content/testCase.js | 520 -- ide/main/src/content/testCaseProperties.xul | 67 - ide/main/src/content/testSuite.js | 302 - ide/main/src/content/testSuiteProgress.js | 60 - .../functional/OpenSeleniumIDE-test.html | 24 - .../tests/functional/OpenSeleniumIDE.html | 23 - .../content/tests/functional/TestAlert.html | 126 - .../content/tests/functional/TestBasic.html | 99 - .../tests/functional/TestDragAndDrop.html | 54 - .../content/tests/functional/TestFrame.html | 86 - .../tests/functional/TestPlay-test.html | 59 - .../content/tests/functional/TestPlay.html | 33 - .../TestPlaySingleCommand-test.html | 72 - .../functional/TestPlaySingleCommand.html | 33 - .../content/tests/functional/TestPopup.html | 88 - .../content/tests/functional/TestSelect.html | 73 - .../content/tests/functional/TestSuite.html | 27 - .../functional/TestTestRunner-extension.js | 88 - .../tests/functional/TestTestRunner-test.html | 54 - .../functional/TestTestRunner-testcase.html | 67 - .../tests/functional/TestTestRunner.html | 33 - .../content/tests/functional/aut/alert.html | 10 - .../tests/functional/aut/checksandradios.html | 16 - .../tests/functional/aut/disabled.html | 9 - .../tests/functional/aut/form-fields.html | 11 - .../content/tests/functional/aut/result.html | 10 - .../content/tests/functional/aut/search.html | 48 - .../content/tests/functional/aut/select.html | 22 - .../aut/test_multi_level_frame2.html | 7 - .../tests/functional/aut/test_popup.html | 6 - .../content/tests/functional/aut/uploads.html | 10 - .../tests/functional/aut/visibility.html | 29 - .../src/content/tests/functional/index.html | 7 - .../tests/functional/startRecording.html | 9 - .../tests/functional/verifyCommands.html | 14 - .../tests/functional/verifyCommands.js | 93 - ide/main/src/content/tests/index.html | 17 - .../src/content/tests/unit/TestSuite.html | 32 - .../content/tests/unit/application-tests.html | 75 - .../src/content/tests/unit/editor-tests.html | 30 - .../src/content/tests/unit/format-tests.html | 167 - .../content/tests/unit/html-format-tests.html | 98 - .../content/tests/unit/html/TestEmptyTD.html | 23 - .../unit/html/TestWaitInPopupWindow.html | 110 - .../content/tests/unit/html/XhtmlTestCase.xml | 29 - .../tests/unit/locatorBuilders-tests.html | 165 - .../unit/locatorBuilders-xhtml-tests.xhtml | 53 - .../content/tests/unit/preferences-tests.html | 37 - .../content/tests/unit/recorder-tests.html | 142 - .../tests/unit/storedHistory-tests.html | 79 - .../src/content/tests/unit/test-api-doc.js | 9 - .../content/tests/unit/testCase-tests.html | 55 - ide/main/src/content/tests/unit/testHelper.js | 8 - .../unit/testSuite-tests-sampleSuite.html | 17 - .../content/tests/unit/testSuite-tests.html | 119 - .../tests/unit/testSuiteProgress-tests.html | 49 - .../src/content/tests/unit/tools-tests.html | 50 - ide/main/src/content/tools.js | 404 -- ide/main/src/content/treeView.js | 851 --- ide/main/src/content/ui-view.html | 6 - ide/main/src/content/utils/deferred.js | 168 - ide/main/src/content/utils/dispatcher.js | 36 - ide/main/src/content/utils/gist.js | 68 - ide/main/src/content/utils/http.js | 130 - .../src/content/webdriver-backed-selenium.js | 422 -- ide/main/src/content/xhtml-entities.js | 256 - ide/main/src/content/xul-utils.js | 117 - .../SeleniumIDEGenericAutoCompleteSearch.idl | 12 - ide/main/src/install.rdf | 35 - ide/main/src/locale/en-US/options.dtd | 32 - ide/main/src/locale/en-US/selenium-ide.dtd | 93 - .../src/locale/en-US/selenium-ide.properties | 42 - ide/main/src/locale/fr-FR/options.dtd | 33 - ide/main/src/locale/fr-FR/selenium-ide.dtd | 93 - .../src/locale/fr-FR/selenium-ide.properties | 42 - ide/main/src/locale/ja-JP/options.dtd | 32 - ide/main/src/locale/ja-JP/selenium-ide.dtd | 93 - .../src/locale/ja-JP/selenium-ide.properties | 42 - ide/main/src/locale/pt-BR/options.dtd | 32 - ide/main/src/locale/pt-BR/selenium-ide.dtd | 93 - .../src/locale/pt-BR/selenium-ide.properties | 42 - ide/main/src/locale/sv-SE/options.dtd | 32 - ide/main/src/locale/sv-SE/selenium-ide.dtd | 93 - .../src/locale/sv-SE/selenium-ide.properties | 42 - ide/main/src/skin/classic/fa-chrome.png | Bin 324 -> 0 bytes ide/main/src/skin/classic/fa-chrome_on.png | Bin 297 -> 0 bytes ide/main/src/skin/classic/fa-firefox.png | Bin 297 -> 0 bytes ide/main/src/skin/classic/fa-firefox_on.png | Bin 274 -> 0 bytes ide/main/src/skin/classic/fa-globe.png | Bin 318 -> 0 bytes ide/main/src/skin/classic/fa-globe_on.png | Bin 296 -> 0 bytes .../src/skin/classic/fa-internet-explorer.png | Bin 294 -> 0 bytes .../skin/classic/fa-internet-explorer_on.png | Bin 282 -> 0 bytes ide/main/src/skin/classic/fa-safari.png | Bin 344 -> 0 bytes ide/main/src/skin/classic/fa-safari_on.png | Bin 322 -> 0 bytes .../src/skin/classic/fa-times-circle-o.png | Bin 324 -> 0 bytes .../src/skin/classic/fa-times-circle-o_on.png | Bin 290 -> 0 bytes ide/main/src/skin/classic/help-view.css | 8 - ide/main/src/skin/classic/icons.png | Bin 5619 -> 0 bytes ide/main/src/skin/classic/icons_disabled.png | Bin 7588 -> 0 bytes ide/main/src/skin/classic/optionsDialog.css | 21 - .../platforms/mac/selenium-ide-platform.css | 43 - .../src/skin/classic/progress-background.png | Bin 183 -> 0 bytes .../src/skin/classic/progress-failure.png | Bin 220 -> 0 bytes .../src/skin/classic/progress-success.png | Bin 219 -> 0 bytes ide/main/src/skin/classic/reload.png | Bin 710 -> 0 bytes ide/main/src/skin/classic/reload_disabled.png | Bin 652 -> 0 bytes ide/main/src/skin/classic/rollup-view.css | 65 - ide/main/src/skin/classic/schedulerui.css | 20 - ide/main/src/skin/classic/selenium-ide-16.png | Bin 862 -> 0 bytes ide/main/src/skin/classic/selenium-ide-24.png | Bin 1457 -> 0 bytes ide/main/src/skin/classic/selenium-ide.css | 369 -- ide/main/src/skin/classic/slider-middle.png | Bin 179 -> 0 bytes ide/main/src/skin/classic/slider-thumb.png | Bin 553 -> 0 bytes ide/main/src/skin/classic/slider.png | Bin 316 -> 0 bytes ide/main/src/skin/classic/spiral.png | Bin 730 -> 0 bytes ide/main/src/skin/classic/spiral_disabled.png | Bin 733 -> 0 bytes ide/main/src/skin/classic/toolbar.css | 13 - ide/main/src/skin/classic/treeView-icons.png | Bin 636 -> 0 bytes ide/main/src/skin/classic/ui-view.css | 61 - ide/main/test/actions/type.html | 56 - ide/main/test/checks/checked.html | 61 - ide/main/test/checks/disabled.html | 42 - ide/main/test/checks/text.html | 86 - ide/main/test/checks/visibility.html | 127 - ide/main/test/locators/css.html | 27 - ide/main/test/locators/regexp.html | 42 - ide/main/test/popups/alert.html | 28 - ide/main/test/popups/confirm-accept.html | 28 - ide/main/test/popups/confirm-cancel.html | 33 - ide/main/test/popups/prompt.html | 33 - ide/main/test/testsuite.html | 23 - ide/main/test/testsuite.js | 13 - ide/plugins/csharp-format/build.desc | 6 - ide/plugins/csharp-format/src/chrome.manifest | 4 - .../src/chrome.manifest.production | 4 - .../src/content/formats/cs-rc.js | 224 - .../src/content/formats/cs-wd.js | 539 -- .../src/content/formats/format-loader.xul | 15 - ide/plugins/csharp-format/src/install.rdf | 31 - ide/plugins/groovy-format/build.desc | 6 - ide/plugins/groovy-format/src/chrome.manifest | 4 - .../src/chrome.manifest.production | 4 - .../src/content/formats/format-loader.xul | 14 - .../src/content/formats/groovy-rc.js | 221 - ide/plugins/groovy-format/src/install.rdf | 30 - ide/plugins/java-format/build.desc | 6 - ide/plugins/java-format/src/chrome.manifest | 4 - .../src/chrome.manifest.production | 4 - .../src/content/formats/format-loader.xul | 21 - .../src/content/formats/java-backed-junit4.js | 245 - .../src/content/formats/java-rc-junit4.js | 240 - .../src/content/formats/java-rc-testng.js | 42 - .../src/content/formats/java-rc.js | 232 - .../src/content/formats/webdriver-junit4.js | 529 -- .../src/content/formats/webdriver-testng.js | 522 -- ide/plugins/java-format/src/install.rdf | 31 - ide/plugins/perl-format/build.desc | 6 - ide/plugins/perl-format/src/chrome.manifest | 4 - .../src/chrome.manifest.production | 4 - .../src/content/formats/format-loader.xul | 14 - .../src/content/formats/perl-rc.js | 274 - ide/plugins/perl-format/src/install.rdf | 30 - ide/plugins/php-format/build.desc | 6 - ide/plugins/php-format/src/chrome.manifest | 4 - .../php-format/src/chrome.manifest.production | 4 - .../src/content/formats/format-loader.xul | 17 - .../src/content/formats/php-base.js | 169 - .../src/content/formats/php-phpunit.js | 54 - .../content/formats/php-testingselenium.js | 37 - ide/plugins/php-format/src/install.rdf | 30 - ide/plugins/python-format/build.desc | 6 - ide/plugins/python-format/src/chrome.manifest | 4 - .../src/chrome.manifest.production | 4 - .../src/content/formats/format-loader.xul | 15 - .../src/content/formats/python2-rc.js | 225 - .../src/content/formats/python2-wd.js | 542 -- ide/plugins/python-format/src/install.rdf | 31 - ide/plugins/ruby-format/build.desc | 6 - ide/plugins/ruby-format/src/chrome.manifest | 4 - .../src/chrome.manifest.production | 4 - .../src/content/formats/format-loader.xul | 18 - .../src/content/formats/ruby-rc-rspec.js | 249 - .../src/content/formats/ruby-rc.js | 217 - .../src/content/formats/ruby-wd-rspec.js | 540 -- .../src/content/formats/ruby-wd.js | 523 -- ide/plugins/ruby-format/src/install.rdf | 31 - rake-tasks/se-ide.rb | 125 - 263 files changed, 1 insertion(+), 37671 deletions(-) delete mode 100644 ide/build.desc delete mode 100644 ide/ide.iml delete mode 100644 ide/install.rdf delete mode 100644 ide/main/build.desc delete mode 100644 ide/main/prebuilt/main/SeleniumIDEGenericAutoCompleteSearch.xpt delete mode 100644 ide/main/src/chrome.manifest delete mode 100644 ide/main/src/chrome.manifest.production delete mode 100644 ide/main/src/chrome/icons/default/selenium-ide.ico delete mode 100644 ide/main/src/components/SeleniumIDEGenericAutoCompleteSearch.js delete mode 100644 ide/main/src/content/HelpView.html delete mode 100644 ide/main/src/content/LogFrame.html delete mode 100644 ide/main/src/content/api.js delete mode 100644 ide/main/src/content/application.js delete mode 100644 ide/main/src/content/browser/mozilla/prompt-service.js delete mode 100644 ide/main/src/content/commandBuilders.js delete mode 100644 ide/main/src/content/contents.rdf delete mode 100644 ide/main/src/content/debugger.js delete mode 100644 ide/main/src/content/dnd-observers.js delete mode 100644 ide/main/src/content/dndReorderedListbox.js delete mode 100644 ide/main/src/content/editor.js delete mode 100644 ide/main/src/content/file-utils.js delete mode 100644 ide/main/src/content/format-source-dialog.js delete mode 100644 ide/main/src/content/format-source-dialog.xul delete mode 100644 ide/main/src/content/format.js delete mode 100644 ide/main/src/content/formats/blank.js delete mode 100644 ide/main/src/content/formats/formatCommandOnlyAdapter.js delete mode 100644 ide/main/src/content/formats/html.js delete mode 100644 ide/main/src/content/formats/remoteControl.js delete mode 100644 ide/main/src/content/formats/webdriver.js delete mode 100644 ide/main/src/content/health/diag-info.js delete mode 100644 ide/main/src/content/health/diag-info.xul delete mode 100644 ide/main/src/content/health/firefox-diagnostics.js delete mode 100644 ide/main/src/content/health/health-service.js delete mode 100644 ide/main/src/content/health/selenium-ide-diagnostics.js delete mode 100644 ide/main/src/content/help.html delete mode 100644 ide/main/src/content/images/selenium-ide-logo16.png delete mode 100644 ide/main/src/content/images/selenium-ide-logo32.png delete mode 100644 ide/main/src/content/locatorBuilders.js delete mode 100644 ide/main/src/content/log-frame.css delete mode 100644 ide/main/src/content/optionsDialog.js delete mode 100644 ide/main/src/content/optionsDialog.xul delete mode 100644 ide/main/src/content/plugin.js delete mode 100644 ide/main/src/content/preferences.js delete mode 100644 ide/main/src/content/recorder-handlers.js delete mode 100644 ide/main/src/content/recorder.js delete mode 100644 ide/main/src/content/remote-selenium-commandhandlers.js delete mode 100644 ide/main/src/content/rollup-view.html delete mode 100644 ide/main/src/content/scheduler/natural-language-english.js delete mode 100644 ide/main/src/content/scheduler/schedule.js delete mode 100644 ide/main/src/content/scheduler/scheduler-selenium.js delete mode 100644 ide/main/src/content/scheduler/schedulerui.js delete mode 100644 ide/main/src/content/scheduler/schedulerui.xul delete mode 100644 ide/main/src/content/selenium-api-override.js delete mode 100644 ide/main/src/content/selenium-core/TestSuite.html delete mode 100644 ide/main/src/content/selenium-core/iedoc-core.xml delete mode 100644 ide/main/src/content/selenium-core/iedoc.xml delete mode 100644 ide/main/src/content/selenium-core/reference.html delete mode 100644 ide/main/src/content/selenium-core/scripts/selenium-testrunner-original.js delete mode 100644 ide/main/src/content/selenium-core/scripts/selenium-testrunner.js delete mode 100644 ide/main/src/content/selenium-core/scripts/user-extensions.js delete mode 100644 ide/main/src/content/selenium-ide-common.xul delete mode 100644 ide/main/src/content/selenium-ide-loader.js delete mode 100644 ide/main/src/content/selenium-ide-overlay.js delete mode 100644 ide/main/src/content/selenium-ide-overlay.xul delete mode 100644 ide/main/src/content/selenium-ide-sidebar.xul delete mode 100644 ide/main/src/content/selenium-ide.xul delete mode 100644 ide/main/src/content/selenium-runner.js delete mode 100644 ide/main/src/content/selenium-src/TestSuite.html delete mode 100644 ide/main/src/content/selenium-src/scripts/selenium-testrunner.js delete mode 100644 ide/main/src/content/sidebar-editor.js delete mode 100644 ide/main/src/content/sourceView.js delete mode 100644 ide/main/src/content/standalone-editor.js delete mode 100644 ide/main/src/content/storedHistory.js delete mode 100644 ide/main/src/content/suiteTreeView.js delete mode 100644 ide/main/src/content/testCase.js delete mode 100644 ide/main/src/content/testCaseProperties.xul delete mode 100644 ide/main/src/content/testSuite.js delete mode 100644 ide/main/src/content/testSuiteProgress.js delete mode 100644 ide/main/src/content/tests/functional/OpenSeleniumIDE-test.html delete mode 100644 ide/main/src/content/tests/functional/OpenSeleniumIDE.html delete mode 100644 ide/main/src/content/tests/functional/TestAlert.html delete mode 100644 ide/main/src/content/tests/functional/TestBasic.html delete mode 100644 ide/main/src/content/tests/functional/TestDragAndDrop.html delete mode 100644 ide/main/src/content/tests/functional/TestFrame.html delete mode 100644 ide/main/src/content/tests/functional/TestPlay-test.html delete mode 100644 ide/main/src/content/tests/functional/TestPlay.html delete mode 100644 ide/main/src/content/tests/functional/TestPlaySingleCommand-test.html delete mode 100644 ide/main/src/content/tests/functional/TestPlaySingleCommand.html delete mode 100644 ide/main/src/content/tests/functional/TestPopup.html delete mode 100644 ide/main/src/content/tests/functional/TestSelect.html delete mode 100644 ide/main/src/content/tests/functional/TestSuite.html delete mode 100644 ide/main/src/content/tests/functional/TestTestRunner-extension.js delete mode 100644 ide/main/src/content/tests/functional/TestTestRunner-test.html delete mode 100644 ide/main/src/content/tests/functional/TestTestRunner-testcase.html delete mode 100644 ide/main/src/content/tests/functional/TestTestRunner.html delete mode 100644 ide/main/src/content/tests/functional/aut/alert.html delete mode 100644 ide/main/src/content/tests/functional/aut/checksandradios.html delete mode 100644 ide/main/src/content/tests/functional/aut/disabled.html delete mode 100644 ide/main/src/content/tests/functional/aut/form-fields.html delete mode 100644 ide/main/src/content/tests/functional/aut/result.html delete mode 100644 ide/main/src/content/tests/functional/aut/search.html delete mode 100644 ide/main/src/content/tests/functional/aut/select.html delete mode 100644 ide/main/src/content/tests/functional/aut/test_multi_level_frame2.html delete mode 100644 ide/main/src/content/tests/functional/aut/test_popup.html delete mode 100644 ide/main/src/content/tests/functional/aut/uploads.html delete mode 100644 ide/main/src/content/tests/functional/aut/visibility.html delete mode 100644 ide/main/src/content/tests/functional/index.html delete mode 100644 ide/main/src/content/tests/functional/startRecording.html delete mode 100644 ide/main/src/content/tests/functional/verifyCommands.html delete mode 100644 ide/main/src/content/tests/functional/verifyCommands.js delete mode 100644 ide/main/src/content/tests/index.html delete mode 100644 ide/main/src/content/tests/unit/TestSuite.html delete mode 100644 ide/main/src/content/tests/unit/application-tests.html delete mode 100644 ide/main/src/content/tests/unit/editor-tests.html delete mode 100644 ide/main/src/content/tests/unit/format-tests.html delete mode 100644 ide/main/src/content/tests/unit/html-format-tests.html delete mode 100644 ide/main/src/content/tests/unit/html/TestEmptyTD.html delete mode 100644 ide/main/src/content/tests/unit/html/TestWaitInPopupWindow.html delete mode 100644 ide/main/src/content/tests/unit/html/XhtmlTestCase.xml delete mode 100644 ide/main/src/content/tests/unit/locatorBuilders-tests.html delete mode 100644 ide/main/src/content/tests/unit/locatorBuilders-xhtml-tests.xhtml delete mode 100644 ide/main/src/content/tests/unit/preferences-tests.html delete mode 100644 ide/main/src/content/tests/unit/recorder-tests.html delete mode 100644 ide/main/src/content/tests/unit/storedHistory-tests.html delete mode 100644 ide/main/src/content/tests/unit/test-api-doc.js delete mode 100644 ide/main/src/content/tests/unit/testCase-tests.html delete mode 100644 ide/main/src/content/tests/unit/testHelper.js delete mode 100644 ide/main/src/content/tests/unit/testSuite-tests-sampleSuite.html delete mode 100644 ide/main/src/content/tests/unit/testSuite-tests.html delete mode 100644 ide/main/src/content/tests/unit/testSuiteProgress-tests.html delete mode 100644 ide/main/src/content/tests/unit/tools-tests.html delete mode 100644 ide/main/src/content/tools.js delete mode 100644 ide/main/src/content/treeView.js delete mode 100644 ide/main/src/content/ui-view.html delete mode 100644 ide/main/src/content/utils/deferred.js delete mode 100644 ide/main/src/content/utils/dispatcher.js delete mode 100644 ide/main/src/content/utils/gist.js delete mode 100644 ide/main/src/content/utils/http.js delete mode 100644 ide/main/src/content/webdriver-backed-selenium.js delete mode 100644 ide/main/src/content/xhtml-entities.js delete mode 100644 ide/main/src/content/xul-utils.js delete mode 100644 ide/main/src/idl/SeleniumIDEGenericAutoCompleteSearch.idl delete mode 100644 ide/main/src/install.rdf delete mode 100644 ide/main/src/locale/en-US/options.dtd delete mode 100644 ide/main/src/locale/en-US/selenium-ide.dtd delete mode 100644 ide/main/src/locale/en-US/selenium-ide.properties delete mode 100644 ide/main/src/locale/fr-FR/options.dtd delete mode 100644 ide/main/src/locale/fr-FR/selenium-ide.dtd delete mode 100644 ide/main/src/locale/fr-FR/selenium-ide.properties delete mode 100644 ide/main/src/locale/ja-JP/options.dtd delete mode 100644 ide/main/src/locale/ja-JP/selenium-ide.dtd delete mode 100644 ide/main/src/locale/ja-JP/selenium-ide.properties delete mode 100644 ide/main/src/locale/pt-BR/options.dtd delete mode 100644 ide/main/src/locale/pt-BR/selenium-ide.dtd delete mode 100644 ide/main/src/locale/pt-BR/selenium-ide.properties delete mode 100644 ide/main/src/locale/sv-SE/options.dtd delete mode 100644 ide/main/src/locale/sv-SE/selenium-ide.dtd delete mode 100644 ide/main/src/locale/sv-SE/selenium-ide.properties delete mode 100644 ide/main/src/skin/classic/fa-chrome.png delete mode 100644 ide/main/src/skin/classic/fa-chrome_on.png delete mode 100644 ide/main/src/skin/classic/fa-firefox.png delete mode 100644 ide/main/src/skin/classic/fa-firefox_on.png delete mode 100644 ide/main/src/skin/classic/fa-globe.png delete mode 100644 ide/main/src/skin/classic/fa-globe_on.png delete mode 100644 ide/main/src/skin/classic/fa-internet-explorer.png delete mode 100644 ide/main/src/skin/classic/fa-internet-explorer_on.png delete mode 100644 ide/main/src/skin/classic/fa-safari.png delete mode 100644 ide/main/src/skin/classic/fa-safari_on.png delete mode 100644 ide/main/src/skin/classic/fa-times-circle-o.png delete mode 100644 ide/main/src/skin/classic/fa-times-circle-o_on.png delete mode 100644 ide/main/src/skin/classic/help-view.css delete mode 100644 ide/main/src/skin/classic/icons.png delete mode 100644 ide/main/src/skin/classic/icons_disabled.png delete mode 100644 ide/main/src/skin/classic/optionsDialog.css delete mode 100644 ide/main/src/skin/classic/platforms/mac/selenium-ide-platform.css delete mode 100644 ide/main/src/skin/classic/progress-background.png delete mode 100644 ide/main/src/skin/classic/progress-failure.png delete mode 100644 ide/main/src/skin/classic/progress-success.png delete mode 100644 ide/main/src/skin/classic/reload.png delete mode 100644 ide/main/src/skin/classic/reload_disabled.png delete mode 100644 ide/main/src/skin/classic/rollup-view.css delete mode 100644 ide/main/src/skin/classic/schedulerui.css delete mode 100644 ide/main/src/skin/classic/selenium-ide-16.png delete mode 100644 ide/main/src/skin/classic/selenium-ide-24.png delete mode 100644 ide/main/src/skin/classic/selenium-ide.css delete mode 100644 ide/main/src/skin/classic/slider-middle.png delete mode 100644 ide/main/src/skin/classic/slider-thumb.png delete mode 100644 ide/main/src/skin/classic/slider.png delete mode 100644 ide/main/src/skin/classic/spiral.png delete mode 100644 ide/main/src/skin/classic/spiral_disabled.png delete mode 100644 ide/main/src/skin/classic/toolbar.css delete mode 100644 ide/main/src/skin/classic/treeView-icons.png delete mode 100644 ide/main/src/skin/classic/ui-view.css delete mode 100644 ide/main/test/actions/type.html delete mode 100644 ide/main/test/checks/checked.html delete mode 100644 ide/main/test/checks/disabled.html delete mode 100644 ide/main/test/checks/text.html delete mode 100644 ide/main/test/checks/visibility.html delete mode 100644 ide/main/test/locators/css.html delete mode 100644 ide/main/test/locators/regexp.html delete mode 100644 ide/main/test/popups/alert.html delete mode 100644 ide/main/test/popups/confirm-accept.html delete mode 100644 ide/main/test/popups/confirm-cancel.html delete mode 100644 ide/main/test/popups/prompt.html delete mode 100644 ide/main/test/testsuite.html delete mode 100644 ide/main/test/testsuite.js delete mode 100644 ide/plugins/csharp-format/build.desc delete mode 100644 ide/plugins/csharp-format/src/chrome.manifest delete mode 100644 ide/plugins/csharp-format/src/chrome.manifest.production delete mode 100644 ide/plugins/csharp-format/src/content/formats/cs-rc.js delete mode 100644 ide/plugins/csharp-format/src/content/formats/cs-wd.js delete mode 100644 ide/plugins/csharp-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/csharp-format/src/install.rdf delete mode 100644 ide/plugins/groovy-format/build.desc delete mode 100644 ide/plugins/groovy-format/src/chrome.manifest delete mode 100644 ide/plugins/groovy-format/src/chrome.manifest.production delete mode 100644 ide/plugins/groovy-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/groovy-format/src/content/formats/groovy-rc.js delete mode 100644 ide/plugins/groovy-format/src/install.rdf delete mode 100644 ide/plugins/java-format/build.desc delete mode 100644 ide/plugins/java-format/src/chrome.manifest delete mode 100644 ide/plugins/java-format/src/chrome.manifest.production delete mode 100644 ide/plugins/java-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/java-format/src/content/formats/java-backed-junit4.js delete mode 100644 ide/plugins/java-format/src/content/formats/java-rc-junit4.js delete mode 100644 ide/plugins/java-format/src/content/formats/java-rc-testng.js delete mode 100644 ide/plugins/java-format/src/content/formats/java-rc.js delete mode 100644 ide/plugins/java-format/src/content/formats/webdriver-junit4.js delete mode 100644 ide/plugins/java-format/src/content/formats/webdriver-testng.js delete mode 100644 ide/plugins/java-format/src/install.rdf delete mode 100644 ide/plugins/perl-format/build.desc delete mode 100644 ide/plugins/perl-format/src/chrome.manifest delete mode 100644 ide/plugins/perl-format/src/chrome.manifest.production delete mode 100644 ide/plugins/perl-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/perl-format/src/content/formats/perl-rc.js delete mode 100644 ide/plugins/perl-format/src/install.rdf delete mode 100644 ide/plugins/php-format/build.desc delete mode 100644 ide/plugins/php-format/src/chrome.manifest delete mode 100644 ide/plugins/php-format/src/chrome.manifest.production delete mode 100644 ide/plugins/php-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/php-format/src/content/formats/php-base.js delete mode 100644 ide/plugins/php-format/src/content/formats/php-phpunit.js delete mode 100644 ide/plugins/php-format/src/content/formats/php-testingselenium.js delete mode 100644 ide/plugins/php-format/src/install.rdf delete mode 100644 ide/plugins/python-format/build.desc delete mode 100644 ide/plugins/python-format/src/chrome.manifest delete mode 100644 ide/plugins/python-format/src/chrome.manifest.production delete mode 100644 ide/plugins/python-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/python-format/src/content/formats/python2-rc.js delete mode 100644 ide/plugins/python-format/src/content/formats/python2-wd.js delete mode 100644 ide/plugins/python-format/src/install.rdf delete mode 100644 ide/plugins/ruby-format/build.desc delete mode 100644 ide/plugins/ruby-format/src/chrome.manifest delete mode 100644 ide/plugins/ruby-format/src/chrome.manifest.production delete mode 100644 ide/plugins/ruby-format/src/content/formats/format-loader.xul delete mode 100644 ide/plugins/ruby-format/src/content/formats/ruby-rc-rspec.js delete mode 100644 ide/plugins/ruby-format/src/content/formats/ruby-rc.js delete mode 100644 ide/plugins/ruby-format/src/content/formats/ruby-wd-rspec.js delete mode 100644 ide/plugins/ruby-format/src/content/formats/ruby-wd.js delete mode 100644 ide/plugins/ruby-format/src/install.rdf delete mode 100644 rake-tasks/se-ide.rb diff --git a/.idea/modules.xml b/.idea/modules.xml index d570a140d5531..f383b61a1530d 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -4,7 +4,6 @@ - diff --git a/Rakefile b/Rakefile index 4fd872d495436..151089d178095 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,6 @@ require 'rake-tasks/task-gen' require 'rake-tasks/checks' require 'rake-tasks/c' require 'rake-tasks/selenium' -require 'rake-tasks/se-ide' require 'rake-tasks/ie_code_generator' require 'rake-tasks/ci' require 'rake-tasks/copyright' @@ -52,8 +51,6 @@ def version "#{release_version}.5" end -ide_version = "2.9.1" - # The build system used by webdriver is layered on top of rake, and we call it # "crazy fun" for no readily apparent reason. @@ -89,7 +86,7 @@ VisualStudioMappings.new.add_all(crazy_fun) # need to fall back to prebuilt binaries. The prebuilt binaries are stored in # a directory structure identical to that used in the "build" folder, but # rooted at one of the following locations: -["cpp/prebuilt", "ide/main/prebuilt", "javascript/firefox-driver/prebuilt"].each do |pre| +["cpp/prebuilt", "javascript/firefox-driver/prebuilt"].each do |pre| crazy_fun.prebuilt_roots << pre end @@ -98,7 +95,6 @@ end # from rake. crazy_fun.create_tasks(Dir["common/**/build.desc"]) crazy_fun.create_tasks(Dir["cpp/**/build.desc"]) -crazy_fun.create_tasks(Dir["ide/**/build.desc"]) crazy_fun.create_tasks(Dir["javascript/**/build.desc"]) crazy_fun.create_tasks(Dir["py/**/build.desc"]) crazy_fun.create_tasks(Dir["rake-tasks/**/build.desc"]) @@ -174,11 +170,6 @@ task :support => [ desc 'Build the standalone server' task 'selenium-server-standalone' => '//java/server/src/org/openqa/grid/selenium:selenium' -task :ide => [ "//ide:selenium-ide-multi" ] -task :ide_proxy_setup => [ "//javascript/selenium-atoms", "se_ide:setup_proxy" ] -task :ide_proxy_remove => [ "se_ide:remove_proxy" ] -task :ide_bamboo => ["se_ide:assemble_ide_in_bamboo"] - task :test_javascript => [ 'calcdeps', '//javascript/atoms:atoms-chrome:run', @@ -524,11 +515,6 @@ end desc 'Build the selenium client jars' task 'selenium-java' => '//java/client/src/org/openqa/selenium:selenium' -desc 'Build and package Selenium IDE' -task :release_ide => [:ide] do - cp 'build/ide/selenium-ide.xpi', "build/ide/selenium-ide-#{ide_version}.xpi" -end - namespace :node do task :atoms => [ "//javascript/atoms/fragments:is-displayed", diff --git a/ide/build.desc b/ide/build.desc deleted file mode 100644 index cebfe92b1d68a..0000000000000 --- a/ide/build.desc +++ /dev/null @@ -1,41 +0,0 @@ -mozilla_multi_extension( - name = "selenium-ide-multi", - xpis = [ - "//ide/main:selenium-ide", - "//ide/plugins/csharp-format:csharp-format", - "//ide/plugins/java-format:java-format", - "//ide/plugins/python-format:python-format", - "//ide/plugins/ruby-format:ruby-format" - ], - resources = [ - { ":ide-multixpi-editor" : "selenium-ide.xpi" }, - { ":ide-csharp-format" : "csharp-format.xpi" }, - { ":ide-java-format" : "java-format.xpi" }, - { ":ide-python-format" : "python-format.xpi" }, - { ":ide-ruby-format" : "ruby-format.xpi" }, - ], - install = "install.rdf" -) - -# editor -rake_task(name = "ide-multixpi-editor", - task_name = "ide-multixpi-editor", - out = "build/ide/main/selenium-ide.xpi") - -# default language plugins -rake_task(name = "ide-csharp-format", - task_name = "ide-csharp-format", - out = "build/ide/plugins/csharp-format/csharp-format.xpi") - -rake_task(name = "ide-java-format", - task_name = "ide-java-format", - out = "build/ide/plugins/java-format/java-format.xpi") - -rake_task(name = "ide-python-format", - task_name = "ide-python-format", - out = "build/ide/plugins/python-format/python-format.xpi") - -rake_task(name = "ide-ruby-format", - task_name = "ide-ruby-format", - out = "build/ide/plugins/ruby-format/ruby-format.xpi") - diff --git a/ide/ide.iml b/ide/ide.iml deleted file mode 100644 index 2221c53429cb4..0000000000000 --- a/ide/ide.iml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/install.rdf b/ide/install.rdf deleted file mode 100644 index 4f0a7bb452c85..0000000000000 --- a/ide/install.rdf +++ /dev/null @@ -1,24 +0,0 @@ - - - - {a6fd85ed-e919-4a43-a5af-8da18bda539f} - Selenium IDE - 2.9.0 - Adam Goucher - Samit Badle - Dave Hunt - Selenium IDE - 32 - http://seleniumhq.org/projects/ide - https://addons.seleniumhq.org/ide-multi/update.rdf - - - - {ec8030f7-c20a-464f-9b0e-13a3a9e97384} - 3.6.* - 34.* - - - - diff --git a/ide/main/build.desc b/ide/main/build.desc deleted file mode 100644 index aa29bef208264..0000000000000 --- a/ide/main/build.desc +++ /dev/null @@ -1,22 +0,0 @@ -mozilla_xpt(name = "ide-auto-complete", - srcs = [ "src/idl/SeleniumIDEGenericAutoCompleteSearch.idl" ]) - -# In the ideal world, we'd use "core" directly, but we need -# to also change the name to "selenium". The nasty hack works -# around this -mozilla_extension(name = "selenium-ide", - components = [ - "src/components/SeleniumIDEGenericAutoCompleteSearch.js", - ":ide-auto-complete" - ], - resources = [ - { "src/content" : "chrome"}, - { "src/skin" : "chrome" }, - { "src/locale" : "chrome" }, - { "../../javascript/selenium-core" : "chrome/content"}, - { "src/chrome/icons" : "chrome" }, - { "//javascript/selenium-atoms" : "chrome/content/selenium-core/scripts/atoms.js"}, - { "//third_party/js/sizzle:js" : "chrome/content/selenium-core/lib/sizzle.js" } - ], - chrome = "src/chrome.manifest.production", - install = "src/install.rdf") diff --git a/ide/main/prebuilt/main/SeleniumIDEGenericAutoCompleteSearch.xpt b/ide/main/prebuilt/main/SeleniumIDEGenericAutoCompleteSearch.xpt deleted file mode 100644 index f736cd871f101ef81e6c0f0b180770a48012ca79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 353 zcmazDaQ64*3aKne^~p@)<&t7#VqjrlU`%9SU{C_$i48yk9WbH`An}D@Z1?pm1ZS^t z5?p8S>eV?#i*-P86{wugz1|)12k-f|PuW%B(#b#ZA5eTZOkZBHXK-mjL4Hw5v13tD zVkHBTKyXP>W?nj2BsC{BFS9h))5X<2H7~U&Gug4UB;Pqdw;(6ABsDlSu_!r%0q7HE zkg?574U-r^n2~`E#Gl9v<0HgYGlIlG@(snQCC-U?DVZsWC8@;>D7^5@k_@0Fxv6<2 R#SFdx0v(FQ5dgqFTaN$$ diff --git a/ide/main/src/chrome.manifest b/ide/main/src/chrome.manifest deleted file mode 100644 index 782a66df9c545..0000000000000 --- a/ide/main/src/chrome.manifest +++ /dev/null @@ -1,21 +0,0 @@ -# chrome.manifest for development -content selenium-ide content/ -content selenium-ide-platform content/ platform - -overlay chrome://browser/content/browser.xul chrome://selenium-ide/content/selenium-ide-overlay.xul - -locale selenium-ide en-US locale/en-US/ -locale selenium-ide fr-FR locale/fr-FR/ -locale selenium-ide ja-JP locale/ja-JP/ -locale selenium-ide pt-BR locale/pt-BR/ -locale selenium-ide sv-SE locale/sv-SE/ - -skin selenium-ide classic/1.0 skin/classic/ -skin selenium-ide-platform classic/1.0 skin/classic/platforms/ appversion>=3.0 - -# Samit: Enh: Added style for the icon on firefox toolbar -style chrome://global/content/customizeToolbar.xul chrome://selenium-ide/skin/toolbar.css - -interfaces components/SeleniumIDEGenericAutoCompleteSearch.xpt -component {E5226A0D-4698-4E15-9D6D-86771AE172C9} components/SeleniumIDEGenericAutoCompleteSearch.js -contract @mozilla.org/autocomplete/search;1?name=selenium-ide-generic {E5226A0D-4698-4E15-9D6D-86771AE172C9} \ No newline at end of file diff --git a/ide/main/src/chrome.manifest.production b/ide/main/src/chrome.manifest.production deleted file mode 100644 index 809f07a63f78e..0000000000000 --- a/ide/main/src/chrome.manifest.production +++ /dev/null @@ -1,21 +0,0 @@ -# chrome.manifest for development -content selenium-ide chrome/content/ -content selenium-ide-platform chrome/content/ platform - -overlay chrome://browser/content/browser.xul chrome://selenium-ide/content/selenium-ide-overlay.xul - -locale selenium-ide en-US chrome/locale/en-US/ -locale selenium-ide fr-FR chrome/locale/fr-FR/ -locale selenium-ide ja-JP chrome/locale/ja-JP/ -locale selenium-ide pt-BR chrome/locale/pt-BR/ -locale selenium-ide sv-SE chrome/locale/sv-SE/ - -skin selenium-ide classic/1.0 chrome/skin/classic/ -skin selenium-ide-platform classic/1.0 chrome/skin/classic/platforms/ appversion>=3.0 - -# Samit: Enh: Added style for the icon on firefox toolbar -style chrome://global/content/customizeToolbar.xul chrome://selenium-ide/skin/toolbar.css - -interfaces components/SeleniumIDEGenericAutoCompleteSearch.xpt -component {E5226A0D-4698-4E15-9D6D-86771AE172C9} components/SeleniumIDEGenericAutoCompleteSearch.js -contract @mozilla.org/autocomplete/search;1?name=selenium-ide-generic {E5226A0D-4698-4E15-9D6D-86771AE172C9} diff --git a/ide/main/src/chrome/icons/default/selenium-ide.ico b/ide/main/src/chrome/icons/default/selenium-ide.ico deleted file mode 100644 index 10e1d2e245cfa56fb95e2d32ffa82e2660155306..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 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 - - - - - - diff --git a/ide/main/src/content/LogFrame.html b/ide/main/src/content/LogFrame.html deleted file mode 100644 index 0bc46891dfe5b..0000000000000 --- a/ide/main/src/content/LogFrame.html +++ /dev/null @@ -1,10 +0,0 @@ - - - Selenium Log Console - - - - -
    - - diff --git a/ide/main/src/content/api.js b/ide/main/src/content/api.js deleted file mode 100644 index 988568e8b3365..0000000000000 --- a/ide/main/src/content/api.js +++ /dev/null @@ -1,150 +0,0 @@ -function API() { - this.version = 0.7; - this.preferences = SeleniumIDE.Preferences; - this.id = null; - this.code = { - ideExtensions: [], - userExtensions: [], - formatters: [] - }; -} - -/** - * Registers a Selenium IDE plugin so that it can be managed by Selenium IDE - * Calling this is mandatory or the plugin will not be loaded by Selenium IDE - * - * @param id - this is the plugin id (not the name) that you specify in install.rdf of your plugin - */ -API.prototype.addPlugin = function (id) { - this.id = id; - this._save(); -}; - -/** - * Request Selenium IDE to load the IDE extension provided by your plugin through its chrome url of - * the IDE extensions - * Don't forget to call the addPlugin function once for your plugin - * - * @param url - url to your bundled extension in the form of chrome:// - */ -API.prototype.addPluginProvidedIdeExtension = function (url) { - this.code.ideExtensions.push(url); - this._save(); -}; - -/** - * Request Selenium IDE to load the user extension provided by your plugin through its chrome url of - * the user extensions. - * Don't forget to call the addPlugin function once for your plugin! - * - * @param js_url - url to your bundled extension in the form of chrome:// - * @param xml_url - url to your bundled companion xml in the form of chrome:// - * @param canHandleWebdriverPlayback - true/false if the extension can handle Webdriver playback. Default false. - */ -API.prototype.addPluginProvidedUserExtension = function (js_url, xml_url, canHandleWebdriverPlayback) { - this.code.userExtensions.push(js_url + ';' + xml_url + ';' + (canHandleWebdriverPlayback ? "1" : "0")); - this._save(); -}; - -/** - * Request Selenium IDE to load the formatter provided by your plugin through its chrome url of - * the formatter. - * Don't forget to call the addPlugin function once for your plugin! - * - * @param id - an id for your formatter, used internally, a combination of numbers, letters, underscores and atleast one letter - * @param name - the name shown to the users. It should have three parts like "language / test-framework / WebDriver or Remote Control" - * @param url - url to your bundled formatter in the form of chrome:// - * @param type - optional, can be "webdriver" or "remotecontrol". Specifying the type - * automatically provides the given formatter type so it does not have to be - * loaded with subScriptLoader.loadSubScript() in your formatter. - */ -API.prototype.addPluginProvidedFormatter = function (id, name, url, type) { - this.code.formatters.push(id + ";" + name + ";" + url + ";" + type); - this._save(); -}; - - -//-------------------------------------------------------------------------- -// End of Selenium IDE Public API. -// The following provides internal and cleanup stuff for the plugin system -//-------------------------------------------------------------------------- - -/** - * Internal function. Do not use. - * - * @private - */ -API.prototype._save = function () { - if (this.id) { //Save only if ID has been set - var found = false; - var id = this.id; - var plugins = JSON.parse(this.preferences.getString('pluginsData', '[]')); - for (var i = 0; i < plugins.length; i++) { - if (plugins[i].id == id) { - plugins[i].installed = true; - plugins[i].code = this.code; - found = true; - break; - } - } - if (!found) { - plugins.push({ - id: this.id, - installed: true, - code: this.code, - options: { - disabled: false, - autoDisabled: false - } - }); - } - this.preferences.save({pluginsData: JSON.stringify(plugins)}, 'pluginsData'); - } -}; - - -// this works because plugins re-register every time the browser restarts -function initializeSeIDEAPIObserver() { - seIDEAPIObserver.register(); -} - -var seIDEAPIObserver = { - _uninstall: false, - observe: function (subject, topic, data) { - if (topic == "quit-application-granted") { - var branch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.selenium-ide."); - branch.clearUserPref("pluginProvidedIDEExtensions"); - branch.clearUserPref("pluginProvidedUserExtensions"); - branch.clearUserPref("pluginProvidedFormatters"); - branch.clearUserPref("plugins"); - //Clear the plugin code and leave the options intact as we want to honour it on next load - if (branch.prefHasUserValue('pluginsData')) { - var plugins = JSON.parse(branch.getCharPref('pluginsData')); - for (var i = 0; i < plugins.length; i++) { - plugins[i].installed = false; - plugins[i].code = { - ideExtensions: [], - userExtensions: [], - formatters: [] - }; - } - branch.setCharPref('pluginsData', JSON.stringify(plugins)); - } - this.unregister(); - } - }, - register: function () { - var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); - observerService.addObserver(this, "quit-application-granted", false); - }, - unregister: function () { - var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); - observerService.removeObserver(this, "quit-application-granted"); - } -}; - -//Make the cleanup run one time for each window instead of once for every plugin for every window -if (!window.registeredSEIDEAPIObserver) { - window.addEventListener("load", initializeSeIDEAPIObserver, false); - window.registeredSEIDEAPIObserver = true; -} diff --git a/ide/main/src/content/application.js b/ide/main/src/content/application.js deleted file mode 100644 index 3d59f9ba628de..0000000000000 --- a/ide/main/src/content/application.js +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// shortcut -this.Preferences = SeleniumIDE.Preferences; - -/* - * A model that represents the state of the application. - */ -function Application() { - this.baseURL = ""; - this.options = Preferences.load(); - this.pluginManager = new PluginManager(this.options); - this.baseURLHistory = new StoredHistory("baseURLHistory", 20); - this.testCase = null; - this.testSuite = null; - this.formats = null; - this.currentFormat = null; - this.clipboardFormat = null; - this.recentTestSuites = new StoredHistory("recentTestSuites"); - this.recentTestCases = new StoredHistory("recentTestCases"); -} - -Application.prototype = { - saveState: function() { - if (this.options.rememberBaseURL == 'true'){ - Preferences.setAndSave(this.options, 'baseURL', this.baseURL); - } - }, - - getBaseURL: function() { - //if there is a testCase with a base URL return it - //if not, return the value of the baseURL value - return this.testCase && this.testCase.baseURL ? - this.testCase.baseURL : this.baseURL; - }, - - setBaseURL: function(baseURL) { - this.baseURL = baseURL; - this.baseURLHistory.add(baseURL); - if (this.testCase) { - this.testCase.setBaseURL(baseURL); - } - this.notify("baseURLChanged"); - }, - - getBaseURLHistory: function() { - return this.baseURLHistory.list(); - }, - - initOptions: function() { - if (this.options.rememberBaseURL == 'true' && this.options.baseURL != null) { - this.setBaseURL(this.options.baseURL); - } - this.setOptions(this.options); // to notify optionsChanged to views - }, - - getBooleanOption: function(option) { - if (this.options[option]){ - return this.options[option].toLowerCase() == 'true'; - } - return false; - }, - - getOptions: function(options) { - return this.options; - }, - - setOptions: function(options) { - this.options = options; - this.pluginManager.load(options); - this.formats = new FormatCollection(options, this.pluginManager); - this.currentFormat = this.formats.selectFormat(options.selectedFormat || null); - this.clipboardFormat = this.formats.selectFormat(options.clipboardFormat || null); - this.notify("optionsChanged", options); - }, - - userSetCurrentFormat: function(format) { - //Samit: TODO: this whole concept of format changing needs to be thought through again - //if the testcase is manually changed - var edited = this.testCase.edited; - //if the format is reversible (implements the "parse" method) - //or if the testcase isn't changed manually by user: all be fine - //if not, the format isn't changed - - if (this.currentFormat != format) { - //if (!(this.currentFormat.isReversible && this.currentFormat.isReversible())){ - //prompt that user will lose changes - if (this.getBooleanOption('disableFormatChangeMsg') || confirm(Editor.getString('format.switch.warn'))){ - //user wants to take the risk - //change the current format - this.setCurrentFormat(format); - } - //} - } - }, - - setCurrentFormat: function(format) { - //sync the testcase with the data view - this.notify("currentFormatChanging"); - this.currentFormat = format; - Preferences.setAndSave(this.options, 'selectedFormat', format.id); - this.notify("currentFormatChanged", format); - }, - - getCurrentFormat: function() { - return this.currentFormat; - }, - - isPlayable: function() { - return this.getCurrentFormat().getFormatter().playable; - }, - - setClipboardFormat: function(format) { - this.clipboardFormat = format; - Preferences.setAndSave(this.options, 'clipboardFormat', format.id); - this.notify("clipboardFormatChanged", format); - }, - - getClipboardFormat: function() { - return this.clipboardFormat; - }, - - getFormats: function() { - return this.formats; - }, - - newTestSuite: function() { - this.log.debug("newTestSuite"); - var testSuite = new TestSuite(); - var testCase = new TestCase(); - testSuite.addTestCaseFromContent(testCase); - this.setTestSuite(testSuite); - this.setTestCase(testCase); - Preferences.setAndSave(this.options, 'lastSavedTestSuite', ''); - Preferences.setAndSave(this.options, 'lastSavedTestCase', ''); - }, - - setTestSuite: function(testSuite) { - if (this.testSuite) { - this.notify("testSuiteUnloaded", this.testSuite); - } - this.testSuite = testSuite; - this.notify("testSuiteChanged", testSuite); - }, - - getTestSuite: function() { - return this.testSuite; - }, - - addRecentTestSuite: function(testSuite) { - this.recentTestSuites.add(testSuite.file.path); - Preferences.setAndSave(this.options, 'lastSavedTestSuite', testSuite.file.path); - Preferences.setAndSave(this.options, 'lastSavedTestCase', ''); - }, - - addRecentTestCase: function(testCase, isNewSuite) { - this.recentTestCases.add(testCase.file.path); - if (isNewSuite) { - Preferences.setAndSave(this.options, 'lastSavedTestSuite', ''); - } - if (this.options.lastSavedTestSuite.length === 0) { - Preferences.setAndSave(this.options, 'lastSavedTestCase', testCase.file.path); - } - }, - - reopenLastTestCaseOrSuite: function() { - try { - if (FileUtils.fileExists(this.options.lastSavedTestSuite)) { - this.loadTestSuite(this.options.lastSavedTestSuite); - return true; - } else if (FileUtils.fileExists(this.options.lastSavedTestCase)) { - this.loadTestCaseWithNewSuite(this.options.lastSavedTestCase); - return true; - } - } catch (e) { - //error occurred - alert("Error reopening test suite / case " + e); - } - return false; - }, - - setTestCase: function(testCase) { - if (this.testCase) { - if (testCase == this.testCase) return; - this.notify("testCaseUnloaded", this.testCase); - } - this.testCase = testCase; - if (testCase.baseURL) { - this.setBaseURL(testCase.baseURL); - } else { - testCase.setBaseURL(this.baseURL); - } - this.notify("testCaseChanged", this.testCase); - }, - - getTestCase: function() { - return this.testCase; - }, - - newTestCase: function() { - var testCase = new TestCase(this.testSuite.generateNewTestCaseTitle()); - this.testSuite.addTestCaseFromContent(testCase); - this.setTestCase(testCase); - }, - - /** - * Adds a testcase to the current suite - */ - addTestCase: function(path) { - if (path) { - var testCase = this._loadTestCase(FileUtils.getFile(path)); - if (testCase) { - this.testSuite.addTestCaseFromContent(testCase); - this.setTestCase(testCase); - } - }else { - //Samit: Enh: Allow multiple test cases to be added in one operation - var nsIFilePicker = Components.interfaces.nsIFilePicker; - var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); - fp.init(window, "Select one or more test cases to add", nsIFilePicker.modeOpenMultiple); - fp.appendFilters(nsIFilePicker.filterAll); - if (fp.show() == nsIFilePicker.returnOK) { - var files = fp.files; - while (files.hasMoreElements()) { - try { - testCase = this._loadTestCase(files.getNext().QueryInterface(Components.interfaces.nsILocalFile)); - if (testCase) { - this.testSuite.addTestCaseFromContent(testCase); - this.setTestCase(testCase); - } - }catch(error) { - this.log.error("AddTestCase: "+error); - } - } - } - } - }, - - loadTestCaseWithNewSuite: function(path) { - var file = null; - if (path) { - file = FileUtils.getFile(path); - } else { - //Samit: We are going to need the file to retry it as a test suite - file = showFilePicker(window, "Select a File", - Components.interfaces.nsIFilePicker.modeOpen, - Format.TEST_CASE_DIRECTORY_PREF, - function(fp) { - return fp.file; - }); - } - if (file) { - try { - var testCase = this._loadTestCase(file, null, true); - if (testCase) { - this.setTestCaseWithNewSuite(testCase); - } - } catch(errorCase) { - //Samit: Enh: Try to handle the common error of trying to open a test suite - try { - this.loadTestSuite(file.path, true); - } catch(e) { - //Since this failed, show them the original testcase load error - alert("error loading test case: " + errorCase); - } - } - } - }, - - setTestCaseWithNewSuite: function(testCase) { - var testSuite = new TestSuite(); - testSuite.addTestCaseFromContent(testCase); - this.setTestSuite(testSuite); - this.setTestCase(testCase); - this.addRecentTestCase(testCase, true); - }, - - // show specified TestSuite.TestCase object. - showTestCaseFromSuite: function(testCase) { - if (testCase.content) { - this.setTestCase(testCase.content); - } else { - try { - var content = this._loadTestCase(testCase.getFile(), function(test) { - test.title = testCase.getTitle(); // load title from suite - testCase.content = test; - }, true); - if (content) { - this.setTestCase(content); - } - } catch(error) { - if (error.name && error.name == "NS_ERROR_FILE_NOT_FOUND") { - alert("The test case does not exist. You should probably remove it from the suite. The path specified is " + testCase.getFile().path ); - }else { - alert("error loading test case: " + error); - } - } - } - }, - - _loadTestCase: function(file, testCaseHandler, noErrorAlert) { - this.log.debug("loadTestCase"); - try { - var testCase = null; - if (file) { - testCase = this.getCurrentFormat().loadFile(file, false); - } else { - testCase = this.getCurrentFormat().load(); - } - if (testCase != null) { - if (testCaseHandler) testCaseHandler(testCase); -// this.setTestCase(testCase); -// this.addRecentTestCase(testCase); - return testCase; - } - return false; - } catch (error) { - if (noErrorAlert) { //Samit: Enh: allow error messages to be supressed, so caller can make intelligent ux decisions - throw error; - } - alert("error loading test case: " + error); - return false; - } - }, - - loadTestSuite: function(path, noErrorAlert) { - this.log.debug("loadTestSuite"); - try { - var testSuite = null; - if (path) { - testSuite = TestSuite.loadFile(FileUtils.getFile(path)); - } else { - testSuite = TestSuite.load(); - } - if (testSuite) { - this.setTestSuite(testSuite); - this.addRecentTestSuite(testSuite); - //Samit: Fix: Switch to the first testcase in the newly loaded suite - if (testSuite.tests.length > 0) { - var testCase = testSuite.tests[0]; - if (testCase) this.showTestCaseFromSuite(testCase); - } - } - } catch (error) { - if (noErrorAlert) { //Samit: Enh: allow error messages to be supressed, so caller can make intelligent ux decisions - throw error; - } - alert("error loading test suite: " + error); - } - }, - - saveTestSuite: function(suppressTestCasePrompt) { - //Samit: Enh: Added suppressTestCasePrompt to allow saving test suite and test cases without a yes/no prompt for each test case - return this._saveTestSuiteAs(function(testSuite) { - return testSuite.save(false); - }, suppressTestCasePrompt); - }, - - saveNewTestSuite: function(suppressTestCasePrompt) { - //Samit: Enh: Added suppressTestCasePrompt to allow saving test suite and test cases without a yes/no prompt for each test case - return this._saveTestSuiteAs(function(testSuite) { - return testSuite.save(true); - }, suppressTestCasePrompt); - }, - - _saveTestSuiteAs: function(handler, suppressTestCasePrompt) { - this.log.debug("saveTestSuite"); - var cancelled = false; - this.getTestSuite().tests.forEach(function(test) { - if (cancelled) return; - if (test.content && (test.content.modified || !test.filename)) { - //Samit: Enh: Added suppressTestCasePrompt to allow saving test suite and test cases without a yes/no prompt for each test case - if (suppressTestCasePrompt || confirm("The test case " + test.getTitle() + " is modified. Do you want to save this test case?")) { - if (!this.getCurrentFormat().save(test.content)) { - cancelled = true; - } - } else { - cancelled = true; - } - } - }, this); - if (!cancelled) { - if (handler(this.getTestSuite())) { - this.addRecentTestSuite(this.getTestSuite()); - return true; - } - } - return false; - }, - - saveTestCase: function() { - var result = this.getCurrentFormat().save(this.getTestCase()); - if (result) { - this.addRecentTestCase(this.getTestCase()); - } - return result; - }, - - saveNewTestCase: function() { - var result = this.getCurrentFormat().saveAsNew(this.getTestCase()); - if (result) { - this.addRecentTestCase(this.getTestCase()); - } - } -}; - -Application.prototype.log = Application.log = new Log("Application"); -observable(Application); diff --git a/ide/main/src/content/browser/mozilla/prompt-service.js b/ide/main/src/content/browser/mozilla/prompt-service.js deleted file mode 100644 index 72aa4cbc225fd..0000000000000 --- a/ide/main/src/content/browser/mozilla/prompt-service.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - Encapsulate the low level calls into a service that is functionally useful and avoids use of cryptic numbers - */ -var PromptService = (function() { - function PromptService() { - } - - PromptService.prototype.svc = function() { - if (!this._svc) { - this._svc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); - - this.saveFlags = this._svc.BUTTON_TITLE_SAVE * this._svc.BUTTON_POS_0 + - this._svc.BUTTON_TITLE_CANCEL * this._svc.BUTTON_POS_1 + - this._svc.BUTTON_TITLE_DONT_SAVE * this._svc.BUTTON_POS_2; - - this.yesNoFlags = this._svc.BUTTON_TITLE_YES * this._svc.BUTTON_POS_0 + - this._svc.BUTTON_TITLE_NO * this._svc.BUTTON_POS_1; - - this.yesNoCancelFlags = this._svc.BUTTON_TITLE_YES * this._svc.BUTTON_POS_0 + - this._svc.BUTTON_TITLE_CANCEL * this._svc.BUTTON_POS_1 + - this._svc.BUTTON_TITLE_NO * this._svc.BUTTON_POS_2; - } - return this._svc; - }; - - PromptService.prototype.save = function(prompt, title) { - title = title || "Save?"; - var btn = this.svc().confirmEx(window, title, prompt, this.saveFlags, null, null, null, null, {}); - return { - save: btn == 0, - cancel: btn == 1, - dontSave: btn == 2 - }; - }; - - PromptService.prototype.yesNo = function(prompt, title) { - var btn = this.svc().confirmEx(window, title, prompt, this.yesNoFlags, null, null, null, null, {}); - return { - yes: btn == 0, - no: btn == 1 - }; - }; - - PromptService.prototype.yesNoCancel = function(prompt, title) { - var btn = this.svc().confirmEx(window, title, prompt, this.yesNoCancelFlags, null, null, null, null, {}); - return { - yes: btn == 0, - no: btn == 2, - cancel: btn == 1 - }; - }; - - return new PromptService(); -})(); diff --git a/ide/main/src/content/commandBuilders.js b/ide/main/src/content/commandBuilders.js deleted file mode 100644 index 32d30dbf4d652..0000000000000 --- a/ide/main/src/content/commandBuilders.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2006 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var CommandBuilders = {}; - -CommandBuilders.builders = []; - -//Add new type of command to the context menu (right-click menu) in Selenium IDE -CommandBuilders.add = function(commandType, func, executeFunc) { //Samit: Enh: added support for Execute callback functions for util command builders - if (commandType != 'util') { - this.builders.push({builder: func, commandType: commandType}); - }else { - this.builders.push({builder: func, commandType: commandType, execute: executeFunc}); - } -} - -CommandBuilders.getRecorder = function(window) { - return Recorder.get(window); -} - -CommandBuilders.callBuilder = function(builder, window) { - try { - var command = builder.builder.call(this, window); - if (command) { - ['name', 'target', 'value'].forEach(function(name) { - if (command[name] == null) command[name] = ''; - }); - command.window = window; - } - return command; - }catch (error) { - //TODO: Improve error handling by notifying a plugin crash analysis tool? - //TODO: At least logging a plugin crash message - } -} - -//Samit: Enh: Call the Execute callback function for the util command builders and return the commands array -CommandBuilders.callBuilderExecute = function(builder, utilCommand) { - if (builder.commandType == 'util') { - try { - var commands = builder.execute.call(this, utilCommand); - if (commands) { - commands.forEach(function(command) { - ['name', 'target', 'value'].forEach(function(name) { - if (command[name] == null) command[name] = ''; - }); - }); - } - return commands; - }catch (error) { - //TODO: Improve error handling by notifying a plugin crash analysis tool? - //TODO: At least logging a plugin crash message - } - } -} - -/* - * add builders - */ - -CommandBuilders.add('action', function(window) { - var path = window.location.href; - var base = ''; - var r = /^(\w+:\/\/[\w\.-]+(:\d+)?)\/.*/.exec(path); - if (r) { - path = path.substr(r[1].length); - base = r[1] + '/'; - } - return { - command: "open", - target: path - }; - }); - -//CommandBuilders.add('accessor', function(window) { -// var result = { accessor: "textPresent", booleanAccessor: true }; -// var selection = String(window.getSelection()); -// if (selection) { -// result.target = selection; -// } else { -// var element = this.getRecorder(window).clickedElement; -// if (element) { -// result.target = exactMatchPattern(getText(element)); -// } else { -// result.disabled = true; -// } -// } -// return result; -// }); - -CommandBuilders.add('accessor', function(window) { - var result = { accessor: "title" }; - if (window.document) { - result.target = exactMatchPattern(window.document.title); - } else { - result.disabled = true; - } - return result; - }); - -CommandBuilders.add('accessor', function(window) { - var result = { accessor: "value" }; - var element = this.getRecorder(window).clickedElement; - if (element && element.hasAttribute && element.tagName && - ('input' == element.tagName.toLowerCase() || - 'textarea' == element.tagName.toLowerCase() || - (element.value && (element.value instanceof String)))) { - result.target = this.getRecorder(window).clickedElementLocators; - var type = element.getAttribute("type"); - if ('input' == element.tagName.toLowerCase() && - (type == 'checkbox' || type == 'radio')) { - result.value = element.checked ? 'on' : 'off'; - } else { - result.value = exactMatchPattern(element.value); - } - } else { - result.disabled = true; - } - return result; - }); - -CommandBuilders.add('accessor', function(window) { - var result = { accessor: "text" }; - var element = this.getRecorder(window).clickedElement; - if (element) { - result.target = this.getRecorder(window).clickedElementLocators; - result.value = exactMatchPattern(getText(element)); - } else { - result.disabled = true; - } - return result; - }); - - -CommandBuilders.add('accessor', function(window) { - var element = this.getRecorder(window).clickedElement; - var result = { accessor: "table", disabled: true }; - if (!element) return result; - while (true) { - var tagName = element.tagName.toLowerCase(); - if (tagName == 'td' || tagName == 'th') { - break; - } - if (element.parentNode && element.parentNode.tagName) { - element = element.parentNode; - } else { - return result; - } - } - var parentTable = null; - var temp = element.parentNode; - while (temp != null) { - if (temp.tagName.toLowerCase() == 'table') { - parentTable = temp; - break; - } - temp = temp.parentNode; - } - if (parentTable) { - var locator = this.getRecorder(window).findLocator(parentTable); - if (locator) { - result.target = locator + '.' + element.parentNode.rowIndex + '.' + element.cellIndex; - result.value = exactMatchPattern(getText(element)); - result.disabled = false; - } - } - return result; - }); - -CommandBuilders.add('accessor', function(window) { - var result = { accessor: "elementPresent", booleanAccessor: true }; - var element = this.getRecorder(window).clickedElement; - if (element) { - result.target = this.getRecorder(window).clickedElementLocators; - } else { - result.disabled = true; - } - return result; - }); diff --git a/ide/main/src/content/contents.rdf b/ide/main/src/content/contents.rdf deleted file mode 100644 index 611c0934f756a..0000000000000 --- a/ide/main/src/content/contents.rdf +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - chrome://selenium-ide/content/selenium-ide-overlay.xul - - - diff --git a/ide/main/src/content/debugger.js b/ide/main/src/content/debugger.js deleted file mode 100644 index bce13c2989b82..0000000000000 --- a/ide/main/src/content/debugger.js +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function Debugger(editor) { - this.log = new Log("Debugger"); - this.editor = editor; - this.pauseTimeout = 3000; - var self = this; - - this.init = function () { - if (this.runner != null) { - // already initialized - return; - } - - this.log.debug("init"); - this.editor.health.addEvent('debugger', 'initializing'); - - this.setState(Debugger.STOPPED); - - this.runner = new Object(); - this.runner.editor = this.editor; - var executeUsingWebDriver = this.editor.app.getBooleanOption('executeUsingWebDriver'); - this.runner.executeUsingWebDriver = executeUsingWebDriver; - this.runner.setState = function (state) { - self.setState(state); - }; - this.editor.app.addObserver({ - testCaseChanged:function (testCase) { - self.runner.testCase = testCase; - } - }); - this.runner.testCase = this.editor.getTestCase(); - this.runner.updateStats = function (command) { - editor.health.increaseCounter('commands', command); - }; - - const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); - //subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/selenium-logging.js', this.runner); - - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js', this.runner); - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-api-override.js', this.runner); - if (executeUsingWebDriver) { - subScriptLoader.loadSubScript('chrome://selenium-ide/content/remote-selenium-commandhandlers.js', this.runner); - } else { - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-commandhandlers.js', this.runner); - } - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-executionloop.js', this.runner); - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js', this.runner); - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-testrunner-original.js', this.runner); - - if (this.editor.getOptions().userExtensionsURL) { - try { - ExtensionsLoader.loadSubScript(subScriptLoader, this.editor.getOptions().userExtensionsURL, this.runner); - } catch (error) { - this.log.error("error loading user-extensions.js: " + error); - } - } - - var pluginManager = editor.pluginManager; - pluginManager.getEnabledUserExtensions().forEach(function (plugin) { - for (var i = 0; i < plugin.code.length; i++) { - try { - var js_pluginProvided = plugin.code[i].split(";"); - if (!(js_pluginProvided.length >= 2 && js_pluginProvided[2] == "1")) { - // Load the user extensions that cannot handle webdriver playback here - ExtensionsLoader.loadSubScript(subScriptLoader, js_pluginProvided[0], self.runner); - } - } catch (error) { - pluginManager.setPluginError(plugin.id, plugin.code[i], error); - break; - } - } - }); - - if (executeUsingWebDriver) { - subScriptLoader.loadSubScript('chrome://selenium-ide/content/webdriver-backed-selenium.js', this.runner); - } - pluginManager.getEnabledUserExtensions().forEach(function (plugin) { - for (var i = 0; i < plugin.code.length; i++) { - try { - var js_pluginProvided = plugin.code[i].split(";"); - if (js_pluginProvided.length >= 2 && js_pluginProvided[2] == "1") { - // User extensions that can handle webdriver playback are loaded here, so that they can access webdriver - // playback stuff - ExtensionsLoader.loadSubScript(subScriptLoader, js_pluginProvided[0], self.runner); - } - } catch (error) { - pluginManager.setPluginError(plugin.id, plugin.code[i], error); - break; - } - } - }); - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-runner.js', this.runner); - - this.editor.infoPanel.logView.setLog(this.runner.LOG); - - this.runner.getInterval = function () { - if (self.runner.testCase.debugContext.currentCommand().breakpoint) { - self.setState(Debugger.PAUSED); - return -1; - } else if (self.state == Debugger.PAUSED || self.state == Debugger.PAUSE_REQUESTED || self.stepContinue) { - self.stepContinue = false; - self.setState(Debugger.PAUSED); - return -1; - } else { - return self.editor.getInterval(); - } - }; - - this.runner.shouldAbortCurrentCommand = function () { - if (self.state == Debugger.PAUSE_REQUESTED) { - if ((new Date()).getTime() >= self.pauseTimeLimit) { - self.setState(Debugger.PAUSED); - return true; - } - } - return false; - }; - this.editor.health.addEvent('debugger', 'initialized'); - } -} - -Debugger.STATES = defineEnum(Debugger, ["STOPPED", "PLAYING", "PAUSE_REQUESTED", "PAUSED"]); - -Debugger.prototype.setState = function (state) { - this.log.debug("setState: state changed from " + Debugger.STATES[this.state] + " to " + Debugger.STATES[state]); - this.state = state; - this.notify("stateUpdated", state); -}; - -Debugger.prototype.getLog = function () { - this.init(); - return this.runner.LOG; -}; - -Debugger.prototype.start = function (complete, useLastWindow) { - this.log.debug("start"); - this.editor.toggleRecordingEnabled(false); - this.init(); - var self = this; - this.setState(Debugger.PLAYING); - this.runner.start(this.editor.getBaseURL(), { - testComplete:function (failed) { - self.setState(Debugger.STOPPED); - //self.editor.view.rowUpdated(self.runner.testCase.debugContext.debugIndex); - if (complete) { - try { - complete(failed); - } catch (error) { - self.log.error("error at the end of test case: " + error); - } - } - } - }, useLastWindow); -}; - -Debugger.prototype.executeCommand = function (command) { - this.editor.toggleRecordingEnabled(false); - this.init(); - if (this.state != Debugger.PLAYING && this.state != Debugger.PAUSE_REQUESTED) { - this.runner.executeCommand(this.editor.getBaseURL(), command); - } -}; - -Debugger.prototype.pause = function () { - this.log.debug("pause"); - this.setState(Debugger.PAUSE_REQUESTED); - this.pauseTimeLimit = (new Date()).getTime() + this.pauseTimeout; // 1 second -}; - -Debugger.prototype.doContinue = function (step) { - this.log.debug("doContinue: pause=" + step); - this.editor.toggleRecordingEnabled(false); - this.init(); - this.stepContinue = step; - this.setState(Debugger.PLAYING); - this.runner.continueCurrentTest(); -}; - -Debugger.prototype.closeWebDriverSession = function () { - this.init(); - this.runner.closeSession(); -}; - -Debugger.prototype.showElement = function (locator) { - this.init(); - this.runner.showElement(locator); -}; - -Debugger.prototype.selectElement = function () { - this.init(); - var button = document.getElementById("selectElementButton"); - var help = document.getElementById("selectElementTip"); - if (this.targetSelecter) { - this.targetSelecter.cleanup(); - this.targetSelecter = null; - return; - } - var self = this; - var isRecording = this.editor.recordingEnabled; - if (isRecording) { - this.editor.setRecordingEnabled(false); - } - button.label = "Cancel"; - help.removeAttribute("style"); - this.targetSelecter = new TargetSelecter(function (element, win) { - if (element && win) { - var locatorBuilders = new LocatorBuilders(win); - var target = locatorBuilders.buildAll(element); - locatorBuilders.detach(); - if (target != null && target instanceof Array) { - if (target[0]) { - self.editor.treeView.updateCurrentCommand('targetCandidates', target); - } else { - alert("LOCATOR_DETECTION_FAILED"); - } - } - - } - self.targetSelecter = null; - }, function () { - button.label = "Select"; - help.setAttribute("style", "display: none;"); - if (isRecording) { - self.editor.setRecordingEnabled(true); - } - }); -}; - -Debugger.prototype.unload = function () { - if (this.targetSelecter) { - this.targetSelecter.cleanup(); - this.targetSelecter = null; - } -}; - -/* - * Use to reload the Selenium Core API - * and its overrides and extensions (user-extensions file) - */ -Debugger.prototype.reInit = function () { - this.runner = null; - this.init(); -}; - -observable(Debugger); diff --git a/ide/main/src/content/dnd-observers.js b/ide/main/src/content/dnd-observers.js deleted file mode 100644 index f9d49a9ac0831..0000000000000 --- a/ide/main/src/content/dnd-observers.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -//a shorthand writting -const Ci = Components.interfaces; -const Cc = Components.classes; - - -/** - * Object used to observe DnD on the suiteTree - */ -var suiteTreeDragObserver = { - - onDragStart: function (aEvent, aXferData, aDragAction) { - - try{ - var selectedIndex = document.getElementById('suiteTree').currentIndex; - if (selectedIndex == -1) - return; - - aXferData.data = new TransferData(); - aXferData.data.addDataForFlavour("text/unicode", selectedIndex.toString()); - aDragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_MOVE; - - }catch(e){ - new Log("DND").error("onDragStart error: "+e); - } - }, - onDrop: function (aEvent, aXferData, aDragSession) {}, - onDragExit: function (aEvent, aDragSession) {}, - onDragOver: function (aEvent, aFlavour, aDragSession) {}, - getSupportedFlavours: function() {return null; } -}; - - - -/** - * Object used to observe dnd on the commands of the current testcase - */ -var commandsDragObserver = { - - onDragStart: function (aEvent, aXferData, aDragAction) { - - try{ - var selectedIndex = document.getElementById('commands').currentIndex; - if (selectedIndex == -1) - return; - - aXferData.data = new TransferData(); - aXferData.data.addDataForFlavour("text/unicode", selectedIndex.toString()); - aDragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_MOVE; - - }catch(e){ - new Log("DND").error("onDragStart error: "+e); - } - }, - onDrop: function (aEvent, aXferData, aDragSession) {}, - onDragExit: function (aEvent, aDragSession) {}, - onDragOver: function (aEvent, aFlavour, aDragSession) {}, - getSupportedFlavours: function() {return null; } -}; \ No newline at end of file diff --git a/ide/main/src/content/dndReorderedListbox.js b/ide/main/src/content/dndReorderedListbox.js deleted file mode 100644 index 2c271375245f9..0000000000000 --- a/ide/main/src/content/dndReorderedListbox.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Author: Samit Badle - * Date: 13/Sep/2011 - */ - -/** - * Controller for listbox which reorders the list items using drag and drop - * The list box must be loaded before this controller object is created, i.e. call during or after the load event - * - * @author Samit Badle - * @param listBox - element with list box (must have an id) - * @param listItemsRa - array with string items to show and reorder in the listbox. Can also accept array of objects, but then the mapFn should be provided - * @param mapFn - an optional function to map the items in the listItemsRa to displayable text - * @param keepInOrder - arrange the listItemsRa in the order of the items in the list - * @param dropFn - */ -function DnDReorderedListbox(listBox, listItemsRa, mapFn, keepInOrder, dropFn) { - this.listBox = listBox; - this.listItems = listItemsRa; - this.mapFn = mapFn || function(item) { return item; }; - this.keepInOrder = keepInOrder ? true : false; - var self = this; - this.listBoxDnD = new ListboxDnDReorder( - listBox, - 'application/x-' + listBox.id.toLowerCase(), - keepInOrder ? function (srcIndex, destIndex) { - if (dropFn) { - dropFn(srcIndex, destIndex); - } - self._reorder(srcIndex, destIndex); - } : dropFn - ); - this.reload(); -} - -/** - * Reloads the list box and throws away user ordering - * - * @param [listItemsRa] - optionally replace the list items as well - */ -DnDReorderedListbox.prototype.reload = function(listItemsRa) { - if (listItemsRa) { - this.listItems = listItemsRa; - } - var list = this.listBox; - //clear the listbox - for (var i = list.getRowCount() - 1; i >= 0; i--) { - list.removeItemAt(i); - } - //load the listbox with the list - var listItems = this.listItems; - for (var j = 0; j < listItems.length; j++) { - list.appendItem(this.mapFn(listItems[j]), j); - } -}; - -DnDReorderedListbox.prototype.updateItem = function(index) { - this.listBox.getItemAtIndex(index).label = this.mapFn(this.listItems[index]); -}; - -DnDReorderedListbox.prototype.appendItem = function(item) { - var newIndex = this.listItems.length; - this.listItems.push(item); - this.listBox.appendItem(this.mapFn(item), newIndex); - return newIndex; -}; - -DnDReorderedListbox.prototype.removeItem = function(index) { - this.listBox.removeItemAt(index); - return this.listItems.splice(index, 1)[0]; -}; - -DnDReorderedListbox.prototype.selectItem = function(index) { - this.listBox.selectedIndex = index; -}; - -DnDReorderedListbox.prototype.getListItems = function() { - if (this.keepInOrder) { - return this.listItems; - } - var listItems = this.listItems; - var newRa = new Array(listItems.length); - var list = this.listBox; - for (var i = list.itemCount - 1; i >= 0; i--) { - newRa[i] = listItems[list.getItemAtIndex(i).value]; - } - return newRa; -}; - -DnDReorderedListbox.prototype._reorder = function(srcIndex, destIndex) { - //TODO - var item = this.listItems.splice(srcIndex, 1); - this.listItems.splice(destIndex, 0, item[0]); -}; - -/** - * Drag and drop reordering behaviour for the list Box - * The list box must be loaded before this controller object is created, i.e. call during or after the load event - * Note: The list item is removed and a new one is created using the label and value properties, all others are lost. - * - * @author Samit Badle - * @param listBox - * @param dataType - * @param onDrop - */ -function ListboxDnDReorder(listBox, dataType, onDrop) { - this.onDrop = onDrop; - this.dataType = dataType; //for e.g. 'application/x-something' - this.listBox = listBox; - var self = this; - listBox.addEventListener('dragstart', function(event) {self.dragStart(event)}, false); - listBox.addEventListener('dragenter', function(event) {self.dragOver(event)}, false); - listBox.addEventListener('dragover', function(event) {self.dragOver(event)}, false); - listBox.addEventListener('dragleave', function(event) {self.dragLeave(event)}, false); - listBox.addEventListener('drop', function(event) {self.drop(event)}, false); - listBox.addEventListener('dragend', function(event) {self.dragEnd(event)}, false); - listBox.draggable = 'true'; -} - -ListboxDnDReorder.prototype.dragStart = function(event) { - this.itemCount = this.listBox.itemCount; - if (this.itemCount > 1) { - // You cannot rearrange a single or no items no matter how hard you try - //cache some useful elements first - this.draggedItem = this.listBox.selectedItem; - this.lastListItem = this.listBox.getItemAtIndex(this.itemCount - 1); - var rect = this.lastListItem.getBoundingClientRect(); - this.flipYPos = rect.top + (rect.height / 2); - event.dataTransfer.setData(this.dataType, 'This text may be dragged'); - } -}; - -ListboxDnDReorder.prototype.dragOver = function(event) { - //TODO: currently you can sort only drag and drop among displayed items, add auto scroll when at the top or bottom of displayed list - if (event.dataTransfer.types.contains(this.dataType)) { - // no point trying to let people drop text or other stuff here either - var listItem = event.target; - if (listItem.nodeName == 'listitem') { - //if you are on an list item, give feedback that the drop will insert before the item - if (listItem == this.lastListItem) { - this._showDropPosition(listItem, event.clientY > this.flipYPos); - } else { - this._showDropPosition(listItem); - } - event.preventDefault(); - } else { - if (this.itemCount > 1) { - //if you are not on any item, give feedback that the drop will be at the end of the list - this._showDropPosition(this.lastListItem, true); - event.preventDefault(); - } - } - } -}; - -ListboxDnDReorder.prototype.dragLeave = function(event) { - this._clearDropPosition(); -}; - -ListboxDnDReorder.prototype.dragEnd = function(event) { - this._clearDropPosition(); - this.draggedItem = null; - this.curItem = null; -}; - -ListboxDnDReorder.prototype.drop = function(event) { - var dropIndex = this.listBox.getIndexOfItem(this.curItem); - if (this.dropAfter) { - dropIndex++; - } - var selectedIndex = this.listBox.getIndexOfItem(this.draggedItem); - this._clearDropPosition(); - if (selectedIndex < dropIndex) { - dropIndex--; - } - if (selectedIndex != dropIndex) { - var selectDropped = selectedIndex == this.listBox.selectedIndex; - if (this.onDrop) { - this.onDrop(selectedIndex, dropIndex); - } - var lbl = this.draggedItem.label; - var userData = this.draggedItem.value; - this.listBox.removeItemAt(selectedIndex); - this.listBox.insertItemAt(dropIndex, lbl, userData); - if (selectDropped) { - this.listBox.selectedIndex = dropIndex; - } - } -}; - -ListboxDnDReorder.prototype.dropStyle = '1px solid Highlight'; - -ListboxDnDReorder.prototype._showDropPosition = function(item, after) { - if (this.curItem != item) { - this._clearDropPosition(); - this.curItem = item; - this.dropAfter = after; - if (after) { - this.curItem.style.borderBottom = this.dropStyle; - } else { - this.curItem.style.borderTop = this.dropStyle; - } - } -}; - -ListboxDnDReorder.prototype._clearDropPosition = function () { - if (this.curItem) { - this.curItem.style.borderTop = 'none'; - this.curItem.style.borderBottom = 'none'; - this.curItem = null; - } -}; diff --git a/ide/main/src/content/editor.js b/ide/main/src/content/editor.js deleted file mode 100644 index 8f870a89fd39e..0000000000000 --- a/ide/main/src/content/editor.js +++ /dev/null @@ -1,1732 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * An UI of Selenium IDE. - */ -function Editor(window) { - this.log.debug("initializing"); - this.window = window; - window.editor = this; - var self = this; - this.health = new HealthService(); - this.health.attach(window, 'editor'); - this.health.addEvent('editor', 'initializing'); - this.safeLastWindow = new LastWindow(); - this.recordFrameTitle = false; - this.app = new Application(); - this.app.addObserver({ - baseURLChanged: function () { - Editor.GENERIC_AUTOCOMPLETE.setCandidates( - XulUtils.toXPCOMString(self.getAutoCompleteSearchParam("baseURL")), - XulUtils.toXPCOMArray(self.app.getBaseURLHistory()) - ); - $("baseURL").value = self.app.getBaseURL(); - if (self.view) { - self.view.refresh(); - } - }, - - optionsChanged: function () { - self.health.addEvent('editor', 'optionsChanged'); - if (self.view) { - self.view.refresh(); - } - LocatorBuilders.setPreferredOrder(self.app.options.locatorBuildersOrder); - //Samit: Enh: now sync other UI elements with the options - self.updateDeveloperTools(self.app.getBooleanOption('showDeveloperTools')); - self.updateExperimentalFeatures(self.app.getBooleanOption('enableExperimentalFeatures')); - self.updateVisualEye(self.app.getBooleanOption('visualEye')); - self.health.showAlerts(self.app.getBooleanOption('showHealthAlerts')); - self.updateWebdriverBrowser(self.app.options.webDriverBrowserString); - }, - - testSuiteChanged: function (testSuite) { - testSuite.addObserver(this._testSuiteObserver); - if (testSuite.file) { - document.getElementById("suiteTreeSplitter").setAttribute("state", "open"); - } - self.suiteTreeView.refresh(); - }, - - testSuiteUnloaded: function (testSuite) { - testSuite.removeObserver(this._testSuiteObserver); - }, - - testCaseChanged: function (testCase) { - // this.view is not set yet when setTestCase is called from constructor - if (self.view) { - self.view.testCase = testCase; - self.view.refresh(); - self.updateTitle(); - } - self.toggleRecordingEnabled(false); - testCase.addObserver(this._testCaseObserver); - }, - - testCaseUnloaded: function (testCase) { - testCase.removeObserver(this._testCaseObserver); - }, - - /** - * called when the format is changing. It synchronizes - * the testcase before changing the view with a converted testcase - * in the new format - */ - currentFormatChanging: function () { - //sync the testcase with the view - self.sourceView.syncModel(); - if (self.view) { - self.view.testCase = self.app.getTestCase(); - self.view.refresh(); - } - }, - - currentFormatChanged: function (format) { - self.updateViewTabs(); - self.updateState(); - }, - - /** - * called when the format can't be changed. It advises the user - * of the undoable action - */ - currentFormatUnChanged: function (format) { - var res = confirm(Editor.getString('format.switch.loseChanges')); - if (res) { - if (self.sourceView) { - self.alreadySaved = false; - self.oldtc.edited = false; - self.view.testCase = self.oldtc.createCopy(); - self.app.testCase.edited = false; - self.app.currentFormat = format; - self.app.testCase = self.oldtc; - self.sourceView.testCase = self.oldtc.createCopy(); - self.sourceView.testCase.edited = false; - self.sourceView.updateView(); - self.updateViewTabs(); - self.updateState(); - self.alreadySaved = false; - self.app.currentFormat = format; - Preferences.setAndSave(self.app.options, 'selectedFormat', format.id); - } - } - }, - - clipboardFormatChanged: function (format) { }, - - _testCaseObserver: { - modifiedStateUpdated: function () { - self.updateTitle(); - if (self.view.updateView) { - self.view.testCase = self.getTestCase(); - self.view.updateView(); - } - } - }, - - _testSuiteObserver: { - testCaseAdded: function () { - document.getElementById("suiteTreeSplitter").setAttribute("state", "open"); - } - } - }); - - LocatorBuilders.addObserver({ - preferredOrderChanged: function (preferredOrder) { - Preferences.setAndSave(self.app.options, 'locatorBuildersOrder', preferredOrder.join(',')); - } - }); - - this.document = document; - this.recordButton = document.getElementById("record-button"); - this.recordMenuItem = document.getElementById("menu_record"); - this.scheduleButton = document.getElementById("schedule-button"); - this.scheduleMenuItem = document.getElementById("menu_schedule"); - this.speedMaxInterval = parseInt(document.getElementById("speedSlider").getAttribute("maxpos")); - this.initMenus(); - this.app.initOptions(); - this.pluginManager = this.app.pluginManager; - this.health.addDiagnostic('PluginManager', this.pluginManager); - this.loadExtensions(); - this.loadSeleniumAPI(); - //TODO show plugin errors - if (this.pluginManager.errors.hasErrors()) { - this.showAlert(Editor.getString('plugin.disabled.message') + "\n\n" + this.pluginManager.errors.getPluginIdsWithErrors().join("\n")); - } - this.selectDefaultReference(); - this.treeView = new TreeView(this, document, document.getElementById("commands")); - this.sourceView = new SourceView(this, document.getElementById("source")); - this.suiteTreeView = new SuiteTreeView(this, document.getElementById("suiteTree")); - this.testSuiteProgress = new TestSuiteProgress("suiteProgress"); - //this.toggleView(this.treeView); - - // "debugger" cannot be used since it is a reserved word in JS - this.selDebugger = new Debugger(this); - this.selDebugger.addObserver({ - stateUpdated: function (state) { - var pauseBtn = document.getElementById("pause-button"); - pauseBtn.classList.remove("resume"); - pauseBtn.classList.remove("pause"); - pauseBtn.classList.add(state == Debugger.PAUSED ? "resume" : "pause"); - self.updateState(); - } - }); - - //top.document.commandDispatcher.getControllers().appendController(Editor.controller); - //window.controllers.appendController(Editor.controller); - top.controllers.appendController(Editor.controller); - - //window.controllers.appendController(controller); - - if (this.app.getBooleanOption('showDeveloperTools') && this.app.reopenLastTestCaseOrSuite()) { - this.toggleRecordingEnabled(false); - } else { - this.app.newTestSuite(); - if (this.app.options.recordOnOpen && this.app.options.recordOnOpen == 'true') { - this.toggleRecordingEnabled(true); - } else { - this.toggleRecordingEnabled(false); - } - } - - // disable webdriver related toolbar buttons if webdriver playback is disabled - if ( !this.app.getBooleanOption('executeUsingWebDriver') ) { - document.getElementById("browser-button").disabled = true; - document.getElementById("close-webdriver-button").disabled = true; - } - - this.updateViewTabs(); - this.infoPanel = new Editor.InfoPanel(this); - - //top.document.commandDispatcher.updateCommands("selenium-ide-state"); - - document.addEventListener("focus", Editor.checkTimestamp, false); - - this.log.debug("initialized"); - - setTimeout("editor.showLoadErrors()", 500); - - this.registerRecorder(); - - this.oldtc = null; - this.alreadySaved = false; - - //Samit: Enh: display a webpage on the first start (and also on locale change if the version string is localised) - var versionString = Editor.getString('selenium-ide.version'); - if (!this.app.options.currentVersion || this.app.options.currentVersion != versionString) { - openTabOrWindow('https://github.com/SeleniumHQ/selenium/wiki/SeIDE-Release-Notes'); - Preferences.setAndSave(this.app.options, 'currentVersion', versionString); - } - - this.seleniumScheduler = new SeleniumScheduler(this); - this.scheduler = this.seleniumScheduler.scheduler; - this.log.info("Ready"); - this.app.notify('initComplete'); - this.health.addEvent('editor', 'initialized'); -} - -Editor.prototype.saveTC = function () { - if (!this.alreadySaved && !this.app.getCurrentFormat().isReversible()) { - this.oldtc = this.app.getTestCase().createCopy(); - this.oldtc.edited = false; - this.app.testCase.edited = true; - this.alreadySaved = true; - } -}; - -Editor.checkTimestamp = function () { - editor.log.debug('checkTimestamp'); - if (editor.app.getTestCase().checkTimestamp()) { - if (window.confirm(Editor.getString('confirmReload'))) { - var testCase = editor.app.getCurrentFormat().loadFile(editor.getTestCase().file); - if (testCase) { - editor.app.setTestCase(testCase); - } - } - } -}; - -Editor.getString = function (key) { - return document.getElementById("strings").getString(key); -}; - -//Samit: Enh: Support localised strings with parameters -Editor.getFormattedString = function (key, strArray) { - return document.getElementById("strings").getFormattedString(key, strArray); -}; - -Editor.controller = { - supportsCommand: function (cmd) { - //Editor.log.debug("supportsCommand"); - switch (cmd) { - case "cmd_close": - case "cmd_open": - case "cmd_add": - case "cmd_new": - case "cmd_new_suite": - case "cmd_open_suite": - case "cmd_save": - case "cmd_save_suite": - case "cmd_save_suite_as": - case "cmd_selenium_play": - case "cmd_selenium_play_suite": - case "cmd_selenium_pause": - case "cmd_selenium_step": - case "cmd_selenium_testcase_clear": - case "cmd_selenium_rollup": - case "cmd_selenium_reload": - case "cmd_selenium_record": - case "cmd_selenium_schedule": - case "cmd_selenium_speed_fastest": - 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; - } - }, - isCommandEnabled: function (cmd) { - //Editor.log.debug("isCommandEnabled"); - switch (cmd) { - case "cmd_close": - case "cmd_open": - case "cmd_add": - case "cmd_new": - case "cmd_new_suite": - case "cmd_open_suite": - case "cmd_save": - 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; - case "cmd_selenium_rollup": - if (Editor.rollupManager) { - return editor.app.isPlayable() && editor.selDebugger.state != Debugger.PLAYING; - } else { - return false; - } - case "cmd_selenium_reload": - return editor.app.isPlayable() && editor.selDebugger.state != Debugger.PLAYING && editor.app.getBooleanOption('showDeveloperTools'); - case "cmd_selenium_play_suite": - return editor.app.isPlayable() && editor.selDebugger.state != Debugger.PLAYING; - case "cmd_selenium_pause": - return editor.app.isPlayable() && (editor.selDebugger.state == Debugger.PLAYING || editor.selDebugger.state == Debugger.PAUSED); - case "cmd_selenium_step": - return editor.app.isPlayable() && editor.selDebugger.state == Debugger.PAUSED; - case "cmd_selenium_record": //TODO base it on scheduler? - return true; - case "cmd_selenium_schedule": - return true; - case "cmd_selenium_speed_fastest": - return editor.getInterval() > 0; - case "cmd_selenium_speed_faster": - return editor.getInterval() > 0; - case "cmd_selenium_speed_slower": - return editor.getInterval() < editor.speedMaxInterval; - case "cmd_selenium_speed_slowest": - return editor.getInterval() < editor.speedMaxInterval; - default: - return false; - } - }, - doCommand: function (cmd) { - Editor.log.debug("doCommand: " + cmd); - switch (cmd) { - case "cmd_close": - if (editor.confirmClose()) { - window.close(); - } - break; - case "cmd_save": - editor.saveTestCase(); - break; - case "cmd_add": - editor.app.addTestCase(); - break; - case "cmd_new": - editor.app.newTestCase(); - break; - case "cmd_open": - editor.loadRecentTestCase(); - break; - case "cmd_new_suite": - if (editor.confirmClose()) { - editor.app.newTestSuite(); - } - break; //Samit: Enh: Prompt to save first - case "cmd_open_suite": - editor.loadRecentSuite(); - break; - case "cmd_save_suite": - editor.app.saveTestSuite(true); - break; - case "cmd_save_suite_as": - editor.app.saveNewTestSuite(true); - break; - case "cmd_selenium_testcase_clear": - editor.clear(); - break; - case "cmd_selenium_play": - editor.testSuiteProgress.reset(); - editor.playCurrentTestCase(null, 0, 1); - break; - case "cmd_selenium_play_suite": - editor.playTestSuite(); - break; - case "cmd_selenium_pause": - if (editor.selDebugger.state == Debugger.PAUSED) { - editor.selDebugger.doContinue(); - } else { - editor.selDebugger.pause(); - } - break; - case "cmd_selenium_step": - editor.selDebugger.doContinue(true); - break; - case "cmd_selenium_rollup": - if (Editor.rollupManager) { - try { - Editor.rollupManager.applyRollupRules(); - } catch (e) { - alert('Whoa! ' + e.message); - } - } else { - alert('No rollup rules have been defined.'); - } - break; - case "cmd_selenium_reload": - try { - editor.reload(); - } catch (e) { - alert('Reload error : ' + e); - } - break; - case "cmd_selenium_record": - editor.toggleRecordingEnabled(); - break; - case "cmd_selenium_schedule": - editor.scheduleButton.checked = !editor.scheduleButton.checked; - if (editor.scheduleButton.checked) { - editor.scheduleButton.setAttribute("tooltiptext","Scheduler now on, Click to turn Scheduler off") - //TODO hasJobs() is not enough as there may be jobs that are not valid, need hasValidJobs() - if (editor.scheduler.hasJobs()) { - editor.toggleRecordingEnabled(false); - if (editor.scheduler.pendingJobCount() > 0) { - var answer = PromptService.yesNoCancel(Editor.getString('scheduler.runNow.message'), Editor.getString('scheduler.runNow.title')); - if (answer.yes) { - editor.scheduler.start(); - } else if (answer.no) { - editor.scheduler.resetNextRun(); - editor.scheduler.start(); - } else { - //Canceled - editor.scheduleButton.checked = !editor.scheduleButton.checked; - } - } else { - editor.scheduler.start(); - } - } else { - if (PromptService.yesNo(Editor.getString('scheduler.setupJobs.message'), Editor.getString('scheduler.setupJobs.title')).yes) { - editor.openSeleniumIDEScheduler(); - } - } - } else { - editor.scheduleButton.setAttribute("tooltiptext","Click to turn scheduler on") - editor.scheduler.stop(); - } - break; - case "cmd_selenium_speed_fastest": - editor.updateInterval(-1000); - break; - case "cmd_selenium_speed_faster": - editor.updateInterval(-100); - break; - case "cmd_selenium_speed_slower": - editor.updateInterval(100); - break; - 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: - } - }, - onEvent: function (evt) { } -}; - -Editor.prototype.showLoadErrors = function () { - if (this.errorMessage) { - window.alert(this.errorMessage); - delete this.errorMessage; - } -}; - -//Samit: Enh: Prompt to save first -Editor.prototype.loadRecentTestCase = function (path) { - if (this.confirmClose()) { - this.app.loadTestCaseWithNewSuite(path); - } -}; - -//Samit: Enh: Prompt to save first -Editor.prototype.loadRecentSuite = function (path) { - if (this.confirmClose()) { - this.app.loadTestSuite(path); - } -}; - -Editor.prototype.confirmClose = function () { - //Samit: Enh: Prompt if test suite and/or any of the test cases have changed and save them - var curSuite = this.app.getTestSuite(); - if (curSuite) { - var saveSuite = !curSuite.isTempSuite() && curSuite.isModified(); - var changedTestCases = 0; - for (var i = 0; i < curSuite.tests.length; i++) { - if (curSuite.tests[i].content && curSuite.tests[i].content.modified) { - changedTestCases++; - } - } - - if (saveSuite || changedTestCases > 0) { - var promptType = (saveSuite ? 1 : 0) + (changedTestCases > 0 ? 2 : 0) - 1; - var prompt = [ - Editor.getString('saveTestSuite.confirm'), - Editor.getFormattedString('saveTestCase.confirm', [changedTestCases]), - Editor.getFormattedString('saveTestSuiteAndCase.confirm', [changedTestCases]) - ][promptType]; - - var result = PromptService.save(prompt, Editor.getString('save')); - if (result.save) { - if (curSuite.isTempSuite()) { - //For temp suites, just save the test case (as there is only one test case) - return this.saveTestCase(); - } - //For all others, save the suite (perhaps unnecessary) and all test cases that have changed - return this.app.saveTestSuite(true); - } else if (result.cancel) { - return false; - } - //result.dontSave - return true; - } - } else { - //TODO: Why is there no current suite??? - } - return true; -}; - -Editor.prototype.log = Editor.log = new Log("Editor"); - -Editor.prototype.unload = function () { - this.app.saveState(); - - this.selDebugger.unload(); - this.deregisterRecorder(); - top.controllers.removeController(Editor.controller); - - this.cleanupAutoComplete(); - - delete window.editor; -}; - -Editor.prototype.updateState = function () { - window.document.commandDispatcher.updateCommands("selenium-ide-state"); -}; - -Editor.prototype.updateSeleniumCommands = function () { - this.log.debug("updateSeleniumCommands"); - [ "cmd_selenium_play_suite", - "cmd_selenium_play", - "cmd_selenium_pause", - "cmd_selenium_step", - "cmd_selenium_rollup", - "cmd_selenium_reload", - "cmd_delete_suite", - "cmd_play_suite_from_here" - ].forEach(function (cmd) { - goUpdateCommand(cmd); - }); -}; - -Editor.prototype.updateSeleniumActionCommands = function () { - this.log.debug("updateSeleniumActionCommands"); - [ "cmd_selenium_speed_faster", - "cmd_selenium_speed_fastest", - "cmd_selenium_speed_slower", - "cmd_selenium_speed_slowest" - ].forEach(function (cmd) { - goUpdateCommand(cmd); - }); -}; - -Editor.prototype.getOptions = function (options) { - return this.app.getOptions(); -}; - -Editor.prototype.updateTitle = function () { - var testCase = this.getTestCase(); - var title = testCase ? testCase.getTitle() : ''; - var testSuite = this.app.getTestSuite(); - title += " (" + (testSuite && testSuite.file ? testSuite.file.leafName : 'untitled suite') + ") "; - title += " - " + Editor.getString('selenium-ide.name') + " " + Editor.getString('selenium-ide.version'); - if (testCase && testCase.modified) { - title += " *"; - } - document.title = title; -}; - -Editor.prototype.tabSelected = function (id) { - if (this.getTestCase() != null) { - this.log.debug("tabSelected: id=" + id); - if (id == 'sourceTab') { - this.toggleView(this.sourceView); - } else if (id == 'editorTab') { - this.toggleView(this.treeView); - } - } -}; - -Editor.prototype.saveTestCase = function () { - this.view.syncModel(); - return this.app.saveTestCase(); -}; - -Editor.prototype.saveNewTestCase = function () { - this.view.syncModel(); - if (this.app.saveNewTestCase()) { - //document.getElementById("filename").value = this.testCase.filename; - this.updateTitle(); - } -}; - -Editor.prototype.exportTestCaseWithFormat = function (format) { - this.view.syncModel(); - format.saveAsNew(this.getTestCase().createCopy(), true); -}; - -Editor.prototype.exportTestSuiteWithFormat = function (format) { - this.view.syncModel(); - format.saveSuiteAsNew(this.app.getTestSuite().createCopy(), true); -}; - -Editor.prototype.loadRecorderFor = function (contentWindow, isRootDocument) { - this.log.debug("loadRecorderFor: " + contentWindow); - if (this.recordingEnabled && (isRootDocument || this.recordFrameTitle) && this.safeLastWindow.windowEquals(contentWindow)) { - this.recordTitle(contentWindow); - } - Recorder.register(this, contentWindow); -}; - -Editor.prototype.toggleRecordingEnabled = function (enabled) { - if (arguments.length == 0) { - enabled = !this.recordingEnabled; - } - this.recordingEnabled = enabled; - this.recordButton.checked = enabled; - this.recordMenuItem.setAttribute('checked', enabled); - var tooltip = Editor.getString("recordButton.tooltip." + (enabled ? "on" : "off")); - this.recordButton.setAttribute("tooltiptext", tooltip); -}; - -Editor.prototype.setRecordingEnabled = function (enabled) { - this.toggleRecordingEnabled(enabled); -}; - -Editor.prototype.onUnloadDocument = function (doc) { - this.log.debug("onUnloadDocument"); - var window = doc.defaultView; - var self = this; - setTimeout(function () { - self.appendWaitForPageToLoad(window); - }, 0); -}; - -Editor.prototype.recordTitle = function (window) { - if (this.getOptions().recordAssertTitle == 'true' && this.getTestCase().commands.length > 0) { - //setTimeout("addCommand", 200, "assertTitle", window.document.title, null, window); - this.addCommand("assertTitle", exactMatchPattern(window.document.title), null, window); - } -}; - -Editor.prototype.getPathAndUpdateBaseURL = function (window) { - if (!window || !window.location) { - return [null, null]; - } - var path = window.location.href; - var regexp = new RegExp(/^(https?:\/\/[^/:]+(:\d+)?)\/.*/); - var base = ''; - var result = regexp.exec(path); - if (result && "true" != this.getOptions().recordAbsoluteURL) { - path = path.substr(result[1].length); - base = result[1] + '/'; - } - if (!this.app.getBaseURL() || - this.app.getBaseURL().indexOf(base) < 0) { - this.app.setBaseURL(base); - } - return [path, base]; -}; - -Editor.prototype.clear = function (force) { - if (this.getTestCase() != null) { - if (force || confirm("Really clear the test?")) { - this.getTestCase().clear(); - this.view.refresh(); - this.log.debug("cleared"); - return true; - } - } - return false; -}; - -Editor.prototype._getTopWindow = function (window) { - if (this.topWindow) { - var top = this.topWindow; // for functional test of Selenium IDE - delete this.topWindow; - return top; - } else { - return window.top; - } -}; - -//Samit: Enh: Provide a way to reset the window size and position in the rare case that you have to change to a smaller monitor and you cannot access the lower pane -Editor.prototype.resetWindow = function () { - if (this instanceof StandaloneEditor) { - try { - window.restore(); - window.resizeTo(400, 520); - window.moveTo(0, 0); - } catch (err) { - alert("Error: [" + err + "] while trying to reset window size and position."); - } - } -}; -Editor.prototype.submitDiagInfo = function(){ - this.health.runDiagnostics(); - var data = { - data: this.health.getJSON(true) - }; - window.openDialog("chrome://selenium-ide/content/health/diag-info.xul", "diagInfo", "chrome,modal,resizable", data); - if (data.data.length > 0) { - GitHub.createGistWithFiles("Selenium IDE diagnostic information", data).then(function(url){ - alert("Gist created with diagnostic information.\nPlease update the issue on https://github.com/SeleniumHQ/selenium/issues with this url.\nURL: " + url); - }, function(response, success, status){ - alert("Gist creation failed with status " + status + " and response:-\n" + (response || '')); - }); - } -}; - -//Samit: Enh: Introduced experimental features to enable or disable experimental and unstable features -Editor.prototype.updateExperimentalFeatures = function (show) { - //$("menu_choose_format").disabled = !show; - if (show == false && this.app.options.selectedFormat != 'default') { - //reset format to html - this.app.setCurrentFormat(this.app.formats.selectFormat('default')); - } -}; - -Editor.prototype.showFormatsPopup = function (e) { - if (this.app.getBooleanOption('enableExperimentalFeatures')) { - this.populateFormatsPopup(e, 'switchFormat', this.app.getCurrentFormat()); - } else { - XulUtils.clearChildren(e); - XulUtils.appendMenuItem(e, { - label: Editor.getString('format.switch.read'), - value: "stuff" - }); - } -}; - -Editor.prototype.formatsPopupClicked = function (value) { - if (this.app.getBooleanOption('enableExperimentalFeatures')) { - this.app.userSetCurrentFormat(this.app.formats.selectFormat(value)); - } else { - openTabOrWindow("http://blog.reallysimplethoughts.com/2011/06/10/does-selenium-ide-v1-0-11-support-changing-formats/"); - } -}; - -//Samit: Ref: Refactored the developer tools to be simpler -Editor.prototype.updateDeveloperTools = function (show) { - //use when the developer tools have to be enabled or not - $("reload-button").hidden = !show; - $("reload-button").disabled = !show; -}; - -//Samit: Enh: Provide a bit of visual assistance -Editor.prototype.updateVisualEye = function (show) { - var container = document.getElementById("selenium-ide") || document.getElementById("selenium-ide-sidebar"); - show ? container.classList.add("visualeye") : container.classList.remove("visualeye"); -}; - -Editor.prototype.autoCompleteCommand = function (command) { - var newcmd = command.replace(/^.+ >> /, ''); - if (newcmd !== command) { - $('commandAction').value = newcmd; - this.treeView.updateCurrentCommand('command', newcmd); - } -}; - -Editor.prototype.addCommand = function (command, target, value, window, insertBeforeLastCommand) { - this.log.debug("addCommand: command=" + command + ", target=" + target + ", value=" + value + " window.name=" + window.name); - if (command != 'open' && - command != 'selectWindow' && - command != 'selectFrame') { - if (this.getTestCase().commands.length == 0) { - var top = this._getTopWindow(window); - this.log.debug("top=" + top); - var path = this.getPathAndUpdateBaseURL(top)[0]; - this.addCommand("open", path, '', top); - this.recordTitle(top); - } - if (!this.safeLastWindow.isSameWindow(window)) { - if (this.safeLastWindow.isSameTopWindow(window)) { - // frame - var destPath = this.safeLastWindow.createPath(window); - var srcPath = this.safeLastWindow.getPath(); - this.log.debug("selectFrame: srcPath.length=" + srcPath.length + ", destPath.length=" + destPath.length); - var branch = 0; - var i; - for (i = 0; ; i++) { - if (i >= destPath.length || i >= srcPath.length) { - break; - } - if (destPath[i] == srcPath[i]) { - branch = i; - } - } - this.log.debug("branch=" + branch); - if (branch == 0 && srcPath.size > 1) { - // go to root - this.addCommand('selectFrame', 'relative=top', '', window); - } else { - for (i = srcPath.length - 1; i > branch; i--) { - this.addCommand('selectFrame', 'relative=up', '', window); - } - } - for (i = branch + 1; i < destPath.length; i++) { - this.addCommand('selectFrame', destPath[i].name, '', window); - } - } else { - // popup - var windowName = window.name; - if (windowName == '') { - this.addCommand('selectWindow', 'null', '', window); - } else { - this.addCommand('selectWindow', "name=" + windowName, '', window); - } - } - } - } - //resultBox.inputField.scrollTop = resultBox.inputField.scrollHeight - resultBox.inputField.clientHeight; - this.clearLastCommand(); - this.safeLastWindow.setWindow(window); - var command = new Command(command, target, value); - // bind to the href attribute instead of to window.document.location, which - // is an object reference - command.lastURL = window.document.location.href; - - if (insertBeforeLastCommand && this.view.getRecordIndex() > 0) { - var index = this.view.getRecordIndex() - 1; - this.getTestCase().commands.splice(index, 0, command); - this.view.rowInserted(index); - } else { - //this.lastCommandIndex = this.getTestCase().commands.length; - this.lastCommandIndex = this.view.getRecordIndex(); //Samit: Revert patch for issue 419 as it disables recording in the middle of a test script - this.getTestCase().commands.splice(this.lastCommandIndex, 0, command); - this.view.rowInserted(this.lastCommandIndex); - this.timeoutID = setTimeout("editor.clearLastCommand()", 300); - } -}; - -Editor.prototype.clearLastCommand = function () { - this.lastCommandIndex = null; - if (this.timeoutID != null) { - clearTimeout(this.timeoutID); - this.timeoutID = null; - } -}; - -Editor.prototype.appendWaitForPageToLoad = function (window) { - this.log.debug("appendWaitForPageToLoad"); - if (!this.safeLastWindow.windowEquals(window)) { - this.log.debug("window did not match"); - return; - } - var lastCommandIndex = this.lastCommandIndex; - if (lastCommandIndex == null || lastCommandIndex >= this.getTestCase().commands.length) { - return; - } - this.lastCommandIndex = null; - var lastCommand = this.getTestCase().commands[lastCommandIndex]; - if (lastCommand.type == 'command' && !lastCommand.command.match(/^(assert|verify|store)/)) { - if (this.app.getCurrentFormat().getFormatter().remoteControl) { - this.addCommand("waitForPageToLoad", this.getOptions().timeout, null, window); - } else { - lastCommand.command = lastCommand.command + "AndWait"; - this.view.rowUpdated(lastCommandIndex); - } - } - this.clearLastCommand(); - //updateSource(); -}; - -Editor.prototype.openSeleniumIDEPreferences = function () { - window.openDialog("chrome://selenium-ide/content/optionsDialog.xul", "options", "chrome,modal,resizable", null); -}; - -Editor.prototype.openSeleniumIDEScheduler = function (event) { - if (event) { - event.stopPropagation(); - } - window.openDialog("chrome://selenium-ide/content/scheduler/schedulerui.xul", "scheduler", "chrome,modal,resizable", this); - this.scheduleButton.checked = this.scheduler.isActive(); -}; - -Editor.prototype.showInBrowser = function (url, newWindow) { - if (newWindow) { - return this.window.open(url); - } else { - var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); - var window = wm.getMostRecentWindow('navigator:browser'); - var contentWindow = window.getBrowser().contentWindow; - contentWindow.location.href = url; - return window; - } -}; - -Editor.prototype.playCurrentTestCase = function (next, index, total) { - var start = Date.now(); - var self = this; - this.health.increaseCounter('editor', 'playCurrentTestCase'); - self.getUserLog().info("Playing test case " + (self.app.getTestCase().getTitle() || '')); - self.app.notify("testCasePlayStart", self.app.getTestCase()); - this.selDebugger.start(function (failed) { - self.log.debug("finished execution of test case: failed=" + failed); - var testCase = self.suiteTreeView.getCurrentTestCase(); - if (testCase) { - testCase.testResult = { - summary: failed ? "failed" : "passed", - // remember all in milliseconds - start: start, - end: Date.now(), - dur: Date.now() - start - }; - self.getUserLog().info("Test case " + testCase.testResult.summary); - self.app.notify("testCasePlayDone", testCase); - } else { - self.getUserLog().error("current test case not found"); - self.log.error("current test case not found"); - } - self.suiteTreeView.currentRowUpdated(); - self.testSuiteProgress.update(index + 1, total, failed); - if (next) { - next(); - } - }, index > 0 /* reuse last window if index > 0 */); -}; - -Editor.prototype.playTestSuite = function (startIndex) { - if (!startIndex) { - startIndex = 0; - } - if (startIndex === 0) { - this.health.increaseCounter('editor', 'playTestSuite'); - } else { - this.health.increaseCounter('editor', 'playPartialTestSuite'); - } - var index = startIndex - 1; - var testSuite = this.app.getTestSuite(); - testSuite.tests.forEach(function (test) { - if (test.testResult) { - delete test.testResult; - } - }); - this.suiteTreeView.refresh(); - this.testSuiteProgress.reset(); - var start = Date.now(); - testSuite.testSuiteProgress = this.testSuiteProgress; - var self = this; - self.app.notify("testSuitePlayStart"); - var total = testSuite.tests.length - startIndex; - (function () { - if (++index < testSuite.tests.length) { - self.suiteTreeView.scrollToRow(index); - self.app.showTestCaseFromSuite(testSuite.tests[index]); - self.playCurrentTestCase(arguments.callee, index, total); - } else { - //Suite done - testSuite.suiteResult = { - summary: total == self.testSuiteProgress.runs && self.testSuiteProgress.failures == 0 ? 'passed' : 'failed', - total: total, - ran: self.testSuiteProgress.runs, - failed: self.testSuiteProgress.failures, - passed: self.testSuiteProgress.runs - self.testSuiteProgress.failures, - // remember all in milliseconds - start: start, - end: Date.now(), - dur: Date.now() - start - }; - self.getUserLog().info("Test suite completed: " + self.testSuiteProgress.runs + " played, " + (self.testSuiteProgress.failures ? self.testSuiteProgress.failures + " failed" : " all passed!")); - self.app.notify("testSuitePlayDone", testSuite.suiteResult); - } - })(); -}; - -Editor.prototype.openLogWindow = function () { - if (!LOG.getLogWindow()) { - LOG.logWindow = window.open( - "chrome://selenium-ide/content/selenium-core/SeleniumLog.html", "SeleniumLog", - "chrome,width=600,height=250,bottom=0,right=0,status,scrollbars,resizable" - ); - } -}; - -Editor.prototype.onPopupOptions = function () { - document.getElementById("clipboardFormatMenu").setAttribute("disabled", !editor.app.isPlayable()); - document.getElementById("internalTestsMenu").setAttribute("hidden", this.getOptions().showInternalTestsMenu == null); -}; - -Editor.prototype.populateFormatsPopup = function (e, action, format) { - XulUtils.clearChildren(e); - var formats = this.app.getFormats().formats; - for (var i = 0; i < formats.length; i++) { - if (formats[i].id == "default" && action.indexOf("export") != -1) { - continue; - } - if (action == "exportTestSuite" && typeof(formats[i].getFormatter().formatSuite) != 'function') { - continue; - } - XulUtils.appendMenuItem(e, { - type: "radio", - name: action + "Formats", - label: formats[i].name, - value: formats[i].id, - checked: (format && format.id == formats[i].id) ? true : null - }); - } -}; - -Editor.prototype.setWebdriverBrowser = function (browser) { - this.getOptions().webDriverBrowserString = browser; - this.updateWebdriverBrowser(browser); -}; - -Editor.prototype.updateWebdriverBrowser = function (browser) { - var class_name = ""; - var tooltip = ""; - if (browser == "firefox") { - class_name = "fx"; - tooltip = "Webdriver playback in Firefox"; - } else if (browser == "chrome") { - class_name = "gc"; - tooltip = "Webdriver playback in Google Chrome"; - } else if (browser == "internet explorer") { - class_name = "ie"; - tooltip = "Webdriver playback in Internet Explorer"; - } else if (browser == "safari") { - class_name = "sa"; - tooltip = "Webdriver playback in Safari"; - } - if ( !this.app.getBooleanOption('executeUsingWebDriver') ) { - tooltip = "Webdriver playback is off. Turn it on in the options."; - } - var btn = document.getElementById("browser-button"); - btn.setAttribute('class', class_name); - btn.setAttribute('tooltiptext', tooltip); -}; - -Editor.prototype.updateViewTabs = function () { - var editorTab = $('editorTab'); - var tabs = $('viewTabs'); - var tableViewUnavailable = $('tableViewUnavailable'); - if (this.app.isPlayable()) { - editorTab.setAttribute("disabled", false); - tableViewUnavailable.setAttribute("hidden", true); - this.toggleView(this.view || this.treeView); - } else { - tabs.selectedIndex = 1; - this.toggleView(this.sourceView); - editorTab.setAttribute("disabled", true); - tableViewUnavailable.setAttribute("hidden", false); - tableViewUnavailable.style.backgroundColor = window.getComputedStyle(tableViewUnavailable.parentNode.parentNode, "").backgroundColor; - } - this.updateState(); -}; - -Editor.prototype.getBaseURL = function () { - return this.app.getBaseURL(); -}; - -Editor.prototype.getTestCase = function () { - return this.app.getTestCase(); -}; - -Editor.prototype.toggleView = function (view) { - this.log.debug("toggle view: testCase=" + this.getTestCase()); - if (this.view != null) { - this.view.onHide(); - } - var previous = this.view; - this.view = view; - if (previous) { - previous.syncModel(true); - } - this.view.testCase = this.getTestCase(); - this.view.refresh(); - //notify app to change the base URL - this.app.notify("baseURLChanged"); -}; - -Editor.prototype.showAlert = function (message) { - this.errorMessage = message; - //window.alert(message); -}; - -/* - * Load default options. - * Used for self-testing Selenium IDE. - */ -Editor.prototype.loadDefaultOptions = function () { - this.app.setOptions(Preferences.DEFAULT_OPTIONS); -}; - -Editor.prototype.loadExtensions = function () { - const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); - if (this.getOptions().ideExtensionsPaths) { - try { - ExtensionsLoader.loadSubScript(subScriptLoader, this.getOptions().ideExtensionsPaths, window); - } catch (error) { - this.health.addException('editor', 'ide-extensions: ' + this.getOptions().ideExtensionsPaths, error); - this.showAlert(Editor.getFormattedString('ide.extensions.failed', [error.toString()])); - } - } - var health = this.health; - var pluginManager = this.pluginManager; - pluginManager.getEnabledIDEExtensions().forEach(function (plugin) { - for (var i = 0; i < plugin.code.length; i++) { - try { - ExtensionsLoader.loadSubScript(subScriptLoader, plugin.code[i], window); - } catch (error) { - health.addException('editor', 'plugin: ' + plugin.id, error); - pluginManager.setPluginError(plugin.id, plugin.code[i], error); - break; - } - } - }); -}; - -Editor.prototype.loadSeleniumAPI = function () { - // load API document - var parser = new DOMParser(); - var document = parser.parseFromString(FileUtils.readURL("chrome://selenium-ide/content/selenium-core/iedoc-core.xml"), "text/xml"); - Command.apiDocuments = new Array(document); - - // load functions - var seleniumAPI = {}; - - const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); - - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js', seleniumAPI); - subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-api-override.js', seleniumAPI); - - // user supplied extensions - if (this.getOptions().userExtensionsURL) { - try { - ExtensionsLoader.loadSubScript(subScriptLoader, this.getOptions().userExtensionsURL, seleniumAPI); - } catch (error) { - this.health.addException('editor', 'user-extensions: ' + this.getOptions().userExtensionsURL, error); - this.showAlert(Editor.getFormattedString('user.extensions.failed', [error.toString()])); - } - } - - var pluginManager = this.pluginManager; - pluginManager.getEnabledUserExtensions().forEach(function (plugin) { - for (var i = 0; i < plugin.code.length; i++) { - try { - var js_url = plugin.code[i].split(";"); - ExtensionsLoader.loadSubScript(subScriptLoader, js_url[0], seleniumAPI); - if (js_url[1] != 'undefined') { - Command.apiDocuments.push(parser.parseFromString(FileUtils.readURL(js_url[1]), "text/xml")); - } - } catch (error) { - pluginManager.setPluginError(plugin.id, plugin.code[i], error); - break; - } - } - }); - - this.seleniumAPI = seleniumAPI; -}; - -Editor.prototype.reload = function () { - try { - this.loadSeleniumAPI(); - this.selDebugger.reInit(); - this.treeView.reloadSeleniumCommands(); - } catch (e) { - alert("error reload: " + e); - } -}; - -Editor.prototype.showReference = function (command) { - if (command.type == 'command') { - var def = command.getDefinition(); - if (def) { - this.infoPanel.switchView(this.infoPanel.helpView); - this.log.debug("showReference: " + def.name); - this.reference.show(def, command); - } - } -}; - -Editor.prototype.showUIReference = function (target) { - if (!Editor.uiMap) { - return; - } - var re = new RegExp('^' + Editor.UI_PREFIX + '='); - if (re.test(target)) { - var uiSpecifierString = target.replace(re, ""); - // trim the offset locator, if any - if (!/\)$/.test(uiSpecifierString)) { - var matches = /^([^\)]+\))(.+)$/.exec(uiSpecifierString); - uiSpecifierString = matches[1]; - } - var pageset = Editor.uiMap.getPageset(uiSpecifierString); - var uiElement = Editor.uiMap.getUIElement(uiSpecifierString); - if (pageset != null && uiElement != null) { - this.infoPanel.switchView(this.infoPanel.uiView); - this.uiReference.show(uiSpecifierString); - } - } -}; - -Editor.prototype.showRollupReference = function (command) { - try { - if (command.isRollup()) { - var rule = Editor.rollupManager.getRollupRule(command.target); - if (rule != null) { - this.infoPanel.switchView(this.infoPanel.rollupView); - this.rollupReference.show(rule, command); - } - } - } catch (e) { - alert('Hoo! ' + e.message); - } -}; - -Editor.prototype.getAutoCompleteSearchParam = function (id) { - var textbox = document.getElementById(id); - if (!this.autoCompleteSearchParams) { - this.autoCompleteSearchParams = {}; - } - if (this.autoCompleteSearchParams[id]) { - return this.autoCompleteSearchParams[id]; - } else { - var param = id + "_"; - for (var i = 0; i < 10; i++) { - param += Math.floor(Math.random() * 36).toString(36); - } - this.autoCompleteSearchParams[id] = param; - textbox.searchParam = param; - return param; - } -}; - -Editor.prototype.cleanupAutoComplete = function () { - if (this.autoCompleteSearchParams) { - for (var id in this.autoCompleteSearchParams) { - Editor.GENERIC_AUTOCOMPLETE.clearCandidates(XulUtils.toXPCOMString(this.autoCompleteSearchParams[id])); - } - } -}; - -Editor.prototype.updateInterval = function (milliseconds) { //Samit: Enh: Support for speed slider from menu - var newpos = this.getInterval() + milliseconds; - if (newpos > this.speedMaxInterval) { - newpos = this.speedMaxInterval; - } - if (newpos < 0) { - newpos = 0; - } - this.setInterval(newpos); -}; - -Editor.prototype.setInterval = function (milliseconds) { - document.getElementById("speedSlider").setAttribute("curpos", milliseconds); -}; - -Editor.prototype.getInterval = function () { - return parseInt(document.getElementById("speedSlider").getAttribute("curpos")); -}; - -Editor.prototype.initMenus = function () { }; - -/* - * A logger that is shown to user. (i.e. not internal log used with this.log) - */ -Editor.prototype.getUserLog = function () { - return this.selDebugger.getLog(); -}; - -Editor.GENERIC_AUTOCOMPLETE = Components.classes["@mozilla.org/autocomplete/search;1?name=selenium-ide-generic"].getService(Components.interfaces.nsISeleniumIDEGenericAutoCompleteSearch); - -// - -function AbstractReference() { }; - -AbstractReference.prototype.load = function (frame) { - var self = this; - this.frame = document.getElementById("helpView"); - this.frame.addEventListener("load", function () { - if (self.selectedDefinition) { - self.doShow(); - } - }, true); -}; - -AbstractReference.prototype.show = function (def, command) { - this.selectedDefinition = def; - this.selectedCommand = command; - this.doShow(); -}; - -// GeneratedReference: reference generated from iedoc.xml - -function GeneratedReference(name) { - this.name = name; -}; - -GeneratedReference.prototype = new AbstractReference; - -GeneratedReference.prototype.doShow = function (frame) { - this.frame.contentDocument.body.innerHTML = - this.selectedDefinition.getReferenceFor(this.selectedCommand); -}; - -// HTMLReference: reference based on single HTML page - -function HTMLReference(name, url) { - this.name = name; - this.url = url; -} - -HTMLReference.prototype = new AbstractReference; - -HTMLReference.prototype.load = function () { - AbstractReference.prototype.load.call(this); - this.frame.setAttribute("src", this.url); -}; - -HTMLReference.prototype.doShow = function () { - var func = this.selectedDefinition.name.replace(/^(get|is)/, "store"); - this.frame.contentWindow.location.hash = func; -}; - -//****************************************************************************** -/** - * A reference object must implement the load() and doShow() methods. Since - * the load() from the AbstractReference prototype is very specific to the - * helpView functionality, we override it here. - */ -function UIReference(name) { - this.name = name; -} - -UIReference.prototype = new AbstractReference; - -UIReference.prototype.load = function () { - var self = this; - this.frame = document.getElementById('uiView'); - this.frame.addEventListener('load', function () { - if (self.selectedDefinition) { - self.doShow(); - } - }, true); -}; - -UIReference.prototype.doShow = function () { - var uiSpecifierString = this.selectedDefinition; - var pageset = Editor.uiMap.getPageset(uiSpecifierString); - var uiElement = Editor.uiMap.getUIElement(uiSpecifierString); - - // name and description - var html = '
    ' - + pageset.name.escapeHTML2() + '::' - + '' - + uiElement.name.escapeHTML2() + '
    ' - + '
    ' - + pageset.description.escapeHTML2().formatAsHTML() + '
    ' - + '
    ' - + uiElement.description.escapeHTML2().formatAsHTML() + '
    ' - + '
    '; - // arguments - for (var i = 0; i < uiElement.args.length; ++i) { - var arg = uiElement.args[i]; - try { - var defaultValues = arg.getDefaultValues(); - var defaultValuesDisplay = defaultValues.slice(0, 5).join(', ').escapeHTML2(); - var defaultValuesHide = defaultValues.slice(5).join(', '); - if (defaultValues.length > 5) { - defaultValuesDisplay += ', ...'; - } - defaultValuesDisplay = '[ ' + defaultValuesDisplay + ' ]'; - } - catch (e) { - defaultValuesDisplay = 'default values dynamically constructed'; - } - html += '
    ' - + arg.name.escapeHTML2() + '
    ' - + '
    ' + arg.description.escapeHTML2().formatAsHTML() + '
    ' - + '
    ' - + defaultValuesDisplay + '
    '; - } - html += '
    '; - html += '
    ' - + 'current specifier maps to locator:
    '; - html += '
    ' - + Editor.uiMap.getLocator(uiSpecifierString).escapeHTML2().replace(/undefined/g, 'undefined') - + '
    '; - var uiView = document.getElementById('uiView'); - uiView.contentDocument.body.innerHTML = html; -}; - -function RollupReference(name) { - this.name = name; -} - -RollupReference.prototype = new AbstractReference; - -RollupReference.prototype.load = function () { - var self = this; - this.frame = document.getElementById('rollupView'); - this.frame.addEventListener('load', function () { - if (self.selectedDefinition) { - self.doShow(); - } - }, true); -}; - -RollupReference.prototype.doShow = function () { - var rule = this.selectedDefinition; - var command = this.selectedCommand; - - // name and description - var html = '
    ' - + rule.name.escapeHTML2() + '
    ' - + '
    ' - + rule.description.escapeHTML2().formatAsHTML() + '
    ' - + '
    preconditions: ' - + '' - + rule.pre.escapeHTML2().formatAsHTML() + '
    ' - + '
    postconditions: ' - + '' - + rule.post.escapeHTML2().formatAsHTML() + '
    ' - + '
    '; - // arguments - for (i = 0; i < rule.args.length; ++i) { - var arg = rule.args[i]; - var exampleValues = arg.exampleValues || []; - var exampleValuesDisplay = exampleValues.slice(0, 5).join(', ').escapeHTML2(); - var exampleValuesHide = exampleValues.slice(5).join(', '); - if (exampleValues.length > 5) { - exampleValuesDisplay += ', ...'; - } - exampleValuesDisplay = '[ ' + exampleValuesDisplay + ' ]'; - html += '
    ' - + arg.name.escapeHTML2() + '
    ' - + '
    ' + arg.description.escapeHTML2().formatAsHTML() + '
    ' - + '
    ' - + exampleValuesDisplay + '
    '; - } - html += '
    '; - html += '
    current rollup expands to:
    ' - var expandedCommands = rule.getExpandedCommands(command.value); - for (var i = 0; i < expandedCommands.length; ++i) { - html += '
    ' - + expandedCommands[i].toString().escapeHTML2().replace(/undefined/g, 'undefined') - + '
    '; - } - html += '
    '; - - var rollupView = document.getElementById('rollupView'); - rollupView.contentDocument.body.innerHTML = html; -}; - -//****************************************************************************** - -Editor.references = []; - -Editor.prototype.selectDefaultReference = function () { - this.reference = Editor.references[0]; - this.reference.load(); - this.uiReference = Editor.references[2]; - this.uiReference.load(); - this.rollupReference = Editor.references[3]; - this.rollupReference.load(); -}; - -Editor.references.push(new GeneratedReference("Generated")); -Editor.references.push(new HTMLReference("Internal HTML", "chrome://selenium-ide/content/selenium-core/reference.html")); -Editor.references.push(new UIReference('UI-Element')); -Editor.references.push(new RollupReference('Rollup')); -//Editor.references.push(new HTMLReference("Japanese", "Reference HTML contained in Selenium IDE", "http://wiki.openqa.org/display/SEL/Selenium+0.7+Reference+%28Japanese%29")); - -/* - * InfoPanel - */ - -Editor.InfoPanel = function (editor) { - this.logView = new Editor.LogView(this, editor); - this.helpView = new Editor.HelpView(this); - this.uiView = new Editor.UIView(this); - this.rollupView = new Editor.RollupView(this); - this.currentView = this.logView; -}; - -Editor.InfoPanel.prototype.switchView = function (view) { - if (this.currentView == view) { - return; - } - this.currentView.hide(); - view.show(); - this.currentView = view; -}; - -/* - * InfoView - */ - -Editor.InfoView = function () { }; - -Editor.InfoView.prototype.show = function () { - document.getElementById(this.name + "View").style.display = "block"; - document.getElementById(this.name + "Tab").setAttribute("selected", "true"); -}; - -Editor.InfoView.prototype.hide = function () { - document.getElementById(this.name + "Tab").removeAttribute("selected"); - document.getElementById(this.name + "View").style.display = "none"; -}; - -/* - * LogView - */ - -Editor.LogView = function (panel, editor) { - this.name = "log"; - this.changeLogLevel("1"); // INFO - this.view = document.getElementById("logView"); - this.panel = panel; - //this.log = editor.selDebugger.runner.LOG; - //this.log.observers.push(this.infoPanel.logView); - var self = this; - this.view.addEventListener("load", function () { - self.reload() - }, true); -}; - -Editor.LogView.prototype = new Editor.InfoView; - -Editor.LogView.prototype.show = function () { - Editor.InfoView.prototype.show.call(this); - document.getElementById("logButtons").style.display = "flex"; -}; - -Editor.LogView.prototype.hide = function () { - Editor.InfoView.prototype.hide.call(this); - document.getElementById("logButtons").style.display = "none"; -} ; - -Editor.LogView.prototype.setLog = function (log) { - this.log = log; - log.observers.push(this); -}; - -Editor.LogView.prototype.changeLogLevel = function (level, reload) { - var filterElement = document.getElementById("logFilter"); - var popup = document.getElementById("logFilterPopup"); - this.filterValue = level; - for (var i = 0; i < popup.childNodes.length; i++) { - var node = popup.childNodes[i]; - if (level == node.value) { - filterElement.label = node.label; - break; - } - } - - if (reload) { - this.reload(); - } -}; - -Editor.LogView.prototype.getLogElement = function () { - return this.view.contentDocument.getElementById("log"); -}; - -Editor.LogView.prototype.isHidden = function () { - return this.view.hidden || this.getLogElement() == null; -}; - -Editor.LogView.prototype.clear = function () { - if (!this.isHidden() && this.log) { - this.log.clear(); - } -}; - -Editor.LogView.prototype.onClear = function () { - if (!this.isHidden()) { - var nodes = this.getLogElement().childNodes; - var i; - for (i = nodes.length - 1; i >= 0; i--) { - this.getLogElement().removeChild(nodes[i]); - } - } -}; - -Editor.LogView.prototype.reload = function () { - if (!this.isHidden() && this.log) { - var self = this; - this.onClear(); - this.log.entries.forEach(function (entry) { - self.onAppendEntry(entry); - }); - } -}; - -Editor.LogView.prototype.onAppendEntry = function (entry) { - var levels = {debug: 0, info: 1, warn: 2, error: 3}; - var entryValue = levels[entry.level]; - var filterValue = parseInt(this.filterValue); - if (filterValue <= entryValue) { - //Samit: Fix: If another pane is active, the entry is lost - if (this.isHidden()) { - this.panel.switchView(this); - } - var newEntry = this.view.contentDocument.createElement('li'); - newEntry.className = entry.level; - newEntry.appendChild(this.view.contentDocument.createTextNode(entry.line())); - this.getLogElement().appendChild(newEntry); - newEntry.scrollIntoView(); - } -}; - -/* - * HelpView - */ - -Editor.HelpView = function () { - this.name = "help"; -}; - -Editor.HelpView.prototype = new Editor.InfoView; - -Editor.UIView = function () { - this.name = 'ui'; -}; - -Editor.UIView.prototype = new Editor.InfoView; - -Editor.RollupView = function () { - this.name = 'rollup'; -}; - -Editor.RollupView.prototype = new Editor.InfoView; - -/* - * LastWindow is is a safe way to keep the last window information to avoid the dead object - * error in Firefox - */ -function LastWindow() { - this.window = null; - this.path = []; -} - -LastWindow.prototype.setWindow = function (window) { - if (this.window != window) { - this.window = window; - this.parent = window.parent; - this.name = window.name; - this.isTopLevel = window == window.parent; - this.topName = window.top.name; - this.path = this.createPath(window); - } -}; - -LastWindow.prototype.windowEquals = function (window) { - if (this.window == null || window == null) { - return false; - } - return window == this.window; -}; - -LastWindow.prototype.isSameWindow = function (window) { - if (this.window == null || window == null) { - return false; - } - if (this.isTopLevel && window == window.parent) { - // top level window - return this.name == window.name; - } else if (this.parent == window.parent) { - // frame - return this.name == window.name; - } - return false; -}; - -LastWindow.prototype.isSameTopWindow = function (window) { - if (this.window == null || window == null) { - return false; - } - if (this.isTopLevel && window.top == window.top.parent) { - // top level window - return this.topName == window.top.name; - } - return false; -}; - -LastWindow.prototype.getPath = function () { - return this.path; -}; - -// create the path represented as an array from top level window to the specified frame -LastWindow.prototype.createPath = function (window) { - var path = []; - var lastWindow = null; - while (window != lastWindow) { - path.unshift(window); - lastWindow = window; - window = lastWindow.parent; - } - return path; -}; diff --git a/ide/main/src/content/file-utils.js b/ide/main/src/content/file-utils.js deleted file mode 100644 index d78baec33e507..0000000000000 --- a/ide/main/src/content/file-utils.js +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var FileUtils = { - getProfileDir: function() { - return Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("ProfD", Components.interfaces.nsILocalFile); - }, - - getTempDir: function() { - return Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsILocalFile); - }, - - getFile: function(path) { - var file = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile); - file.initWithPath(path); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - file.append(arguments[i]); - } - } - return file; - }, - - fileExists: function(path) { - return path !== null && path.length > 0 && this.getFile(path).exists(); - }, - - createFolder: function(folder) { - if (folder && !folder.exists()) { - folder.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755); - } - return folder; - }, - - getSeleniumIDEFolder: function(relativePath, create) { - var folder = this.getProfileDir(); - folder.append("selenium-ide"); - if (relativePath) { - folder.appendRelativePath(relativePath); - } - return create ? this.createFolder(folder) : folder; - }, - - getStoredFile: function(relativePath, prefix, suffix) { - var folder = this.getSeleniumIDEFolder(relativePath, true); - var filename = (prefix || '') + (suffix || ''); - if (filename.length > 0) { - folder.append(filename); - } - return folder; - }, - - _pad2: function(num) { - return num < 10 ? '0' + num : num; - }, - - getTimeStamp: function() { - var d = new Date(); - return d.getFullYear() + - '-' + this._pad2( d.getMonth() + 1 ) + - '-' + this._pad2( d.getDate() ) + - '_' + this._pad2( d.getHours() ) + - '-' + this._pad2( d.getMinutes() ) + - '-' + this._pad2( d.getSeconds() ); - }, - - getStoredTimeStampedFile: function(relativePath, prefix, suffix) { - return this.getStoredFile(relativePath, (prefix || '') + this.getTimeStamp(), suffix); - }, - - getUnicodeConverter: function(encoding) { - var unicodeConverter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter); - try { - unicodeConverter.charset = encoding; - } catch (error) { - throw "setting encoding failed: " + encoding; - } - return unicodeConverter; - }, - - openFileOutputStream: function(file) { - var stream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream); - stream.init(file, 0x02 | 0x08 | 0x20, 420, 0); - return stream; - }, - - openUTF8FileOutputStream: function(file) { - var converter = Components.classes["@mozilla.org/intl/converter-output-stream;1"].createInstance(Components.interfaces.nsIConverterOutputStream); - converter.init(this.openFileOutputStream(file), "UTF-8", 0, 0); - return converter; - }, - - writeUTF8nsIFile: function(file, data) { - this.createFolder(file.parent); - var converter = this.openUTF8FileOutputStream(file); - converter.writeString(data); - converter.close(); - return file.path; - }, - - writeUTF8File: function(filename, data) { - return this.writeUTF8nsIFile(this.getFile(filename), data); - }, - - writeStoredFile: function(filename, data) { - //StoredFiles are stored in the selenium ide folder under the Firefox profile - return this.writeUTF8nsIFile(this.getSeleniumIDEFolder(filename), data); - }, - - writeJSONStoredFile: function(filename, data) { - //StoredFiles are stored in the selenium ide folder under the Firefox profile - return this.writeStoredFile(filename, JSON.stringify(data)); - }, - - openURLInputStream: function(url) { - const ioService = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService); - var stream = ioService.newChannelFromURI(ioService.newURI(url, null, null)).open(); - var sis = Components.classes['@mozilla.org/scriptableinputstream;1'].createInstance(Components.interfaces.nsIScriptableInputStream); - sis.init(stream); - return sis; - }, - - readURL: function(url) { - var stream = this.openURLInputStream(url); - var content = stream.read(stream.available()); - stream.close(); - return content; - }, - - openFileInputStream: function(file) { - var stream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream); - stream.init(file, 0x01, 00004, 0); - var sis = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream); - sis.init(stream); - return sis; - }, - - readFile: function(file) { - var stream = this.openFileInputStream(file); - var content = stream.read(stream.available()); - stream.close(); - return content; - }, - - readStoredFile: function(filename, defaultData) { - //StoredFiles are stored in the selenium ide folder under the Firefox profile - var file = this.getSeleniumIDEFolder(filename); - if (file.exists()) { - var conv = this.getUnicodeConverter("UTF-8"); - return conv.ConvertToUnicode(this.readFile(file)); - } - return defaultData; - }, - - readJSONStoredFile: function(filename, defaultData) { - //StoredFiles are stored in the selenium ide folder under the Firefox profile - var data = this.readStoredFile(filename); - return data ? JSON.parse(data) : defaultData; - }, - - fileURI: function(file) { - return Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService). - newFileURI(file).spec; - }, - - getSafeFilename: function(filename) { - return filename ? filename.replace(/[^ _~,.0-9A-Za-z-]/g, '-') : ''; - }, - - splitPath: function(file) { - var max = 100; - var result = []; - var i = 0; - while (i < max && file && - file.path != "/" && - !file.path.match(/^[a-z]:$/i)) { - result.unshift(file.leafName); - if ("." == file.leafName || ".." == file.leafName) { - break; - } - file = file.parent; - i++; - } - return result; - }, - - //Samit: Enh: Guess the file separator - getFileSeperator: function(localFile) { - if (Components.interfaces.nsILocalFileWin && localFile instanceof Components.interfaces.nsILocalFileWin) { - return '\\'; - } - return '/'; - }, - - //Samit: Enh: Work around the nsILocalFile.appendRelativePath() restriction of not being able to use relative paths with ".." and "." - appendRelativePath: function(file, relativePath) { - var up = 0; - var cleanPath = []; - var fileSep = this.getFileSeperator(file); - var relPath = relativePath.split(fileSep); - while (relPath.length > 0) { - var f = relPath.shift(); - if (f == '..') { - if (cleanPath.length > 0) { - cleanPath.pop(); - }else { - up++; - } - }else if (f != '.') { - cleanPath.push(f); - } - } - while (up-- > 0 && file.parent) { - - file = file.parent; - } - var mergedFile = this.getFile(file.path); - mergedFile.appendRelativePath(cleanPath.join(fileSep)); - return mergedFile; - } -}; diff --git a/ide/main/src/content/format-source-dialog.js b/ide/main/src/content/format-source-dialog.js deleted file mode 100644 index 852330065a7d6..0000000000000 --- a/ide/main/src/content/format-source-dialog.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function loadDialog() { - this.formatInfo = window.arguments[0]; - document.getElementById('format-name').value = this.formatInfo.name; - var sourceTextbox = document.getElementById('format-source'); - sourceTextbox.value = this.formatInfo.getSource(); - if (!this.formatInfo.saveFormat) { - // preset format - sourceTextbox.setAttribute("readonly","true"); - document.getElementById("note").hidden = false; - }else{ - sourceTextbox.removeAttribute("readonly"); - var saveLabel = document.getElementById("strings").getString('format.save.label'); - document.documentElement.getButton("accept").setAttribute("label",saveLabel); - } - if (!this.formatInfo.id) { - // new format - document.getElementById("name-box").hidden = false; - } -} - -function saveDialog() { - if (!this.formatInfo.id) { - var name = document.getElementById('format-name').value; - if (name.length > 0) { - this.formatInfo.name = name; - } else { - window.alert("Please specify a name"); - return false; - } - } - //only save an editable formatx - if (this.formatInfo.saveFormat){ - this.formatInfo.saveFormat(document.getElementById('format-source').value); - this.formatInfo.saved = true; - return true; - } - return false; - -} diff --git a/ide/main/src/content/format-source-dialog.xul b/ide/main/src/content/format-source-dialog.xul deleted file mode 100644 index 5fe0586e4f077..0000000000000 --- a/ide/main/src/content/format-source-dialog.xul +++ /dev/null @@ -1,40 +0,0 @@ - - - - - '); -})(); diff --git a/ide/main/src/content/selenium-core/scripts/user-extensions.js b/ide/main/src/content/selenium-core/scripts/user-extensions.js deleted file mode 100644 index bcc36939dbd74..0000000000000 --- a/ide/main/src/content/selenium-core/scripts/user-extensions.js +++ /dev/null @@ -1,61 +0,0 @@ -document.write(''); -document.write(''); - -SeleniumTestResult.prototype.originalPost = SeleniumTestResult.prototype.post; - -SeleniumTestResult.prototype.post = function() { - var editor = SeleniumIDE.Loader.getTopEditor(); - if (editor && editor.testRunnerResultCallback) { - editor.testRunnerResultCallback(this, window); - } else { - this.originalPost(); - } -}; - -HtmlTestRunnerControlPanel.prototype.getBaseUrl = function() { - // it is recommended to use baseUrl, but for backward compatibility we also accept baseURL - return URLConfiguration.prototype.getBaseUrl.call(this) || this._getQueryParameter("baseURL"); -}; - -var TestRunnerConfig = Class.create(); -Object.extend(TestRunnerConfig.prototype, URLConfiguration.prototype); -Object.extend(TestRunnerConfig.prototype, { - initialize: function() { - this.queryString = location.search.substr(1); - this.userExtensionsURL = this._getQueryParameter("userExtensionsURL"); - } - }); - -var testRunnerConfig = new TestRunnerConfig(); - -if (testRunnerConfig.userExtensionsURL) { - var urls = testRunnerConfig.userExtensionsURL.split(/,/); - for (var i = 0; i < urls.length; i++) { - var url = urls[i]; - document.write(''); - } -} - -HtmlTestSuiteFrame.prototype._setLocation = -HtmlTestFrame.prototype._setLocation = -SeleniumFrame.prototype._setLocation = function(location) { - // Using frame.src because location.replace fails in Firefox 3 chrome - var isChrome = browserVersion.isChrome || false; - var isHTA = browserVersion.isHTA || false; - location += (location.indexOf("?") == -1 ? "?" : "&"); - location += "thisIsChrome=" + isChrome + "&thisIsHTA=" + isHTA; - this.frame.src = location; -}; - -MozillaBrowserBot.prototype.modifyWindowToRecordPopUpDialogsWithoutRecorder = MozillaBrowserBot.prototype.modifyWindowToRecordPopUpDialogs; - -MozillaBrowserBot.prototype.modifyWindowToRecordPopUpDialogs = function(windowToModify, browserBot) { - this.modifyWindowToRecordPopUpDialogsWithoutRecorder(windowToModify, browserBot); - - // modifyWindowToRecordPopUpDialogs may overwrite functions registered by the recorder, - // so we are registering them again here - var recorder = SeleniumIDE.Loader.getRecorder(windowToModify); - if (recorder) { - recorder.reattachWindowMethods(); - } -}; diff --git a/ide/main/src/content/selenium-ide-common.xul b/ide/main/src/content/selenium-ide-common.xul deleted file mode 100644 index aa2aea054c80e..0000000000000 --- a/ide/main/src/content/selenium-ide-common.xul +++ /dev/null @@ -1,353 +0,0 @@ - - - - -%browserDTD; - -%baseMenuOverlayDTD; - -%seleniumIdeDTD; -]> - - '); -})(); diff --git a/ide/main/src/content/sidebar-editor.js b/ide/main/src/content/sidebar-editor.js deleted file mode 100644 index f445614b0e9d8..0000000000000 --- a/ide/main/src/content/sidebar-editor.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2008 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Sidebar UI of Selenium IDE. - */ - -function SidebarEditor(window) { - Editor.call(this, window); -} - -objectExtend(SidebarEditor.prototype, Editor.prototype); - -SidebarEditor.prototype.registerRecorder = function() { - Recorder.registerForWindow(window.parent, this); -} - -SidebarEditor.prototype.deregisterRecorder = function() { - Recorder.deregisterForWindow(window.parent, this); -} - -SidebarEditor.prototype.initMenus = function() { - $('closeMenuSeparator').style.display = "none"; - $('closeMenuItem').style.display = "none"; -} - -SidebarEditor.prototype.isSidebar = function() { - return true; -} diff --git a/ide/main/src/content/sourceView.js b/ide/main/src/content/sourceView.js deleted file mode 100644 index e4f404e60dac0..0000000000000 --- a/ide/main/src/content/sourceView.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function SourceView(editor, textbox) { - this.log = new Log("SourceView"); - this.textbox = textbox; - this.editor = editor; -} - -SourceView.prototype = { - scrollToRow: function(index) { - // TODO - }, - rowInserted: function(rowIndex) { - this.updateView(); - if (this.editor.app.getCurrentFormat().getFormatter().playable) { - this.textbox.setSelectionRange(this.lastValue.length, this.lastValue.length); - this.textbox.inputField.scrollTop = this.textbox.inputField.scrollHeight - this.textbox.inputField.clientHeight; - } else { - var insertedCommand = this.testCase.commands[rowIndex]; - var index = insertedCommand.charIndex + insertedCommand.line.length + 1; - this.textbox.setSelectionRange(index, index); - this.scrollToCursorPosition(); - /* - var value = this.lastValue; - var lineno = 0; - var index = 0; - while (true) { - if (lineno == rowIndex + 1) { - this.textbox.setSelectionRange(index, index); - break; - } - index = value.indexOf("\n", index); - if (index < 0) break; - index++; - lineno++; - }*/ - } - }, - scrollToCursorPosition: function() { - var start = this.textbox.selectionStart; - var lines = this.textbox.value.split(/\n/).length + 1; - var offset = this.textbox.value.substring(0, start).split(/\n/).length; - var yPos = this.textbox.inputField.scrollHeight * offset / lines; - var lineHeight = this.textbox.inputField.scrollHeight / lines; - var scrollTop = this.textbox.inputField.scrollTop; - if (yPos < scrollTop) { - this.textbox.inputField.scrollTop = yPos; - } else if (scrollTop + this.textbox.inputField.clientHeight - lineHeight < yPos) { - this.textbox.inputField.scrollTop = yPos + this.textbox.inputField.clientHeight - lineHeight; - } - }, - rowUpdated: function(index) { - this.updateView(); - }, - refresh: function() { - this.updateView(); - }, - // synchronize model from view - syncModel: function(force) { - if ((force || this.editor.view == this) && this.lastValue != this.textbox.value) { - this.editor.app.getCurrentFormat().setSource(this.testCase, this.textbox.value); - } else { - this.editor.app.getTestCase().edited = false; - } - }, - onHide: function() { - }, - getRecordIndex: function() { - if (this.editor.app.getCurrentFormat().getFormatter().playable) { - return this.testCase.commands.length; - } else { - return this.testCase.getCommandIndexByTextIndex(this.lastValue, this.textbox.selectionStart, this.editor.app.getCurrentFormat().getFormatter()); - } - } -}; - -SourceView.prototype.countNewLine = function(value, cursor) { - if (cursor != null) { - value = value.substring(0, cursor); - } - return value.split(/\n/).length; -} - -SourceView.prototype.updateView = function() { - this.log.debug("updateView: testCase=" + this.testCase); - var scrollTop = this.textbox.inputField.scrollTop; - //this.textbox.value = this.testCase.getSource(this.editor.options, "New Test"); - this.textbox.value = this.lastValue = this.editor.app.getCurrentFormat().getSourceForTestCase(this.testCase); - this.textbox.inputField.scrollTop = scrollTop; - - //reinitialize the "edited" attribute of the testcase for - //a good synchronization - this.editor.app.getTestCase().edited = false; -} diff --git a/ide/main/src/content/standalone-editor.js b/ide/main/src/content/standalone-editor.js deleted file mode 100644 index 6879621659b67..0000000000000 --- a/ide/main/src/content/standalone-editor.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2008 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Standalone UI of Selenium IDE. - */ - -function StandaloneEditor(window) { - Editor.call(this, window); -} - -objectExtend(StandaloneEditor.prototype, Editor.prototype); - -StandaloneEditor.prototype.registerRecorder = function() { - Recorder.registerAll(this); -} - -StandaloneEditor.prototype.deregisterRecorder = function() { - Recorder.deregisterAll(this); -} - -SidebarEditor.prototype.isSidebar = function() { - return false; -} diff --git a/ide/main/src/content/storedHistory.js b/ide/main/src/content/storedHistory.js deleted file mode 100644 index c78aea5358f62..0000000000000 --- a/ide/main/src/content/storedHistory.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2008 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function StoredHistory(id, max) { - this.id = id; - this.max = max || 5; -} - -StoredHistory.prototype = { - clear: function() { - Preferences.setArray(this.id, []); - }, - - list: function() { - return Preferences.getArray(this.id); - }, - - add: function(item) { - if (item.trim().length == 0) return; - var list = this.list(); - list.delete(item); - list.unshift(item); - if (list.length > this.max) { - list.pop(); - } - Preferences.setArray(this.id, list); - }, - - mapMenuItem: function(callback) { - var list = this.list(); - for (var i = 0; i < list.length; i++) { - var file = FileUtils.getFile(list[i]); - shortenPath(file); - callback.call(this, { - label: shortenPath(file), - value: file.path - }); - } - - function shortenPath(file) { - var nodes = FileUtils.splitPath(file.parent); - if (nodes.length > 2) { - nodes.splice(0, nodes.length - 2); - nodes.unshift("..."); - } - return file.leafName + " [" + nodes.join("/") + "]"; - } - }, - - populateMenu: function(e) { - XulUtils.clearChildren(e); - this.mapMenuItem(function(item) { - XulUtils.appendMenuItem(e, item); - }); - } -} diff --git a/ide/main/src/content/suiteTreeView.js b/ide/main/src/content/suiteTreeView.js deleted file mode 100644 index 73b1669ad852b..0000000000000 --- a/ide/main/src/content/suiteTreeView.js +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var SuiteTreeView = classCreate(); -objectExtend(SuiteTreeView.prototype, XulUtils.TreeViewHelper.prototype); -objectExtend(SuiteTreeView.prototype, { - initialize: function(editor, tree) { - this.log = new Log("SuiteTreeView"); - XulUtils.TreeViewHelper.prototype.initialize.call(this, tree); - this.editor = editor; - this.rowCount = 0; - this.currentTestCaseIndex = -1; - this.clickedTestCaseIndex = -1; - var self = this; - tree.addEventListener("dblclick", function(event) { - var testCase = self.getSelectedTestCase(); - if (testCase) editor.app.showTestCaseFromSuite(testCase); - }, false); - tree.addEventListener("mousedown", function(event) { - if (event.button == 2) { - self.clickedTestCaseIndex = tree.treeBoxObject.getRowAt(event.clientX, event.clientY); - } - }, false); - editor.app.addObserver({ - _testCaseObserver: { - modifiedStateUpdated: function() { - self.treebox.invalidateRow(self.currentTestCaseIndex); - } - }, - - _testSuiteObserver: { - testCaseAdded: function() { - self.refresh(); - }, - testCaseRemoved: function() { - self.refresh(); - }, - //Samit: Fix: Update correctly when test cases are moved - testCaseMoved: function(testCase, fromIndex, toIndex) { - var start = fromIndex; - var end = toIndex; - if (start > end) { - start = toIndex; - end = fromIndex; - } - //Handle moves where position of the current test case is affected - if (self.currentTestCaseIndex >= start && self.currentTestCaseIndex <= end) { - var tests = self.getTestSuite().tests; - for (var i = start; i <= end; i++) { - if (tests[i].content && tests[i].content == self.currentTestCase) { - self.currentTestCaseIndex = i; - break; - } - } - } - self.rowsUpdated(start, end); - } - }, - - testCaseChanged: function(testCase) { - testCase.addObserver(this._testCaseObserver); - var tests = self.getTestSuite().tests; - for (var i = 0; i < tests.length; i++) { - if (tests[i].content && tests[i].content == testCase) { - self.currentTestCase = testCase; - self.currentTestCaseIndex = i; - self.rowUpdated(self.currentTestCaseIndex); - self.log.debug("testCaseLoaded: i=" + i); - break; - } - } - //self.refresh(); - }, - - testCaseUnloaded: function(testCase) { - testCase.removeObserver(this._testCaseObserver); - var index = self.currentTestCaseIndex; - self.currentTestCaseIndex = -1; - if (index >= 0) { - self.rowUpdated(index); - } - }, - - testSuiteChanged: function(testSuite) { - testSuite.addObserver(this._testSuiteObserver); - }, - - testSuiteUnloaded: function(testSuite) { - testSuite.removeObserver(this._testSuiteObserver); - } - }); - var controller = { - supportsCommand : function(cmd) { - switch (cmd) { - case "cmd_delete": - case "cmd_delete_suite": - case "cmd_play_suite_from_here": - return true; - default: - return false; - } - }, - isCommandEnabled : function(cmd){ - self.log.debug("isCommandEnabled " + cmd); - switch (cmd) { - case "cmd_delete": - case "cmd_delete_suite": - return self.selection.getRangeCount() > 0; - case "cmd_play_suite_from_here": - return self.clickedTestCaseIndex >= 0 && self.editor.app.isPlayable() && self.editor.selDebugger.state != Debugger.PLAYING; - default: - return false; - } - }, - doCommand : function(cmd) { - switch (cmd) { - case "cmd_delete": - case "cmd_delete_suite": - self.deleteSelected(); break; - case "cmd_play_suite_from_here": - if (self.clickedTestCaseIndex >= 0) { - self.editor.playTestSuite(self.clickedTestCaseIndex); - } - break; - } - }, - onEvent : function(evt) {} - }; - tree.controllers.appendController(controller); - }, - - getSelectedTestCase: function() { - return this.getTestSuite().tests[this.tree.currentIndex]; - }, - - getCurrentTestCase: function() { - return this.getTestSuite().tests[this.currentTestCaseIndex]; - }, - - getTestSuite: function() { - return this.editor.app.getTestSuite(); - }, - - refresh: function() { - this.log.debug("refresh: old rowCount=" + this.rowCount); - var length = this.getTestSuite().tests.length; - this.treebox.rowCountChanged(0, -this.rowCount); - this.treebox.rowCountChanged(0, length); - this.rowCount = length; - this.log.debug("refresh: new rowCount=" + this.rowCount); - }, - - currentRowUpdated: function() { - this.rowUpdated(this.currentTestCaseIndex); - }, - - editProperties: function() { - var testCase = this.getSelectedTestCase(); - var self = this; - if (testCase) { - window.openDialog('chrome://selenium-ide/content/testCaseProperties.xul', 'testCaseProperties', 'chrome,modal', testCase, function() { - self.treebox.invalidateRow(self.currentTestCaseIndex); - }); - } - }, - - deleteSelected: function() { - this.getTestSuite().remove(this.getSelectedTestCase()); - }, - - // - // nsITreeView interfaces - // - getCellText : function(row, column){ - var testCase = this.getTestSuite().tests[row]; - var text = testCase.getTitle(); - if (testCase.content && testCase.content.modified) { - text += " *"; - } - return text; - }, - getRowProperties: function(row, props) { - if (this.selection.isSelected(row)) return; - var testCase = this.getTestSuite().tests[row]; - if (testCase.testResult && testCase.testResult.summary) { - if (testCase.testResult.summary == 'passed') { - return XulUtils.setProperty(props, "commandPassed"); - } else if (testCase.testResult.summary == 'failed') { - return XulUtils.setProperty(props, "commandFailed"); - } - } - }, - getCellProperties: function(row, col, props) { - if (row == this.currentTestCaseIndex) { - return XulUtils.setProperty(props, "currentTestCase"); - } - }, - - getParentIndex: function(index){return -1;}, - - getSourceIndexFromDrag: function () { - try{ - var dragService = Cc["@mozilla.org/widget/dragservice;1"]. - getService().QueryInterface(Ci.nsIDragService); - var dragSession = dragService.getCurrentSession(); - var transfer = Cc["@mozilla.org/widget/transferable;1"]. - createInstance(Ci.nsITransferable); - - transfer.addDataFlavor("text/unicode"); - dragSession.getData(transfer, 0); - - var dataObj = {}; - var len = {}; - var sourceIndex = -1; - var out = {}; - - transfer.getAnyTransferData(out, dataObj, len); - - if (dataObj.value) { - sourceIndex = dataObj.value.QueryInterface(Ci.nsISupportsString).data; - sourceIndex = parseInt(sourceIndex.substring(0, len.value)); - } - - var start = new Object(); - var end = new Object(); - var numRanges = this.selection.getRangeCount(); - var n = 0; - for (var t = 0; t < numRanges && n <=1; t++){ - this.selection.getRangeAt(t,start,end); - for (var v = start.value; v <= end.value && n <=1; v++){ - n++; - } - } - sourceIndex = n > 1 ? -1 : sourceIndex; - - return sourceIndex; - - }catch(e){ - new Log("DND").error("getSourceIndexFromDrag error: "+e); - } - }, - - canDrop: function(targetIndex, orientation) { - var sourceIndex = this.getSourceIndexFromDrag(); - - return (sourceIndex != -1 && - sourceIndex != targetIndex && - sourceIndex != (targetIndex + orientation)); - }, - - drop: function(dropIndex, orientation) { - try{ - var sourceIndex = this.getSourceIndexFromDrag(); - - if (sourceIndex != -1){ - - if (dropIndex > sourceIndex) { - if (orientation == Ci.nsITreeView.DROP_BEFORE) - dropIndex--; - }else{ - if (orientation == Ci.nsITreeView.DROP_AFTER) - dropIndex++; - } - - //Samit: Ref: Move is now part of the testSuite - this.getTestSuite().move(sourceIndex, dropIndex); - - this.selection.clearSelection(); - this.selection.select(dropIndex); - } - }catch(e){ - new Log("DND").error("drop error : "+e); - } - } - }); diff --git a/ide/main/src/content/testCase.js b/ide/main/src/content/testCase.js deleted file mode 100644 index ec64012d20ec7..0000000000000 --- a/ide/main/src/content/testCase.js +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function Command(command, target, value) { - this.command = command != null ? command : ''; - if (target != null && target instanceof Array) { - if (target[0]) { - this.target = target[0][0]; - this.targetCandidates = target; - } else { - this.target = "LOCATOR_DETECTION_FAILED"; - } - } else { - this.target = target != null ? target : ''; - } - this.value = value != null ? value : ''; -} - -Command.prototype.createCopy = function() { - var copy = new Command(); - for (prop in this) { - copy[prop] = this[prop]; - } - return copy; -}; - -Command.prototype.getRealValue = function() { - if (this.value) { - return this.value; - } else { - return this.target; - } -} - -Command.prototype.getRealTarget = function() { - if (this.value) { - return this.target; - } else { - return null; - } -} - -Command.innerHTML = function(element) { - var html = ""; - var nodes = element.childNodes; - for (var i = 0; i < nodes.length; i++) { - var node = nodes.item(i); - switch (node.nodeType) { - case 1: // ELEMENT_NODE - html += "<" + node.nodeName + ">"; - html += this.innerHTML(node); - html += ""; - break; - case 3: // TEXT_NODE - html += node.data; - break; - } - } - return html; -} - -Command.loadAPI = function() { - if (!this.functions) { - var document; - var documents = this.apiDocuments; - var functions = {}; - // document.length will be 1 by default, but will grow with plugins - for (var d = 0; d < documents.length; d++) { - // set the current document. again, by default this is the iedoc-core.xml - document = documents[d]; - - // - // description - // description -- optional - // description -- optional - // description for ide here - // - var functionElements = document.documentElement.getElementsByTagName("function"); - for (var i = 0; i < functionElements.length; i++) { - var element = functionElements.item(i); - var def = new CommandDefinition(String(element.attributes.getNamedItem('name').value)); - - var returns = element.getElementsByTagName("return"); - if (returns.length > 0) { - var returnType = new String(returns.item(0).attributes.getNamedItem("type").value); - returnType = returnType.replace(/string/, "String"); - returnType = returnType.replace(/number/, "Number"); - def.returnType = returnType; - def.returnDescription = this.innerHTML(returns.item(0)); - } - - var comments = element.getElementsByTagName("comment"); - if (comments.length > 0) { - def.comment = this.innerHTML(comments.item(0)); - } - - var alternatives = element.getElementsByTagName("alternatives"); - if (alternatives.length > 0) { - def.alternatives = this.innerHTML(alternatives.item(0)); - } - var deprecated = element.getElementsByTagName("deprecated"); - if (deprecated.length > 0) { - def.deprecated = this.innerHTML(deprecated.item(0)); - if (def.deprecated.length == 0 && def.alternatives) { - def.deprecated = "Use the ${alternatives} command instead."; - } - } - - var params = element.getElementsByTagName("param"); - for (var j = 0; j < params.length; j++) { - var paramElement = params.item(j); - var param = {}; - param.name = String(paramElement.attributes.getNamedItem('name').value); - param.description = this.innerHTML(paramElement); - def.params.push(param); - } - - functions[def.name] = def; - - // generate negative accessors - if (def.name.match(/^(is|get)/)) { - def.isAccessor = true; - functions["!" + def.name] = def.negativeAccessor(); - } - if (def.name.match(/^assert/)) { // only assertSelected should match - var verifyDef = new CommandDefinition(def.name); - verifyDef.params = def.params; - functions["verify" + def.name.substring(6)] = verifyDef; - } - } - } - functions['assertFailureOnNext'] = new CommandDefinition('assertFailureOnNext'); - functions['verifyFailureOnNext'] = new CommandDefinition('verifyFailureOnNext'); - functions['assertErrorOnNext'] = new CommandDefinition('assertErrorOnNext'); - functions['verifyErrorOnNext'] = new CommandDefinition('verifyErrorOnNext'); - this.functions = functions; - } - return this.functions; -}; - -function CommandDefinition(name) { - this.name = name; - this.params = []; -} - -CommandDefinition.prototype.getReferenceFor = function(command) { - var paramNames = []; - for (var i = 0; i < this.params.length; i++) { - paramNames.push(this.params[i].name); - } - var originalParamNames = paramNames.join(", "); - if (this.name.match(/^is|get/)) { // accessor - if (command.command) { - if (command.command.match(/^store/)) { - paramNames.push("variableName"); - } else if (command.command.match(/^(assert|verify|waitFor)/)) { - if (this.name.match(/^get/)) { - paramNames.push("pattern"); - } - } - } - } - var note = ""; - if (command.command && command.command != this.name) { - note = "
    Generated from " + this.name + "(" + - originalParamNames + ")
    "; - } - var params = ""; - if (this.params.length > 0) { - params += "
    Arguments:
      "; - for (var i = 0; i < this.params.length; i++) { - params += "
    • " + this.params[i].name + " - " + this.params[i].description + "
    • "; - } - params += "
    "; - } - var returns = ""; - if (this.returnDescription) { - returns += "
    Returns:
    " + this.returnDescription + "
    "; - } - var deprecated = ""; - if (this.deprecated) { - deprecated += '
    This command is deprecated. ' + this.deprecated + "
    "; - if (this.alternatives) { - deprecated = deprecated.replace("${alternatives}", "" + CommandDefinition.getAlternative(command.command, this.alternatives) + ""); - } - } - - return "
    " + (command.command || this.name) + "(" + - paramNames.join(", ") + ")
    " + - deprecated + note + - '
    ' + - params + returns + - this.comment + "
    "; -}; - -CommandDefinition.prototype.negativeAccessor = function() { - var def = new CommandDefinition(this.name); - for (var name in this) { - def[name] = this[name]; - } - def.isAccessor = true; - def.negative = true; - return def; -} - -/** - * Figure out the correct alternative command to use based on the current command flavour - * @param command - e.g. "waitForTextNotPresent" - * @param alternative - e.g. "Text - * @returns {string} - */ -CommandDefinition.getAlternative = function(command, alternative) { - if (command == null) return ''; - var alt = alternative; - var r = /^(.*?)(AndWait)?$/.exec(command); - var commandName = r[1]; - var prefix = ''; - var suffix = r[2] ? r[2] : ''; - var negate = false; - r = /^(assert|verify|store|waitFor)(.*)$/.exec(commandName); - if (r) { - prefix = r[1]; - var commandName = r[2]; - if ((r = /^(.*)NotPresent$/.exec(commandName)) != null) { - negate = true; - } else if ((r = /^Not(.*)$/.exec(commandName)) != null) { - negate = true; - } - if (negate) { - if (alt.match(/Present$/)) { - alt = alt.replace(/Present$/, 'NotPresent'); - } else { - prefix += 'Not'; - } - } - } - - return prefix + (prefix.length > 0 ? alt.charAt(0).toUpperCase() : alt.charAt(0).toLowerCase()) + alt.substr(1) + suffix; -}; - -Command.prototype.getDefinition = function() { - if (this.command == null) return null; - var commandName = this.command.replace(/AndWait$/, ''); - var api = Command.loadAPI(); - var r = /^(assert|verify|store|waitFor)(.*)$/.exec(commandName); - if (r) { - var suffix = r[2]; - var prefix = ""; - if ((r = /^(.*)NotPresent$/.exec(suffix)) != null) { - suffix = r[1] + "Present"; - prefix = "!"; - } else if ((r = /^Not(.*)$/.exec(suffix)) != null) { - suffix = r[1]; - prefix = "!"; - } - var booleanAccessor = api[prefix + "is" + suffix]; - if (booleanAccessor) { - return booleanAccessor; - } - var accessor = api[prefix + "get" + suffix]; - if (accessor) { - return accessor; - } - } - return api[commandName]; -} - -Command.prototype.getParameterAt = function(index) { - switch (index) { - case 0: - return this.target; - case 1: - return this.value; - default: - return null; - } -} - -Command.prototype.getAPI = function() { - return window.editor.seleniumAPI; -} - -Command.prototype.type = 'command'; - -/** - * The string representation of a command is the command, target, and value - * delimited by padded pipes. - */ -Command.prototype.toString = function() -{ - var s = this.command - if (this.target) { - s += ' | ' + this.target; - if (this.value) { - s += ' | ' + this.value; - } - } - return s; -} - -Command.prototype.isRollup = function() -{ - return /^rollup(?:AndWait)?$/.test(this.command); -} - -function Comment(comment) { - this.comment = comment != null ? comment : ''; -} - -Comment.prototype.type = 'comment'; - -function Line(line) { - this.line = line; -} - -Line.prototype.type = 'line'; - -Comment.prototype.createCopy = function() { - var copy = new Comment(); - for (prop in this) { - copy[prop] = this[prop]; - } - return copy; -}; - -function TestCase(tempTitle) { - if (!tempTitle) tempTitle = "Untitled"; - this.log = new Log("TestCase"); - this.tempTitle = tempTitle; - this.formatLocalMap = {}; - this.commands = []; - this.recordModifiedInCommands(); - this.baseURL = ""; - - var testCase = this; - - this.debugContext = { - reset: function() { - this.failed = false; - this.started = false; - this.debugIndex = -1; - this.runTimeStamp = 0; - }, - - nextCommand: function() { - if (!this.started) { - this.started = true; - this.debugIndex = testCase.startPoint ? testCase.commands.indexOf(testCase.startPoint) : 0 - } else { - this.debugIndex++; - } - for (; this.debugIndex < testCase.commands.length; this.debugIndex++) { - var command = testCase.commands[this.debugIndex]; - if (command.type == 'command') { - this.runTimeStamp = Date.now(); - return command; - } - } - return null; - }, - - currentCommand: function() { - var command = testCase.commands[this.debugIndex]; - if (!command) { - testCase.log.warn("currentCommand() not found: commands.length=" + testCase.commands.length + ", debugIndex=" + this.debugIndex); - } - return command; - } - } -} - -// Create a shallow copy of testcase -TestCase.prototype.createCopy = function() { - var copy = new TestCase(); - for (prop in this) { - copy[prop] = this[prop]; - } - return copy; -}; - - -// Store variables specific to each format in this hash. -TestCase.prototype.formatLocal = function(formatName) { - var scope = this.formatLocalMap[formatName]; - if (!scope) { - scope = {}; - this.formatLocalMap[formatName] = scope; - } - return scope; -} - -// For backwards compatibility -TestCase.prototype.setCommands = function(commands) { - this.commands = commands; - this.recordModifiedInCommands(); -} - -TestCase.prototype.recordModifiedInCommands = function() { - if (this.commands.recordModified) { - return; - } - this.commands.recordModified = true; - var self = this; - var commands = this.commands; - - var _push = commands.push; - commands.push = function(command) { - _push.call(commands, command); - self.setModified(); - } - - var _splice = commands.splice; - commands.splice = function(index, removeCount, command) { - - var removed = null; - if (command !== undefined && command != null) { - removed = _splice.call(commands, index, removeCount, command); - } else { - removed = _splice.call(commands, index, removeCount); - } - self.setModified(); - - return removed; - } - - var _pop = commands.pop; - commands.pop = function() { - var command = commands[commands.length - 1]; - commands.splice(commands.length - 1, 1); - self.setModified(); - return command; - } -} - -TestCase.prototype.clear = function() { - var length = this.commands.length; - this.commands.splice(0, this.commands.length); - this.setModified(); -}; - -TestCase.prototype.setModified = function() { - this.modified = true; - this.notify("modifiedStateUpdated"); -} - -TestCase.prototype.clearModified = function() { - this.modified = false; - this.notify("modifiedStateUpdated"); -} - -TestCase.prototype.checkTimestamp = function() { - if (this.file) { - if (this.lastModifiedTime < this.file.lastModifiedTime) { - this.lastModifiedTime = this.file.lastModifiedTime; - return true; - } - } - return false; -} - -TestCase.prototype.getCommandIndexByTextIndex = function(text, index, formatter) { - this.log.debug("getCommandIndexByTextIndex: index=" + index); - var lineno = text.substring(0, index).split(/\n/).length - 1; - var header = this.formatLocal(formatter.name).header; - this.log.debug("lineno=" + lineno + ", header=" + header); - if (header) { - lineno -= header.split(/\n/).length - 1; - } - this.log.debug("this.commands.length=" + this.commands.length); - for (var i = 0; i < this.commands.length; i++) { - this.log.debug("lineno=" + lineno + ", i=" + i); - if (lineno <= 0) { - return i; - } - var command = this.commands[i]; - if (command.line != null) { - lineno -= command.line.split(/\n/).length; - } - } - return this.commands.length; -} - -TestCase.prototype.getTitle = function() { - if (this.title) { - return this.title; - } else if (this.file && this.file.leafName) { - return this.file.leafName.replace(/\.\w+$/,''); - } else if (this.tempTitle) { - return this.tempTitle; - } else { - return null; - } -} - -TestCase.prototype.setBaseURL = function(baseURL) { - this.baseURL = baseURL; -} - -TestCase.prototype.getBaseURL = function() { - if (!this.baseURL || this.baseURL == "") { - return "http://change-this-to-the-site-you-are-testing/"; - } else { - return this.baseURL; - } -} - -observable(TestCase); diff --git a/ide/main/src/content/testCaseProperties.xul b/ide/main/src/content/testCaseProperties.xul deleted file mode 100644 index c4aafbd9f8be7..0000000000000 --- a/ide/main/src/content/testCaseProperties.xul +++ /dev/null @@ -1,67 +0,0 @@ - - - -%browserDTD; - -%optionsDTD; -]> - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/testSuite.js b/ide/main/src/content/testSuite.js deleted file mode 100644 index 9b0928f8c53b4..0000000000000 --- a/ide/main/src/content/testSuite.js +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function TestSuite() { - this.tests = []; - this.title = "Test Suite"; - this.modified = false; //Samit: Enh: Support for change detection -} - -TestSuite.TEST_SUITE_DIRECTORY_PREF = "testSuiteDirectory"; - -TestSuite.load = function() { - return showFilePicker(window, Editor.getString("chooseTestSuite"), - Components.interfaces.nsIFilePicker.modeOpen, - TestSuite.TEST_SUITE_DIRECTORY_PREF, - function(fp) { return TestSuite.loadFile(fp.file); }); -} - -TestSuite.loadFile = function(file) { - var suite = this.loadInputStream(FileUtils.openFileInputStream(file)); - suite.file = file; - return suite; -} - -TestSuite.loadInputStream = function(input) { - var content = FileUtils.getUnicodeConverter("UTF-8").ConvertToUnicode(input.read(input.available())); - input.close(); - if (/(][\s\S]*?<\/table>)/i.test(content)) { - var suite = new TestSuite(); - var tableContent = RegExp.$1; - var pattern = /][\s\S]*?<\/tr>/i; - var linkPattern = /]*href=['"]([^'"]+)['"][^>]*>([\s\S]+)<\/a>/i; - var rest = tableContent; - var r; - while ((r = pattern.exec(rest)) != null) { - var row = r[0]; - if (linkPattern.test(row)) { - var filename = decodeURIComponent(RegExp.$1); - var title = RegExp.$2; - suite.tests.push(new TestSuite.TestCase(suite, filename, title)); - } - rest = rest.substr(r.index + row.length); - } - return suite; - } else { - throw "Failed to load test suite: tag not found" - } -} - -// TODO make this configurable -TestSuite.header = - '\n' + - '\n' + - '\n' + - "\n" + - ' ' + "\n" + - " Test Suite\n" + - "\n" + - "\n"; - -TestSuite.footer = - "\n\n"; - -TestSuite.prototype = { - addTestCaseFromContent: function(content) { - var testCase = new TestSuite.TestCase(this); - testCase.content = content; - this.tests.push(testCase); - this.modified = true; //Samit: Enh: Mark as changed (Issue 586) - this.notify("testCaseAdded", testCase); - }, - - remove: function(testCase) { - if (this.tests.length > 1) { - if (this.tests.delete(testCase)) { - this.modified = true; //Samit: Enh: Mark as changed (Issue 586) - this.notify("testCaseRemoved", testCase); - } - } else { - alert(Message("error.testCaseRemovalFailed")); - } - }, - - move: function(fromIndex, toIndex) { - //Samit: Ref: Move is a fundamental part of the testSuite like add and remove and should be supported with corresponding event - if (this.tests.length > 1) { - var removedRow = this.tests.splice(fromIndex, 1)[0]; - this.tests.splice(toIndex, 0, removedRow); - this.modified = true; - this.notify("testCaseMoved", removedRow, fromIndex, toIndex); - } - }, - - //Samit: Enh: A temp suite is a suite that is not saved and has a single test case - isTempSuite: function() { - if (this.file || this.tests.length > 1) { - //Persisted suites and suites with more than one test cases are not temp suites - return false; - } - //Non-persisted suites with a single test case is a temp suite - return true; - }, - - //Samit: Enh: Provide suite modified status, contained test case modified status is not considered - isModified: function() { - return this.modified; - }, - - save: function(newFile) { - if (!this.file || newFile) { - var self = this; - return showFilePicker(window, Editor.getString("chooseTestSuite"), - Components.interfaces.nsIFilePicker.modeSave, - TestSuite.TEST_SUITE_DIRECTORY_PREF, - function(fp) { - self.file = fp.file; - return self.save(false); - }); - } - var output = FileUtils.openFileOutputStream(this.file); - var converter = FileUtils.getUnicodeConverter("UTF-8"); - var content = TestSuite.header + this.formatSuiteTable() + TestSuite.footer; - var text = converter.ConvertFromUnicode(content); - output.write(text, text.length); - var fin = converter.Finish(); - if (fin.length > 0) { - output.write(fin, fin.length); - } - output.close(); - this.modified = false; //Samit: Enh: Mark as saved (Issue 586) - return true; - }, - - formatSuiteTable: function() { - var content = "
    \n"; - content += "\n"; - for (var i = 0; i < this.tests.length; i++) { - content += this.tests[i].format(); - } - content += "
    Test Suite
    \n"; - return content; - }, - - result: function() { - var r = { - title: "Test Suite", - result: this.suiteResult, - //TODO progress and baseURL and maybe real title? - tests: [] - }; - r.tests = this.tests.map(function(test) { - return test.result(); - }); - return r; - }, - - generateNewTestCaseTitle: function() { - if (this.tests.some(function(test) { return /^Untitled/.test(test.getTitle()) })) { - var max = 1; - this.tests.forEach(function(test) { - if (/^Untitled (\d+)/.test(test.getTitle())) { - max = parseInt(RegExp.$1); - } - }); - return "Untitled " + (max + 1); - } else { - return "Untitled"; - } - }, - - // return a shallow copy of testsuite - createCopy: function() { - var copy = new TestSuite(); - for (prop in this) { - copy[prop] = this[prop]; - } - return copy; - } -} - -TestSuite.TestCase = function(testSuite, filename, title) { - this.testSuite = testSuite; - this.filename = filename; - this.title = title; - this.testResult = null; -} - -TestSuite.TestCase.prototype = { - getFile: function() { - if (!this.testSuite.file) return null; - var file = FileUtils.getFile(this.testSuite.file.parent.path); - //alert(file + " " + this.filename); - var filename = this.filename; - if (Components.interfaces.nsILocalFileWin && - file instanceof Components.interfaces.nsILocalFileWin) { - filename = filename.replace(/\//g, '\\'); - } - - try { - file.appendRelativePath(filename); - return file; - }catch (e) { - - if (e.name && e.name == "NS_ERROR_FILE_UNRECOGNIZED_PATH") { - //Samit: Fix: workaround security exception due to ".." in path using our own version - return FileUtils.appendRelativePath(file, filename); - } - } - return null; - }, - - getRelativeFilePath: function() { - if (this.content) { - return this._computeRelativePath(this.testSuite.file, this.content.file); - } else { - return this.filename; - } - }, - - _computeRelativePath: function(fromFile, toFile) { - var from = FileUtils.splitPath(fromFile.parent); - var to = FileUtils.splitPath(toFile); - var result = []; - for (var base = 0; base < from.length && base < to.length; base++) { - if (from[base] != to[base]) { - break; - } - } - for (var i = from.length - 1; i >= base; i--) { - result.push(".."); - } - for (var i = base; i < to.length; i++) { - result.push(to[i]); - } - return result.join("/"); - }, - - getFilePath: function() { - if (this.content) { - return this.content.filename; - } else { - return this.filename; - } - }, - - setTitle: function(title) { - if (this.content) { - this.content.title = title; - } else { - this.title = title; - } - }, - - getTitle: function() { - if (this.content) { - return this.content.getTitle(); - } else { - return this.title; - } - }, - - format: function() { - return "" + - this.getTitle() + "\n"; - }, - - result: function() { - var r = { - title: this.getTitle(), - result: this.testResult, - commands: [] - }; - if (this.content) { - r.baseURL = this.content.baseURL; - r.commands = this.content.commands.map(function(cmd) { - if (cmd.type == 'comment') { - return { type: cmd.type, comment: cmd.comment }; - } else if (cmd.type == 'command') { - return { type: cmd.type, command: cmd.command, target: cmd.target, value: cmd.value, result: cmd.result, error: cmd.failureMessage }; - } - return { type: cmd.type }; - }); - } - return r; - } - -}; - -observable(TestSuite); diff --git a/ide/main/src/content/testSuiteProgress.js b/ide/main/src/content/testSuiteProgress.js deleted file mode 100644 index e8f1f7fa1cf48..0000000000000 --- a/ide/main/src/content/testSuiteProgress.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2008 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function TestSuiteProgress(id) { - this.id = id; - this.reset(); -} - -TestSuiteProgress.prototype = { - reset: function() { - this.failures = 0; - this.update(0, 0, false); - }, - - update: function(runs, total, failure) { - this.runs = runs; - this.total = total; - if (failure) { this.failures++; }; - var width; - if (total > 0) { - width = runs / total * 100; - } else { - width = 0; - } - this._getIndicator2().setAttribute("flex", 100 - parseInt(width)); - this._getIndicator().setAttribute("flex", parseInt(width)); - this._getIndicator().setAttribute("class", this.failures > 0 ? "failure" : "success"); - this._getRunsLabel().value = this.runs.toString(); - this._getFailuresLabel().value = this.failures.toString(); - }, - - _getIndicator: function() { - return $(this.id + "Indicator"); - }, - - _getIndicator2: function() { - return $(this.id + "Indicator2"); - }, - - _getRunsLabel: function() { - return $(this.id + "Runs"); - }, - - _getFailuresLabel: function() { - return $(this.id + "Failures"); - } -}; diff --git a/ide/main/src/content/tests/functional/OpenSeleniumIDE-test.html b/ide/main/src/content/tests/functional/OpenSeleniumIDE-test.html deleted file mode 100644 index af462ad261963..0000000000000 --- a/ide/main/src/content/tests/functional/OpenSeleniumIDE-test.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - -
    - - diff --git a/ide/main/src/content/tests/functional/OpenSeleniumIDE.html b/ide/main/src/content/tests/functional/OpenSeleniumIDE.html deleted file mode 100644 index cd994f074be62..0000000000000 --- a/ide/main/src/content/tests/functional/OpenSeleniumIDE.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - TestPlay - - - - - - - - - - - - - - - - -
    TestPlay
    openchrome://selenium-ide-testrunner/content/tests/functional/OpenSeleniumIDE-test.html
    waitForTextPresentOK
    - - diff --git a/ide/main/src/content/tests/functional/TestAlert.html b/ide/main/src/content/tests/functional/TestAlert.html deleted file mode 100644 index 1cc6316afe680..0000000000000 --- a/ide/main/src/content/tests/functional/TestAlert.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/startRecording.html
    openchrome://selenium-ide/content/tests/functional/aut/alert.html
    clicklink=show alert
    assertAlerthello
    pause200
    chooseCancelOnNextConfirmation
    clicklink=show confirmation
    assertConfirmationAre you sure?
    pause200
    clicklink=show confirmation
    assertConfirmationAre you sure?
    pause200
    answerOnNextPromptfoobar
    clicklink=show prompt
    assertPromptInput new name
    pause200
    openchrome://selenium-ide/content/tests/functional/verifyCommands.html#TestAlert.html
    waitForTextresultregexp:.+
    assertTextresultSuccess
    - - diff --git a/ide/main/src/content/tests/functional/TestBasic.html b/ide/main/src/content/tests/functional/TestBasic.html deleted file mode 100644 index 609a089360012..0000000000000 --- a/ide/main/src/content/tests/functional/TestBasic.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - TestBasic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestBasic
    openchrome://selenium-ide/content/tests/functional/startRecording.html
    openchrome://selenium-ide/content/tests/functional/aut/search.html
    clickAndWait//img[contains(@src,'chrome://selenium-ide/content/selenium-core/selenium-logo.png')]
    pause500
    clickAndWait//img[@alt='Selenium logo']
    clickAndWait//img[@title='Selenium logo (title)']
    clickAndWaitlink=link with onclick attribute
    clicktab1
    clicktab2
    typeqhello
    typecommenthello
    next line
    another  line
    selectnumlabel=20
    clickAndWaitsearch
    openchrome://selenium-ide/content/tests/functional/verifyCommands.html#TestBasic.html
    waitForTextresultregexp:.+
    assertTextresultSuccess
    - - diff --git a/ide/main/src/content/tests/functional/TestDragAndDrop.html b/ide/main/src/content/tests/functional/TestDragAndDrop.html deleted file mode 100644 index 43d9d22e48bde..0000000000000 --- a/ide/main/src/content/tests/functional/TestDragAndDrop.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/startRecording.html
    openchrome://selenium-ide/content/selenium-tests/html/slider/example.html
    dragdrop//img-100,0
    dragdrop//img50,0
    pause1000
    openchrome://selenium-ide/content/tests/functional/verifyCommands.html#TestDragAndDrop.html
    waitForTextresultregexp:.+
    assertTextresultSuccess
    - - diff --git a/ide/main/src/content/tests/functional/TestFrame.html b/ide/main/src/content/tests/functional/TestFrame.html deleted file mode 100644 index 3ba1b4759ad93..0000000000000 --- a/ide/main/src/content/tests/functional/TestFrame.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/startRecording.html
    openchrome://selenium-ide/content/tests/functional/aut/test_multi_level_frame2.html
    selectFrameframe2
    selectFrametheFrame
    clickAndWaitlink
    selectFramerelative=up
    selectFramerelative=up
    selectFrameframe3
    selectFrametheFrame
    clickAndWaitlink
    openchrome://selenium-ide/content/tests/functional/verifyCommands.html#TestFrame.html
    waitForTextresultregexp:.+
    assertTextresultSuccess
    - - diff --git a/ide/main/src/content/tests/functional/TestPlay-test.html b/ide/main/src/content/tests/functional/TestPlay-test.html deleted file mode 100644 index d0383c3ef9324..0000000000000 --- a/ide/main/src/content/tests/functional/TestPlay-test.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - -
    -
    - - - diff --git a/ide/main/src/content/tests/functional/TestPlay.html b/ide/main/src/content/tests/functional/TestPlay.html deleted file mode 100644 index 6f0f0a3c3132b..0000000000000 --- a/ide/main/src/content/tests/functional/TestPlay.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - TestPlay - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestPlay
    openchrome://selenium-ide/content/tests/functional/TestPlay-test.html
    setTimeout300000
    waitForTablelogtable.1.0regexp:\w+
    assertTablelogtable.1.0passed
    - - diff --git a/ide/main/src/content/tests/functional/TestPlaySingleCommand-test.html b/ide/main/src/content/tests/functional/TestPlaySingleCommand-test.html deleted file mode 100644 index 7fbbac9841d20..0000000000000 --- a/ide/main/src/content/tests/functional/TestPlaySingleCommand-test.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - -
    -
    - - - diff --git a/ide/main/src/content/tests/functional/TestPlaySingleCommand.html b/ide/main/src/content/tests/functional/TestPlaySingleCommand.html deleted file mode 100644 index a1c73087c4714..0000000000000 --- a/ide/main/src/content/tests/functional/TestPlaySingleCommand.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - TestPlay - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestPlaySingleCommand
    openchrome://selenium-ide/content/tests/functional/TestPlaySingleCommand-test.html
    setTimeout300000
    waitForTablelogtable.1.0regexp:\w+
    assertTablelogtable.1.0passed
    - - diff --git a/ide/main/src/content/tests/functional/TestPopup.html b/ide/main/src/content/tests/functional/TestPopup.html deleted file mode 100644 index 9f365358b79ae..0000000000000 --- a/ide/main/src/content/tests/functional/TestPopup.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - TestPopup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestPopup
    openchrome://selenium-ide/content/tests/functional/startRecording.html
    openchrome://selenium-ide/content/tests/functional/aut/test_popup.html
    clicklink=show popup
    waitForPopUppopup30000
    selectWindowname=popup
    typeqaaa
    setTimeout10000
    clickAndWaitsearch
    close
    selectWindownull
    clicklink=dummy
    pause1000
    openchrome://selenium-ide/content/tests/functional/verifyCommands.html#TestPopup.html
    waitForTextresultregexp:.+
    assertTextresultSuccess
    - - diff --git a/ide/main/src/content/tests/functional/TestSelect.html b/ide/main/src/content/tests/functional/TestSelect.html deleted file mode 100644 index 9a0c3a69aba41..0000000000000 --- a/ide/main/src/content/tests/functional/TestSelect.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/startRecording.html
    openchrome://selenium-ide/content/tests/functional/aut/select.html
    selectnumlabel=20
    selectnumlabel=regexp:\s+4\s0 0
    selectnumlabel=a & b
    addSelectionnum2label=10
    addSelectionnum2label=20
    removeSelectionnum2label=10
    pause1000
    openchrome://selenium-ide/content/tests/functional/verifyCommands.html#TestSelect.html
    waitForTextresultregexp:.+
    assertTextresultSuccess
    - - diff --git a/ide/main/src/content/tests/functional/TestSuite.html b/ide/main/src/content/tests/functional/TestSuite.html deleted file mode 100644 index 2853288d07846..0000000000000 --- a/ide/main/src/content/tests/functional/TestSuite.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Test Suite - - - - - - - - - - - - - - - - - - -
    Test Suite
    TestBasic
    TestPopup
    TestAlert
    TestSelect
    TestFrame
    TestPlay
    TestTestRunner
    TestPlaySingleCommand
    - - diff --git a/ide/main/src/content/tests/functional/TestTestRunner-extension.js b/ide/main/src/content/tests/functional/TestTestRunner-extension.js deleted file mode 100644 index 5eb90be84d6bb..0000000000000 --- a/ide/main/src/content/tests/functional/TestTestRunner-extension.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * By default, Selenium looks for a file called "user-extensions.js", and loads and javascript - * code found in that file. This file is a sample of what that file could look like. - * - * user-extensions.js provides a convenient location for adding extensions to Selenium, like - * new actions, checks and locator-strategies. - * By default, this file does not exist. Users can create this file and place their extension code - * in this common location, removing the need to modify the Selenium sources, and hopefully assisting - * with the upgrade process. - * - * You can find contributed extensions at http://wiki.openqa.org/display/SEL/Contributed%20User-Extensions - */ - -// The following examples try to give an indication of how Selenium can be extended with javascript. - -// All do* methods on the Selenium prototype are added as actions. -// Eg add a typeRepeated action to Selenium, which types the text twice into a text box. -// The typeTwiceAndWait command will be available automatically -Selenium.prototype.doTypeRepeated = function(locator, text) { - // All locator-strategies are automatically handled by "findElement" - var element = this.page().findElement(locator); - - // Create the text to type - var valueToType = text + text; - - // Replace the element text with the new text - this.page().replaceText(element, valueToType); -}; - -// All assert* methods on the Selenium prototype are added as checks. -// Eg add a assertValueRepeated check, that makes sure that the element value -// consists of the supplied text repeated. -// The verify version will be available automatically. -Selenium.prototype.assertValueRepeated = function(locator, text) { - // All locator-strategies are automatically handled by "findElement" - var element = this.page().findElement(locator); - - // Create the text to verify - var expectedValue = text + text; - - // Get the actual element value - var actualValue = element.value; - - // Make sure the actual value matches the expected - Assert.matches(expectedValue, actualValue); -}; - -// All get* methods on the Selenium prototype result in -// store, assert, assertNot, verify, verifyNot, waitFor, and waitForNot commands. -// E.g. add a getTextLength method that returns the length of the text -// of a specified element. -// Will result in support for storeTextLength, assertTextLength, etc. -Selenium.prototype.getTextLength = function(locator) { - return this.getText(locator).length; -}; - -// All locateElementBy* methods are added as locator-strategies. -// Eg add a "valuerepeated=" locator, that finds the first element with the supplied value, repeated. -// The "inDocument" is a the document you are searching. -PageBot.prototype.locateElementByValueRepeated = function(text, inDocument) { - // Create the text to search for - var expectedValue = text + text; - - // Loop through all elements, looking for ones that have a value === our expected value - var allElements = inDocument.getElementsByTagName("*"); - for (var i = 0; i < allElements.length; i++) { - var testElement = allElements[i]; - if (testElement.value && testElement.value === expectedValue) { - return testElement; - } - } - return null; -}; - -var uiMap = new UIMap(); - -uiMap.addPageset({ - name: 'homepage' - , description: 'the OpenQA homepage' - , paths: [ "" ] -}); - -uiMap.addElement('homepage', { - name: 'bannerAd' - , description: 'the banner advertisement' - , locator: 'name=google_ads_frame' -}); - diff --git a/ide/main/src/content/tests/functional/TestTestRunner-test.html b/ide/main/src/content/tests/functional/TestTestRunner-test.html deleted file mode 100644 index dead59ac552fe..0000000000000 --- a/ide/main/src/content/tests/functional/TestTestRunner-test.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - -
    -
    - - - diff --git a/ide/main/src/content/tests/functional/TestTestRunner-testcase.html b/ide/main/src/content/tests/functional/TestTestRunner-testcase.html deleted file mode 100644 index 098a47c614e23..0000000000000 --- a/ide/main/src/content/tests/functional/TestTestRunner-testcase.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    test
    setTimeout60000
    open/
    clickAndWaitlink=Forums and Blogs
    typeRepeatedjive-querytest
    assertValuejive-querytesttest
    assertElementPresentui=homepage::bannerAd()
    storeEvalnew Date().getTime()test
    typejive-queryjavascript{"abc" + storedVars['test']}
    assertValuejive-queryregexp:^abc\d+$
    goBackAndWait
    - - diff --git a/ide/main/src/content/tests/functional/TestTestRunner.html b/ide/main/src/content/tests/functional/TestTestRunner.html deleted file mode 100644 index d1468efcad2a7..0000000000000 --- a/ide/main/src/content/tests/functional/TestTestRunner.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - TestTestRunner - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestTestRunner
    openchrome://selenium-ide/content/tests/functional/TestTestRunner-test.html
    setTimeout300000
    waitForTablelogtable.1.0regexp:\w+
    assertTablelogtable.1.0passed
    - - diff --git a/ide/main/src/content/tests/functional/aut/alert.html b/ide/main/src/content/tests/functional/aut/alert.html deleted file mode 100644 index 74a3a42448fa0..0000000000000 --- a/ide/main/src/content/tests/functional/aut/alert.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/ide/main/src/content/tests/functional/aut/checksandradios.html b/ide/main/src/content/tests/functional/aut/checksandradios.html deleted file mode 100644 index 9a0bcb334374d..0000000000000 --- a/ide/main/src/content/tests/functional/aut/checksandradios.html +++ /dev/null @@ -1,16 +0,0 @@ - - -

    Checkboxen

    -

    - Flying Monkeys - Dancing Elephants - Swimming Lizards -

    -

    Radio Boxen

    -

    - Boxing Kangaroos - Wandering Wombats - Prancing Platapii -

    - - \ No newline at end of file diff --git a/ide/main/src/content/tests/functional/aut/disabled.html b/ide/main/src/content/tests/functional/aut/disabled.html deleted file mode 100644 index 04b856612515c..0000000000000 --- a/ide/main/src/content/tests/functional/aut/disabled.html +++ /dev/null @@ -1,9 +0,0 @@ - - -

    Checkboxen

    -

    - Flying Monkeys - Dancing Elephants -

    - - \ No newline at end of file diff --git a/ide/main/src/content/tests/functional/aut/form-fields.html b/ide/main/src/content/tests/functional/aut/form-fields.html deleted file mode 100644 index 449163903cd7b..0000000000000 --- a/ide/main/src/content/tests/functional/aut/form-fields.html +++ /dev/null @@ -1,11 +0,0 @@ - - - Form Fields - - -
    - - -
    - - diff --git a/ide/main/src/content/tests/functional/aut/result.html b/ide/main/src/content/tests/functional/aut/result.html deleted file mode 100644 index f24496f50dc2a..0000000000000 --- a/ide/main/src/content/tests/functional/aut/result.html +++ /dev/null @@ -1,10 +0,0 @@ - - Search Result - -
      -
    • AAA
    • -
    • BBB
    • -
    • CCC
    • -
    - - diff --git a/ide/main/src/content/tests/functional/aut/search.html b/ide/main/src/content/tests/functional/aut/search.html deleted file mode 100644 index a70673734ba3f..0000000000000 --- a/ide/main/src/content/tests/functional/aut/search.html +++ /dev/null @@ -1,48 +0,0 @@ - - Bogus Search Engine - - - - - - Selenium logo - - link with onclick attribute -
    -
    - -
    -
    - Show - - items -
    -
    - -
    -
    - tab 1 - tab 2 -
    -
    -
    -
    - -
    -
    - - diff --git a/ide/main/src/content/tests/functional/aut/select.html b/ide/main/src/content/tests/functional/aut/select.html deleted file mode 100644 index 192d40d21624f..0000000000000 --- a/ide/main/src/content/tests/functional/aut/select.html +++ /dev/null @@ -1,22 +0,0 @@ - - -
    -
    - -
    -
    - -
    -
    - - diff --git a/ide/main/src/content/tests/functional/aut/test_multi_level_frame2.html b/ide/main/src/content/tests/functional/aut/test_multi_level_frame2.html deleted file mode 100644 index 15d5248fe56b5..0000000000000 --- a/ide/main/src/content/tests/functional/aut/test_multi_level_frame2.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/ide/main/src/content/tests/functional/aut/test_popup.html b/ide/main/src/content/tests/functional/aut/test_popup.html deleted file mode 100644 index a4336ff9e8de7..0000000000000 --- a/ide/main/src/content/tests/functional/aut/test_popup.html +++ /dev/null @@ -1,6 +0,0 @@ - - - show popup - dummy - - diff --git a/ide/main/src/content/tests/functional/aut/uploads.html b/ide/main/src/content/tests/functional/aut/uploads.html deleted file mode 100644 index e9594da80a30d..0000000000000 --- a/ide/main/src/content/tests/functional/aut/uploads.html +++ /dev/null @@ -1,10 +0,0 @@ - - - Uploads - - -
    - -
    - - diff --git a/ide/main/src/content/tests/functional/aut/visibility.html b/ide/main/src/content/tests/functional/aut/visibility.html deleted file mode 100644 index a106ca4bebc0a..0000000000000 --- a/ide/main/src/content/tests/functional/aut/visibility.html +++ /dev/null @@ -1,29 +0,0 @@ - - - get_text_test - - - -
    - Text1
    -
    - Text3
    - -
    - Text4
    -
    - Text6
    -
    -
    - Text7
    - Text8
    - Text9
    -
    - - banner
    - This is a test of the open command. -
    - - \ No newline at end of file diff --git a/ide/main/src/content/tests/functional/index.html b/ide/main/src/content/tests/functional/index.html deleted file mode 100644 index 3ecd4ad43fbaf..0000000000000 --- a/ide/main/src/content/tests/functional/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ide/main/src/content/tests/functional/startRecording.html b/ide/main/src/content/tests/functional/startRecording.html deleted file mode 100644 index a9966cffadaf7..0000000000000 --- a/ide/main/src/content/tests/functional/startRecording.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/ide/main/src/content/tests/functional/verifyCommands.html b/ide/main/src/content/tests/functional/verifyCommands.html deleted file mode 100644 index 3a6e9dcdb4db5..0000000000000 --- a/ide/main/src/content/tests/functional/verifyCommands.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - -
    -
    - - - diff --git a/ide/main/src/content/tests/functional/verifyCommands.js b/ide/main/src/content/tests/functional/verifyCommands.js deleted file mode 100644 index 0f4cb5408cc5a..0000000000000 --- a/ide/main/src/content/tests/functional/verifyCommands.js +++ /dev/null @@ -1,93 +0,0 @@ -function loadTestSuite() { - var editor = SeleniumIDE.Loader.getTopEditor(); - /* - var BrowserBot = window.top.BrowserBot; - var originalModify = BrowserBot.prototype.modifyWindowToRecordPopUpDialogs; - BrowserBot.prototype.modifyWindowToRecordPopUpDialogs = function(windowToModify, browserBot) { - originalModify.call(this, windowToModify, browserBot); - SeleniumIDE.Loader.getRecorder(windowToModify).reattachWindowMethods(); - } - */ -} - -function startRecording() { - var editor = SeleniumIDE.Loader.getTopEditor(); - editor.loadDefaultOptions(); - editor.getOptions().recordAssertTitle = 'false'; - editor.clear(true); - editor.topWindow = editor.lastWindow = window.top.document.getElementById('selenium_myiframe').contentWindow; - editor.setRecordingEnabled(true); -} - -function loadTest() { - var editor = SeleniumIDE.Loader.getTopEditor(); - if (editor) { - editor.setRecordingEnabled(false); - } - var iframe = document.getElementById('testCase'); - iframe.addEventListener('load', verifyCommands, false); - iframe.src = 'chrome://selenium-ide/content/tests/functional/' + location.hash.substring(1); -} - -function verifyCommands() { - var testDoc = document.getElementById('testCase').contentDocument; - var table = testDoc.getElementsByTagName('table')[0]; - var rows = table.getElementsByTagName('tr'); - var editor = SeleniumIDE.Loader.getTopEditor(); - var recordedCommands = editor.getTestCase().commands; - var recordedIndex = 0; - for (var i = 2; i < rows.length; i++) { - var row = rows[i]; - var cols = row.getElementsByTagName('td'); - if (cols.length > 0) { - var command = {}; - command.command = getText(cols[0]); - if (cols.length > 1) command.target = getText(cols[1]); - if (cols.length > 2) command.value = getText(cols[2]); - if (command.target.indexOf('verifyCommands.html') >= 0) { - break; - } - if (command.command != 'pause' && - command.command != 'setTimeout' && - command.command != 'close') { // these commands are currently not recorded by Selenium IDE - if (command.command == 'selectWindow' && command.target == 'null') { - // This is frame for application. Selenium IDE should record this window as 'selenium_myiframe'. - command.target = 'name=selenium_myiframe'; - } - if (recordedCommands.length <= recordedIndex || - !sameCommand(command, recordedCommands[recordedIndex])) { - setResult('Failed: command is not same: recordedIndex = ' + recordedIndex + ', sourceIndex = ' + i + ', recorded=' + dumpCommand(recordedCommands[recordedIndex]) + ', source=' + dumpCommand(command)); - return; - } - recordedIndex++; - } - } - } - if (recordedIndex != recordedCommands.length) { - setResult('Failed: too many commands are recorded'); - } else { - setResult('Success'); - } -} - -function dumpCommand(command) { - if (command) { - return "|" + command.command + "|" + command.target + "|" + command.value + "|"; - } else { - return ""; - } -} - -function sameCommand(c1, c2) { - var matched = true; - ['command', 'target', 'value'].forEach(function(prop) { - if (c1[prop] != c2[prop]) { - matched = false; - } - }); - return matched; -} - -function setResult(result) { - document.getElementById('result').innerHTML = result; -} diff --git a/ide/main/src/content/tests/index.html b/ide/main/src/content/tests/index.html deleted file mode 100644 index aae18ba859ee2..0000000000000 --- a/ide/main/src/content/tests/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/ide/main/src/content/tests/unit/TestSuite.html b/ide/main/src/content/tests/unit/TestSuite.html deleted file mode 100644 index 9945199c58f8e..0000000000000 --- a/ide/main/src/content/tests/unit/TestSuite.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Selenium IDE Test Suite - - - - - - - - JSUnit test suite for Selenium IDE - - diff --git a/ide/main/src/content/tests/unit/application-tests.html b/ide/main/src/content/tests/unit/application-tests.html deleted file mode 100644 index 1e1efc9116763..0000000000000 --- a/ide/main/src/content/tests/unit/application-tests.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/editor-tests.html b/ide/main/src/content/tests/unit/editor-tests.html deleted file mode 100644 index d673dc545d304..0000000000000 --- a/ide/main/src/content/tests/unit/editor-tests.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/format-tests.html b/ide/main/src/content/tests/unit/format-tests.html deleted file mode 100644 index 98fc7d06589bf..0000000000000 --- a/ide/main/src/content/tests/unit/format-tests.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/html-format-tests.html b/ide/main/src/content/tests/unit/html-format-tests.html deleted file mode 100644 index 56d120988af65..0000000000000 --- a/ide/main/src/content/tests/unit/html-format-tests.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/html/TestEmptyTD.html b/ide/main/src/content/tests/unit/html/TestEmptyTD.html deleted file mode 100644 index 8729e0b1d9e98..0000000000000 --- a/ide/main/src/content/tests/unit/html/TestEmptyTD.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
    open/ -
    typetheTextfoobar
    verifyValuetheTextfoobar
    - - diff --git a/ide/main/src/content/tests/unit/html/TestWaitInPopupWindow.html b/ide/main/src/content/tests/unit/html/TestWaitInPopupWindow.html deleted file mode 100644 index 15b55643bec3e..0000000000000 --- a/ide/main/src/content/tests/unit/html/TestWaitInPopupWindow.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - Test SelectWindow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Test selectWindow
    -
    open../tests/html/test_select_window.html 
    clickpopupPage
    waitForPopUpmyPopupWindow500
    selectWindowmyPopupWindow 
    verifyTitleSelect Window Popup 
    -

    Check page transitions in popup window

    -

    quick loading page

    - - - - - - - - - - - - - - - - -
    setTimeout2000
    clickAndWaitlink=Click to load new page
    verifyTitleReload Page 
    - -

    slow loading page

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    setTimeout30000
    clickAndWaitlink=Click here
    verifyTitleSlow Loading Page 
    close
    selectWindownull 
    - - diff --git a/ide/main/src/content/tests/unit/html/XhtmlTestCase.xml b/ide/main/src/content/tests/unit/html/XhtmlTestCase.xml deleted file mode 100644 index ea58e654bdade..0000000000000 --- a/ide/main/src/content/tests/unit/html/XhtmlTestCase.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - XHTML test case - - - - - - - - - - - - - - - - - - - -
    XHTML test case
    open../tests/html/test_select_window.html 
    clickpopupPage
    - - diff --git a/ide/main/src/content/tests/unit/locatorBuilders-tests.html b/ide/main/src/content/tests/unit/locatorBuilders-tests.html deleted file mode 100644 index 3ae1641eb67a1..0000000000000 --- a/ide/main/src/content/tests/unit/locatorBuilders-tests.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - -

    -
    - - - - - -
    -
    - -
    -
    - - -
    -
    - - - -
    -
    -
    -
    - -
    -
    - - diff --git a/ide/main/src/content/tests/unit/locatorBuilders-xhtml-tests.xhtml b/ide/main/src/content/tests/unit/locatorBuilders-xhtml-tests.xhtml deleted file mode 100644 index 8b5aa4a7a8d6f..0000000000000 --- a/ide/main/src/content/tests/unit/locatorBuilders-xhtml-tests.xhtml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/preferences-tests.html b/ide/main/src/content/tests/unit/preferences-tests.html deleted file mode 100644 index 173db5e1ba3fe..0000000000000 --- a/ide/main/src/content/tests/unit/preferences-tests.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/recorder-tests.html b/ide/main/src/content/tests/unit/recorder-tests.html deleted file mode 100644 index cf837f7d72005..0000000000000 --- a/ide/main/src/content/tests/unit/recorder-tests.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - - -
    - test -
    - - diff --git a/ide/main/src/content/tests/unit/storedHistory-tests.html b/ide/main/src/content/tests/unit/storedHistory-tests.html deleted file mode 100644 index 0568afb42ee1f..0000000000000 --- a/ide/main/src/content/tests/unit/storedHistory-tests.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/test-api-doc.js b/ide/main/src/content/tests/unit/test-api-doc.js deleted file mode 100644 index dacbcb84993e5..0000000000000 --- a/ide/main/src/content/tests/unit/test-api-doc.js +++ /dev/null @@ -1,9 +0,0 @@ -this.seleniumAPI = {}; -const subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); -subScriptLoader.loadSubScript('chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js', this.seleniumAPI); -var parser = new DOMParser(); -Command.apiDocument = parser.parseFromString(FileUtils.readURL("chrome://selenium-ide/content/selenium-core/iedoc-core.xml"), "text/xml"); - -Command.prototype.getAPI = function() { - return seleniumAPI; -} diff --git a/ide/main/src/content/tests/unit/testCase-tests.html b/ide/main/src/content/tests/unit/testCase-tests.html deleted file mode 100644 index 7b3e43efb54d2..0000000000000 --- a/ide/main/src/content/tests/unit/testCase-tests.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/testHelper.js b/ide/main/src/content/tests/unit/testHelper.js deleted file mode 100644 index 537f2b734c773..0000000000000 --- a/ide/main/src/content/tests/unit/testHelper.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * test array with - */ -function assertJoinedArrayEquals(a1, a2) { - assertNotNull(a1); - assertNotNull(a2); - assertEquals(a1.join(","), a2.join(",")); -} diff --git a/ide/main/src/content/tests/unit/testSuite-tests-sampleSuite.html b/ide/main/src/content/tests/unit/testSuite-tests-sampleSuite.html deleted file mode 100644 index 19813545f7adc..0000000000000 --- a/ide/main/src/content/tests/unit/testSuite-tests-sampleSuite.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - Test Suite - - - - - - - - - - -
    Test Suite
    Test1
    Test2
    Test3
    - - diff --git a/ide/main/src/content/tests/unit/testSuite-tests.html b/ide/main/src/content/tests/unit/testSuite-tests.html deleted file mode 100644 index 71dadb7649e2e..0000000000000 --- a/ide/main/src/content/tests/unit/testSuite-tests.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - - - diff --git a/ide/main/src/content/tests/unit/testSuiteProgress-tests.html b/ide/main/src/content/tests/unit/testSuiteProgress-tests.html deleted file mode 100644 index e3e7aa7b3330b..0000000000000 --- a/ide/main/src/content/tests/unit/testSuiteProgress-tests.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - -
    -
    -
    -
    - - - - diff --git a/ide/main/src/content/tests/unit/tools-tests.html b/ide/main/src/content/tests/unit/tools-tests.html deleted file mode 100644 index 6411321dfe216..0000000000000 --- a/ide/main/src/content/tests/unit/tools-tests.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - Selenium IDE Test - - - - - - - - - - - - - diff --git a/ide/main/src/content/tools.js b/ide/main/src/content/tools.js deleted file mode 100644 index e1346a898a62a..0000000000000 --- a/ide/main/src/content/tools.js +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -if (this.SeleniumIDE && SeleniumIDE.Preferences) { - this.Preferences = SeleniumIDE.Preferences; -} else { - // Preferences is not available when called from xlator - this.Preferences = { - getString: function(name, defaultValue) { - return defaultValue; - } - }; -} - -function Log(category) { - var log = this; - var self = this; - this.category = category; - - function LogLevel(level, name) { - this.level = level; - this.name = name; - var self = this; - log[name.toLowerCase()] = function(msg) { log.log(self, msg) }; - } - - this.DEBUG = new LogLevel(1, "DEBUG"); - this.INFO = new LogLevel(2, "INFO"); - this.WARN = new LogLevel(3, "WARN"); - this.ERROR = new LogLevel(4, "ERROR"); - - this.log = function(level, msg) { - var threshold = this[this._getThreshold()]; - if (level.level >= threshold.level) { - this._write("Selenium IDE [" + level.name + "] " + - this._formatDate(new Date()) + " " + - self.category + ": " + msg); - } - } -} - -Log.prototype = { - _getThreshold: function() { - if (!this.threshold) { - this.threshold = Preferences.getString("internalLogThreshold", "INFO"); - } - return this.threshold; - }, - - _formatDate: function(date) { - return date.getFullYear() + - "-" + this._formatDigits(date.getMonth() + 1, 2) + - "-" + this._formatDigits(date.getDate(), 2) + - " " + this._formatDigits(date.getHours(), 2) + - ":" + this._formatDigits(date.getMinutes(), 2) + - ":" + this._formatDigits(date.getSeconds(), 2) + - "." + this._formatDigits(date.getMilliseconds(), 3); - }, - - _formatDigits: function(n, digits) { - var s = n.toString(); - var pre = digits - s.length; - var result = ""; - for (var i = 0; i < pre; i++) { - result += "0"; - } - result += s; - return result; - }, - - _write: function(message) { - var consoleService = Components.classes["@mozilla.org/consoleservice;1"] - .getService(Components.interfaces.nsIConsoleService); - if (consoleService != null) { - consoleService.logStringMessage(message); - } - } -} - -function showFilePicker(window, title, mode, defaultDirPrefName, handler, defaultExtension) { - var nsIFilePicker = Components.interfaces.nsIFilePicker; - var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); - fp.init(window, title, mode); - if (defaultExtension) { - fp.defaultExtension = defaultExtension; - } - var defaultDir = Preferences.getString(defaultDirPrefName); - if (defaultDir) { - fp.displayDirectory = FileUtils.getFile(defaultDir); - } - fp.appendFilters(nsIFilePicker.filterHTML | nsIFilePicker.filterAll); - var res = fp.show(); - if (res == nsIFilePicker.returnOK || res == nsIFilePicker.returnReplace) { - Preferences.setString(defaultDirPrefName, fp.file.parent.path); - return handler(fp); - } else { - return null; - } -} - -/** - * Opens the given URL in a new tab if a browser window is already open, or - * a new window otherwise. - * - * @param url the URL to open. - */ -function openTabOrWindow(url) -{ - try { - var gBrowser = window.opener.getBrowser(); - gBrowser.selectedTab = gBrowser.addTab(url); - } - catch (e) { - window.open(url); - } -} - -function exactMatchPattern(string) { - if (string != null && (string.match(/^\w*:/) || string.indexOf('?') >= 0 || string.indexOf('*') >= 0)) { - return "exact:" + string; - } else { - return string; - } -} - -function LineReader(text) { - this.text = text; -} - -LineReader.prototype.read = function() { - if (this.text.length > 0) { - var line = /.*(\r\n|\r|\n)?/.exec(this.text)[0]; - this.text = this.text.substr(line.length); - line = line.replace(/\r?\n?$/, ''); - return line; - } else { - return null; - } -} - -var StringUtils = {}; - -StringUtils.underscore = function(text) { - return text.replace(/[A-Z]/g, function(str) { - return '_' + str.toLowerCase(); - }); -} - -String.prototype.startsWith = function(str) { - return (this.match("^" + str) == str) -} - -if(typeof(String.prototype.trim) === "undefined") -{ - String.prototype.trim = function() - { - return String(this).replace(/^\s+|\s+$/g, ''); - }; -} - -function Message(key, arg) { - var strings = window.document.getElementById("strings"); - if (strings) { - var message = strings.getString(key); - if (arg) { - message = message.replace(/%/, arg); - } - return message; - } else { - return key; - } -} - -var ExtensionsLoader = { - getURLs: function(commaSeparatedPaths) { - var urls = []; - if (commaSeparatedPaths) { - urls = commaSeparatedPaths.split(/,/).map(function(path) { - path = path.trim(); - if (!path.match(/^(file|chrome):/)) { - path = FileUtils.fileURI(FileUtils.getFile(path)); - } - return path; - }); - } - return urls; - }, - - loadSubScript: function(loader, paths, obj) { - this.getURLs(paths).forEach(function(url) { - if (url) { - // force a reload of the extensions by adding the timestamp as parameter - loader.loadSubScript(url + '?' + new Date().getTime(), obj, 'UTF-8'); - } - }); - } -}; - -/** - * Returns the string with angle brackets and ampersands escaped as HTML - * entities. This is a cleaner implementation than the escapeHTML() methods - * defined by both the prototype and scriptaculous frameworks as it does not - * rely on the presence of a document object which can be manipulated. - */ -String.prototype.escapeHTML2 = function() { - return this - .replace(/&/g, '&') - .replace(//g, '>'); -}; - -String.prototype.formatAsHTML = function() { - return this.replace(/(?:\r\n|\r|\n)/g, '
    '); -}; - -Array.prototype["delete"] = function(value) { - for (var i = 0; i < this.length; i++) { - if (this[i] == value) { - this.splice(i, 1); - return true; - } - } - return false; -} - -// Samit: Ref: Split the fn to allow both objects of a class as well as the class itself to be notifiable as required -function observable(clazz) { - classObservable(clazz.prototype); -/* clazz.prototype.addObserver = function(observer) { - if (!this.observers) this.observers = []; - this.observers.push(observer); - } - - clazz.prototype.removeObserver = function(observer) { - if (!this.observers) return; - this.observers["delete"](observer); - } - - clazz.prototype.notify = function(event) { - if (this.log) { - this.log.debug("notify " + event); - } - if (!this.observers) return; - var args = []; - for (var i = 1; i < arguments.length; i++) { - args.push(arguments[i]); - } - for (var i = 0; i < this.observers.length; i++) { - var observer = this.observers[i]; - if (observer[event]) { - try { - observer[event].apply(observer, args); - } catch(e) { - //continue with the rest even if one observer fails - } - } - } - }*/ -} - -function classObservable(clazz) { - clazz.addObserver = function(observer) { - if (!this.observers) this.observers = []; - this.observers.push(observer); - }; - - clazz.removeObserver = function(observer) { - if (!this.observers) return; - this.observers["delete"](observer); - }; - - clazz.notify = function(event) { - if (this.log) { - this.log.debug("notify " + event); - } - if (!this.observers) return; - var args = []; - for (var i = 1; i < arguments.length; i++) { - args.push(arguments[i]); - } - for (var i = 0; i < this.observers.length; i++) { - var observer = this.observers[i]; - if (observer[event]) { - try { - observer[event].apply(observer, args); - } catch(e) { - //continue with the rest even if one observer fails - } - } - } - }; -} - -function defineEnum(clazz, names) { - var map = {}; - for (var i = 0; i < names.length; i++) { - clazz[names[i]] = i; - map[i] = names[i]; - } - return map; -} - -function $(id) { - return document.getElementById(id); -} - -function TargetSelecter(callback, cleanupCallback) { - this.callback = callback; - this.cleanupCallback = cleanupCallback; - var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); - this.win = wm.getMostRecentWindow('navigator:browser').getBrowser().contentWindow; - var doc = this.win.document; - var div = doc.createElement("div"); - div.setAttribute("style", "display: none;"); - doc.body.insertBefore(div, doc.body.firstChild); - this.div = div; - this.e = null; - this.r = null; - doc.addEventListener("mousemove", this, true); - doc.addEventListener("click", this, true); -} - -TargetSelecter.prototype.cleanup = function () { - try { - if (this.div) { - if (this.div.parentNode) { - this.div.parentNode.removeChild(this.div); - } - this.div = null; - } - if (this.win) { - var doc = this.win.document; - doc.removeEventListener("mousemove", this, true); - doc.removeEventListener("click", this, true); - } - } catch (e) { - if (e != "TypeError: can't access dead object") { - throw e; - } - } - this.win = null; - if (this.cleanupCallback) { - this.cleanupCallback(); - } -}; - -TargetSelecter.prototype.handleEvent = function (evt) { - switch (evt.type) { - case "mousemove": - this.highlight(evt.target.ownerDocument, evt.clientX, evt.clientY); - break; - case "click": - if (evt.button == 0 && this.e && this.callback) { - this.callback(this.e, this.win); - } //Right click would cancel the select - evt.preventDefault(); - evt.stopPropagation(); - this.cleanup(); - break; - } -}; - -TargetSelecter.prototype.highlight = function (doc, x, y) { - if (doc) { - var e = doc.elementFromPoint(x, y); - if (e && e != this.e) { - this.highlightElement(e); - } - } -} - -TargetSelecter.prototype.highlightElement = function (element) { - if (element && element != this.e) { - this.e = element; - } else { - return; - } - var r = element.getBoundingClientRect(); - var or = this.r; - if (r.left >= 0 && r.top >= 0 && r.width > 0 && r.height > 0) { - if (or && r.top == or.top && r.left == or.left && r.width == or.width && r.height == or.height) { - return; - } - this.r = r; - var style = "pointer-events: none; position: absolute; box-shadow: 0 0 0 1px black; outline: 1px dashed white; outline-offset: -1px; background-color: rgba(250,250,128,0.4); z-index: 100;"; - var pos = "top:" + (r.top + this.win.scrollY) + "px; left:" + (r.left + this.win.scrollX) + "px; width:" + r.width + "px; height:" + r.height + "px;"; - this.div.setAttribute("style", style + pos); - } else if (or) { - this.div.setAttribute("style", "display: none;"); - } -}; diff --git a/ide/main/src/content/treeView.js b/ide/main/src/content/treeView.js deleted file mode 100644 index b7c91cf97e8e3..0000000000000 --- a/ide/main/src/content/treeView.js +++ /dev/null @@ -1,851 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var TreeView = classCreate(); -objectExtend(TreeView.prototype, XulUtils.TreeViewHelper.prototype); -objectExtend(TreeView.prototype, { - initialize: function(editor, document, tree) { - this.log = new Log("TreeView"); - XulUtils.TreeViewHelper.prototype.initialize.call(this, tree); - this.editor = editor; - this.document = document; - this.rowCount = 0; - this.recordIndex = 0; - this.undoStack = []; - this.redoStack = []; - var self = this; - - var controller = { - supportsCommand : function(cmd) { - switch (cmd) { - case "cmd_delete": - case "cmd_copy": - case "cmd_cut": - case "cmd_paste": - case "cmd_selectAll": - case "cmd_undo": - case "cmd_redo": - case "cmd_selenium_startpoint": - case "cmd_selenium_breakpoint": - case "cmd_selenium_exec_command": - return true; - default: - return false; - } - }, - isCommandEnabled : function(cmd){ - switch (cmd) { - case "cmd_delete": - case "cmd_copy": - case "cmd_cut": - return self.selection.getRangeCount() > 0; - case "cmd_selectAll": - return true; - case "cmd_paste": - return self.clipboard != null; - case "cmd_undo": - return self.undoStack.length > 0; - case "cmd_redo": - return self.redoStack.length > 0; - case "cmd_selenium_startpoint": - return self.selection.getRangeCount() > 0; - case "cmd_selenium_breakpoint": - return self.selection.getRangeCount() > 0; - case "cmd_selenium_exec_command": - return self.selection.getRangeCount() > 0; - default: - return false; - } - }, - doCommand : function(cmd) { - switch (cmd) { - case "cmd_delete": self.deleteSelected(); break; - case "cmd_copy": self.copy(); break; - case "cmd_cut": self.cut(); break; - case "cmd_paste": self.paste(); break; - case "cmd_selectAll": self.selectAll(); break; - case "cmd_undo": self.undo(); break; - case "cmd_redo": self.redo(); break; - case "cmd_selenium_breakpoint": self.setBreakpoint(); break; - case "cmd_selenium_startpoint": self.setStartPoint(); break; - case "cmd_selenium_exec_command": self.executeCurrentCommand(); break; - } - }, - onEvent : function(evt) {} - }; - this.tree.controllers.appendController(controller); - this._loadSeleniumCommands(); - }, - - _createTransferable: function() { - return Components.classes["@mozilla.org/widget/transferable;1"]. - createInstance(Components.interfaces.nsITransferable); - }, - - _createClipboardString: function() { - return Components.classes["@mozilla.org/supports-string;1"]. - createInstance(Components.interfaces.nsISupportsString); - }, - - putCommandsToClipboard: function(commands) { - var trans = this._createTransferable(); - var str = this._createClipboardString(); - trans.addDataFlavor("text/unicode"); - var text = this.editor.app.getClipboardFormat().getSourceForCommands(commands); - str.data = text; - trans.setTransferData("text/unicode", str, text.length * 2); - var clipboard = Components.classes["@mozilla.org/widget/clipboard;1"]. - getService(Components.interfaces.nsIClipboard); - clipboard.setData(trans, null, Components.interfaces.nsIClipboard.kGlobalClipboard); - this.clipboard = commands; - window.updateCommands('clipboard'); - }, - - getCommandsFromClipboard: function() { - // not reading from a real clipboard... - return this.clipboard; - }, - - updateTextBox: function(id, value, disabled, autoComplete) { - var e = this.document.getElementById(id); - e.value = value; - e.disabled = disabled; - if (arguments.length == 4) { - e.disableAutoComplete = !autoComplete; - if (autoComplete) { - e.setAttribute("enablehistory", 'true'); - } else { - e.removeAttribute("enablehistory"); - } - } - }, - - updateTarget: function(value, disabled) { - this.updateTextBox("commandTarget", value, disabled); - this.document.getElementById('selectElementButton').disabled = disabled; - this.document.getElementById('findElementButton').disabled = disabled; - }, - - getCommand: function(row) { - if (row < this.testCase.commands.length) { - return this.testCase.commands[row]; - } else { - return this.newCommand; - } - }, - - /*Use to reload the command list*/ - reloadSeleniumCommands: function(){ - - this._loadSeleniumCommands(); - }, - - _loadSeleniumCommands: function() { - var commands = []; - - var nonWaitActions = ['open', 'selectWindow', 'chooseCancelOnNextConfirmation', 'answerOnNextPrompt', 'close', 'setContext', 'setTimeout', 'selectFrame']; - - for (func in this.editor.seleniumAPI.Selenium.prototype) { - //this.log.debug("func=" + func); - var r; - if (func.match(/^do[A-Z]/)) { - var action = func.substr(2,1).toLowerCase() + func.substr(3); - commands.push(action); - if (!action.match(/^waitFor/) && nonWaitActions.indexOf(action) < 0) { - commands.push(action + "AndWait"); - } - } else if (func.match(/^assert.+/)) { - commands.push(func); - commands.push("verify" + func.substr(6)); - } else if ((r = func.match(/^(get|is)(.+)$/))) { - var base = r[2]; - commands.push("assert" + base); - commands.push("verify" + base); - commands.push("store" + base); - commands.push("waitFor" + base); - var r2; - if ((r = func.match(/^is(.*)Present$/))) { - base = r[1]; - commands.push("assert" + base + "NotPresent"); - commands.push("verify" + base + "NotPresent"); - commands.push("waitFor" + base + "NotPresent"); - } else { - commands.push("assertNot" + base); - commands.push("verifyNot" + base); - commands.push("waitForNot" + base); - } - } - } - - commands.push("pause"); - commands.push("store"); - commands.push("echo"); - commands.push("break"); - - commands.sort(); - Editor.GENERIC_AUTOCOMPLETE.setCandidates(XulUtils.toXPCOMString(this.editor.getAutoCompleteSearchParam("commandAction")), - XulUtils.toXPCOMArray(commands)); - }, - - /** - * Updates the target field auto-population dropdown - */ - updateSeleniumTargets: function() { - var command = this.currentCommand; - var candidates = []; - var targetBox = this.document.getElementById("commandTarget"); - - if (command.type == 'command') { - // various strategies for auto-populating the target field - if (command.isRollup() && Editor.rollupManager) { - candidates = Editor.rollupManager.getRollupRulesForDropdown(); - } else { - if (command.targetCandidates) { - candidates = candidates.concat(command.targetCandidates); - } - // if lastURL exists, load only those targets associated with it. - // Otherwise, show all possible targets. - if (Editor.uiMap) { - candidates = candidates.concat(Editor.uiMap.getUISpecifierStringStubs()); - } - } - } - - if (candidates.length > 0) { - targetBox.setAttribute("enablehistory", "true"); - targetBox.disableAutoComplete = false; - var locators = [candidates.length]; - var types = [candidates.length]; - for (var i = 0; i < candidates.length; i++) { - locators[i] = candidates[i][0]; - types[i] = candidates[i][1]; - } - Editor.GENERIC_AUTOCOMPLETE.setCandidatesWithComments(XulUtils.toXPCOMString(this.editor.getAutoCompleteSearchParam("commandTarget")), - XulUtils.toXPCOMArray(locators), - XulUtils.toXPCOMArray(types)); - this.updateTarget(this.encodeText(command.target), false); - } else { - targetBox.removeAttribute("enablehistory"); - targetBox.disableAutoComplete = true; - this.updateTarget(this.encodeText(command.target), false); - } - }, - - /** - * Updates the value field, depending on the values of the other fields - */ - updateSeleniumValues: function() { - var command = this.currentCommand; - - // populate the arguments for rollups, but don't clobber an - // existing value - if (command.isRollup() && ! command.value && Editor.rollupManager) { - var rule = Editor.rollupManager.getRollupRule(command.target); - if (rule != null) { - var args = {}; - var keys = []; - for (var i = 0; i < rule.args.length; ++i) { - var name = rule.args[i].name; - args[name] = ""; - keys.push(name); - } - this.updateTextBox('commandValue', this.encodeText(to_kwargs(args, keys)), false); - } - } - }, - - /** - * execute undoable action - */ - executeAction: function(action) { - this.undoStack.push(action); - this.redoStack.splice(0); - action.execute(); - window.updateCommands("undo"); - }, - - encodeText: function(text) { - if (text) { - text = text.replace(/\\/g, "\\\\"); - text = text.replace(/\n/g, "\\n"); - return text; - } - return ''; - }, - - decodeText: function(text) { - if (text) { - text = text.replace(/\\n/g, "\n"); - text = text.replace(/\\\\/g, "\\"); - return text; - } - return ''; - }, - - /* - * public methods - */ - rowInserted: function(index) { - this.log.debug("rowInserted: index=" + index); - this.recordIndex++; //Samit: Fix: Fix the annoying skip over one command when recording in the middle of a script - this.treebox.rowCountChanged(index, 1); - this.rowCount++; - //this.treebox.scrollToRow(this.testCase.commands.length - 1); - //if (index >= this.recordIndex) { - //this.recordIndex++; //Samit: Fix: Fix the annoying skip over one command when recording in the middle of a script - //} - this.treebox.ensureRowIsVisible(index); - }, - - refresh: function() { - this.log.debug("refresh: old rowCount=" + this.rowCount); - this.treebox.rowCountChanged(0, -this.rowCount); - var length = 0; - if (this.testCase != null) { - length = this.testCase.commands.length; - } - this.treebox.rowCountChanged(0, length + 1); - this.rowCount = length + 1; - if (this.recordIndex > length) { - this.recordIndex = length; - } - this.newCommand = new Command(); - this.log.debug("refresh: new rowCount=" + this.rowCount); - }, - - // synchronize model from view - syncModel: function(force) { - }, - - // called when the command is selected in the tree view - selectCommand: function() { - if (this.tree.currentIndex >= 0) { - var command = this.getCommand(this.tree.currentIndex); - this.currentCommand = command; - if (command.type == 'command') { - this.updateTextBox("commandAction", command.command, false, true); - this.updateSeleniumTargets(); - this.updateTextBox("commandValue", this.encodeText(command.value), false); - } else if (command.type == 'comment') { - this.updateTextBox("commandAction", command.comment, false, false); - this.updateTarget('', true); - this.updateTextBox("commandValue", '', true); - } - - this.selectRecordIndex(this.tree.currentIndex); - if (command.type == 'command') { - this.editor.showReference(command); - this.editor.showUIReference(command.target); - this.editor.showRollupReference(command); - } - } else { - this.updateTextBox("commandAction", '', true); - this.updateTarget('', true); - this.updateTextBox("commandValue", '', true); - this.currentCommand = null; - } - window.updateCommands('select'); - }, - selectRecordIndex: function(index) { - var oldRecordIndex = this.recordIndex; - this.recordIndex = index; - this.rowUpdated(oldRecordIndex); - this.rowUpdated(this.recordIndex); - }, - // called when the user enters any text into the textbox - updateCurrentCommand: function(key, value) { - if (this.currentCommand != null) { - this.executeAction(new TreeView.UpdateCommandAction(this, key, value)); - if (key == 'command') { - if (this.currentCommand.type == 'command') { - this.updateSeleniumTargets(); - this.editor.showReference(this.currentCommand); - } - } - else if (key == 'targetCandidates') { - this.updateSeleniumTargets(); - if (value != null && value instanceof Array && value[0]) { - this.updateCurrentCommand('target', value[0][0]); - this.selectCommand(); - } - } - else if (key == 'target') { - this.updateSeleniumValues(); - this.editor.showUIReference(value); - this.editor.showRollupReference(this.currentCommand); - } - else if (key == 'value') { - this.editor.showRollupReference(this.currentCommand); - } - } - }, - onHide: function() { - this.updateTextBox("commandAction", '', true); - this.updateTarget('', true); - this.updateTextBox("commandValue", '', true); - this.currentCommand = null; - }, - getRecordIndex: function() { - return this.recordIndex; - }, - - // - // editing functions - // - copyOrDelete: function(copy, doDelete) { - if (!this.treebox.focused) return; - var count = this.selection.getRangeCount(); - if (count > 0) { - var copyCommands = []; - var deleteRanges = []; - var currentIndex = this.tree.currentIndex; - for (var i = 0; i < count; i++) { - var start = new Object(); - var end = new Object(); - this.selection.getRangeAt(i, start, end); - var deleteCommands = {start: start.value, commands:[]}; - for (var v = start.value; v <= end.value; v++) { - var command = this.getCommand(v); - copyCommands.push(command.createCopy()); - if (doDelete && command != this.newCommand) { - deleteCommands.commands.push(command); - } - } - deleteRanges.push(deleteCommands); - } - if (copy) { - this.putCommandsToClipboard(copyCommands); - } - if (doDelete) { - this.executeAction(new TreeView.DeleteCommandAction(this, deleteRanges)); - } - } - }, - deleteSelected: function() { - this.copyOrDelete(false, true); - }, - selectAll: function() { - if (this.testCase.commands.length > 1) { - this.selection.rangedSelect(0, this.testCase.commands.length - 1, false); - } - }, - paste: function() { - if (!this.treebox.focused) return; - if (this.clipboard != null) { - //var commands = this.clipboard; - var commands = this.getCommandsFromClipboard(); - var currentIndex = this.tree.currentIndex; - if (this.selection.getRangeCount() == 0) { - currentIndex = this.rowCount; - } - this.executeAction(new TreeView.PasteCommandAction(this, currentIndex, commands)); - /* - for (var i = 0; i < commands.length; i++) { - var command = commands[i]; - this.insertAt(currentIndex + i, command.createCopy()); - }*/ - } - }, - insertAt: function(pos, command) { - this.testCase.commands.splice(pos, 0, command); - this.treebox.rowCountChanged(pos, 1); - this.treebox.ensureRowIsVisible(pos); - this.rowCount++; - this.log.debug("insertAt"); - }, - cut: function() { - this.copyOrDelete(true, true); - }, - copy: function() { - this.copyOrDelete(true, false); - }, - insertCommand: function() { - if (this.tree.currentIndex >= 0) { - var currentIndex = this.tree.currentIndex; - this.insertAt(this.tree.currentIndex, new Command()); - this.selection.select(currentIndex); - } - }, - insertComment: function() { - if (this.tree.currentIndex >= 0) { - var currentIndex = this.tree.currentIndex; - this.insertAt(this.tree.currentIndex, new Comment()); - this.selection.select(currentIndex); - } - }, - setBreakpoint: function() { - if (this.tree.currentIndex >= 0) { - var command = this.getCommand(this.tree.currentIndex); - command.breakpoint = command.breakpoint ? null : true; - if (command == this.testCase.startPoint) { - this.testCase.startPoint = null; - } - this.rowUpdated(this.tree.currentIndex); - } - }, - setStartPoint: function() { - if (this.tree.currentIndex >= 0) { - var command = this.getCommand(this.tree.currentIndex); - var oldStartPoint = this.testCase.startPoint; - if (command.breakpoint) { - command.breakpoint = null; - } - if (oldStartPoint == command) { - // clear startpoint - this.testCase.startPoint = null; - } else { - this.testCase.startPoint = command; - this.rowUpdated(this.tree.currentIndex); - } - if (oldStartPoint) { - this.rowUpdated(this.testCase.commands.indexOf(oldStartPoint)); - } - } - }, - executeCurrentCommand: function() { - if (this.tree.currentIndex >= 0) { - var command = this.getCommand(this.tree.currentIndex); - if (this.newCommand != command && command.type == 'command') { - this.selection.clearSelection(); - this.editor.selDebugger.executeCommand(command); - } - } - }, - - undo: function() { - var action = this.undoStack.pop(); - if (action != null) { - action.undo(); - this.redoStack.push(action); - window.updateCommands("undo"); - } - }, - - redo: function() { - var action = this.redoStack.pop(); - if (action != null) { - action.execute(); - this.undoStack.push(action); - window.updateCommands("undo"); - } - }, - - // - // nsITreeView interfaces - // - getCellText : function(row, column){ - var colId = column.id != null ? column.id : column; - var command = this.getCommand(row); - if (command.type == 'command') { - return command[colId]; - } else if (command.type == 'comment') { - return colId == 'command' ? command.comment : ''; - } else { - return null; - } - }, - getRowProperties: function(row, props) { - var command = this.getCommand(row); - if (this.selection.isSelected(row)) return; - if (row == this.testCase.debugContext.debugIndex) { - return XulUtils.setProperty(props, "debugIndex"); - } else if (command.result == 'done') { - return XulUtils.setProperty(props, "commandDone"); - } else if (command.result == 'passed') { - return XulUtils.setProperty(props, "commandPassed"); - } else if (command.result == 'failed') { - return XulUtils.setProperty(props, "commandFailed"); - } else if (command.selectedForReplacement) { - return XulUtils.setProperty(props, "commandSelectedForReplacement"); - } - }, - getCellProperties: function(row, col, props) { - var command = this.getCommand(row); - var propRa = []; - if (command.type == 'comment') { - XulUtils.setPropertyRa(props, "comment", propRa); - } - if (command == this.currentCommand) { - XulUtils.setPropertyRa(props, "currentCommand", propRa); - } - if (row == this.recordIndex) { - XulUtils.setPropertyRa(props, "recordIndex", propRa); - } - if (0 == col.index && command.breakpoint) { - XulUtils.setPropertyRa(props, "breakpoint", propRa); - } - if ((this.testCase.startPoint) && 0 == col.index && this.testCase.startPoint == command) { - XulUtils.setPropertyRa(props, "startpoint", propRa); - } - return propRa.join(' '); - }, - - getParentIndex: function(index){return -1;}, - - getSourceIndexFromDrag: function () { - try{ - var dragService = Cc["@mozilla.org/widget/dragservice;1"]. - getService().QueryInterface(Ci.nsIDragService); - var dragSession = dragService.getCurrentSession(); - var transfer = Cc["@mozilla.org/widget/transferable;1"]. - createInstance(Ci.nsITransferable); - - transfer.addDataFlavor("text/unicode"); - dragSession.getData(transfer, 0); - - var dataObj = {}; - var len = {}; - var sourceIndex = -1; - var out = {}; - - transfer.getAnyTransferData(out, dataObj, len); - - if (dataObj.value) { - sourceIndex = dataObj.value.QueryInterface(Ci.nsISupportsString).data; - sourceIndex = parseInt(sourceIndex.substring(0, len.value)); - } - - var start = new Object(); - var end = new Object(); - var numRanges = this.selection.getRangeCount(); - var n = 0; - for (var t = 0; t < numRanges; t++){ - this.selection.getRangeAt(t,start,end); - for (var v = start.value; v <= end.value; v++){ - n++; - } - } - sourceIndex = n > 1 ? -1 : sourceIndex; - - return sourceIndex; - - }catch(e){ - new Log("DND").error("getSourceIndexFromDrag error: "+e); - } - }, - - canDrop: function(targetIndex, orientation) { - var sourceIndex = this.getSourceIndexFromDrag(); - - return (sourceIndex != -1 && - sourceIndex != targetIndex && - sourceIndex != (targetIndex + orientation)); - }, - - drop: function(dropIndex, orientation) { - - var sourceIndex = this.getSourceIndexFromDrag(); - if (sourceIndex != -1) - this.executeAction(new TreeView.dndCommandAction(this, sourceIndex, dropIndex, orientation)); - } - }); - -TreeView.UpdateCommandAction = function(treeView, key, value) { - this.treeView = treeView; - this.command = treeView.currentCommand; - this.key = key; - this.value = value; - this.index = this.treeView.tree.currentIndex; - this.wasNewCommand = this.command == treeView.newCommand; -}; - -TreeView.UpdateCommandAction.prototype = { - execute: function() { - if (this.command.type == 'command') { - this.oldValue = this.command[this.key]; - this.command[this.key] = this.value; - } else if (this.command.type == 'comment' && this.key == 'command') { - this.oldValue = this.command['comment']; - this.command['comment'] = this.value; - } - if (this.index >= 0) { - this.treeView.treebox.invalidateRow(this.index); - } - if (this.wasNewCommand) { - this.treeView.testCase.commands.push(this.command); - this.treeView.newCommand = new Command(); - this.treeView.treebox.rowCountChanged(this.treeView.rowCount, 1); - this.treeView.rowCount++; - this.treeView.log.debug("added new command"); - } - this.treeView.testCase.setModified(); - }, - - undo: function() { - if (this.command.type == 'command') { - this.command[this.key] = this.oldValue; - } else if (this.command.type == 'comment' && this.key == 'command') { - this.command['comment'] = this.oldValue; - } - if (this.index >= 0) { - this.treeView.treebox.invalidateRow(this.index); - } - if (this.wasNewCommand) { - this.treeView.testCase.commands.pop(); - this.treeView.newCommand = new Command(); - this.treeView.treebox.rowCountChanged(this.treeView.rowCount - 1, -1); - this.treeView.rowCount--; - this.treeView.log.debug("removed new command"); - } else if (this.index == this.treeView.tree.currentIndex) { - this.treeView.selectCommand(); - } - } -}; - -TreeView.DeleteCommandAction = function(treeView, ranges) { - this.treeView = treeView; - this.ranges = ranges; -}; - -TreeView.DeleteCommandAction.prototype = { - execute: function() { - var currentIndex = this.treeView.tree.currentIndex; - for (var i = this.ranges.length - 1; i >= 0; i--) { - var range = this.ranges[i]; - this.treeView.testCase.commands.splice(range.start, range.commands.length); - this.treeView.treebox.rowCountChanged(range.start, -range.commands.length); - this.treeView.rowCount -= range.commands.length; - if (range.start < currentIndex) { - currentIndex -= range.commands.length; - if (currentIndex < range.start) { - currentIndex = range.start; - } - } - } - if (currentIndex >= this.treeView.rowCount) currentIndex = this.treeView.rowCount - 1; - this.treeView.selection.select(currentIndex); - }, - - undo: function() { - var currentIndex = this.treeView.tree.currentIndex; - for (var i = 0; i < this.ranges.length; i++) { - var range = this.ranges[i]; - for (var j = 0; j < range.commands.length; j++) { - this.treeView.testCase.commands.splice(range.start + j, 0, range.commands[j].createCopy()); - } - this.treeView.treebox.rowCountChanged(range.start, range.commands.length); - this.treeView.rowCount += range.commands.length; - if (currentIndex <= range.start) { - currentIndex += range.commands.length; - } - } - this.treeView.selection.select(currentIndex); - } -}; - -TreeView.PasteCommandAction = function(treeView, index, commands) { - this.treeView = treeView; - this.index = index; - this.commands = commands; -}; - -TreeView.PasteCommandAction.prototype = { - execute: function() { - var currentIndex = this.treeView.tree.currentIndex; - for (var i = 0; i < this.commands.length; i++) { - this.treeView.testCase.commands.splice(this.index + i, 0, this.commands[i].createCopy()); - } - this.treeView.treebox.rowCountChanged(this.index, this.commands.length); - this.treeView.rowCount += this.commands.length; - if (currentIndex <= this.index) { - currentIndex += this.commands.length; - } - this.treeView.selection.select(currentIndex); - this.treeView.treebox.ensureRowIsVisible(currentIndex); - }, - - undo: function() { - var currentIndex = this.treeView.tree.currentIndex; - this.treeView.testCase.commands.splice(this.index, this.commands.length); - this.treeView.treebox.rowCountChanged(this.index, -this.commands.length); - this.treeView.rowCount -= this.commands.length; - if (this.index < currentIndex) { - currentIndex -= this.commands.length; - if (currentIndex < this.index) { - currentIndex = this.index; - } - } - this.treeView.selection.select(currentIndex); - this.treeView.treebox.ensureRowIsVisible(currentIndex); - } -}; - -//D'n'D action for the undo/redo process -TreeView.dndCommandAction = function(treeView, sourceIndex, dropIndex, orientation){ - - this.treeView = treeView; - this.sourceIndex = sourceIndex; - this.dropIndex = dropIndex; - this.orientation = orientation; - this.sourceIndexU = dropIndex; - this.dropIndexU = sourceIndex; - if (this.dropIndex > this.sourceIndex) { - if (this.orientation == Ci.nsITreeView.DROP_BEFORE) - this.sourceIndexU--; - }else{ - if (this.orientation == Ci.nsITreeView.DROP_AFTER) - this.sourceIndexU++; - } - this.orientationU = this.orientation == Ci.nsITreeView.DROP_BEFORE ? Ci.nsITreeView.DROP_AFTER : Ci.nsITreeView.DROP_BEFORE; -}; - -TreeView.dndCommandAction.prototype = { - - execute: function(){ - - try{ - if (this.dropIndex > this.sourceIndex) { - if (this.orientation == Ci.nsITreeView.DROP_BEFORE) - this.dropIndex--; - }else{ - if (this.orientation == Ci.nsITreeView.DROP_AFTER) - this.dropIndex++; - } - - var removedRow = this.treeView.testCase.commands.splice(this.sourceIndex, 1)[0]; - this.treeView.testCase.commands.splice(this.dropIndex, 0, removedRow); - - this.treeView.treebox.invalidate(); - this.treeView.selection.clearSelection(); - this.treeView.selection.select(this.dropIndex); - }catch(e){ - new Log("DND").error("dndCommandAction.execute error : "+e); - } - }, - - undo: function(){ - - try{ - if (this.dropIndexU > this.sourceIndexU) { - if (this.orientationU == Ci.nsITreeView.DROP_BEFORE) - this.dropIndexU--; - }else{ - if (this.orientationU == Ci.nsITreeView.DROP_AFTER) - this.dropIndexU++; - } - - var removedRow = this.treeView.testCase.commands.splice(this.sourceIndexU, 1)[0]; - this.treeView.testCase.commands.splice(this.dropIndexU, 0, removedRow); - - this.treeView.treebox.invalidate(); - this.treeView.selection.clearSelection(); - this.treeView.selection.select(this.dropIndexU); - }catch(e){ - new Log("DND").error("dndCommandAction.undo error : "+e); - } - - } -}; \ No newline at end of file diff --git a/ide/main/src/content/ui-view.html b/ide/main/src/content/ui-view.html deleted file mode 100644 index d3005b0d4c7da..0000000000000 --- a/ide/main/src/content/ui-view.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/ide/main/src/content/utils/deferred.js b/ide/main/src/content/utils/deferred.js deleted file mode 100644 index c38cb8a7a2660..0000000000000 --- a/ide/main/src/content/utils/deferred.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2014 Samit Badle - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Partial implementation of promises - * Loosely modeled on jQuery's Deferred - */ -function Deferred(ctor) { - var that = this, state = Deferred.PENDING, done = [], fail = [], argsValue = null; - - function callAll(newState, callbacks, optionalArgs) { - if (state !== Deferred.PENDING) { - throw "Promise has been fulfilled"; - } - state = newState; - argsValue = optionalArgs; - callbacks.forEach(function (callback) { - if (callback) { - callback.apply(that, optionalArgs); - } - }, that); - return that; - } - - this.state = function () { - return state; - }; - - this.isPending = function () { - return state === Deferred.PENDING; - }; - - this.isResolved = function () { - return state === Deferred.RESOLVED; - }; - - this.isRejected = function () { - return state === Deferred.REJECTED; - }; - - /** - * Get the arguments to resolve or reject - * @return {*} Returns null if pending or an arguments object containing the arguments passed to resolve or reject. - */ - this.value = function () { - return argsValue; - }; - - this.done = function (callback) { - if (state === Deferred.RESOLVED) { - //call immediately - callback.apply(that, argsValue); - } else { - done.push(callback); - } - return that; - }; - - this.fail = function (callback) { - if (state === Deferred.REJECTED) { - callback.apply(that, argsValue); - } else { - fail.push(callback); - } - return that; - }; - - this.then = function (doneCallback, failCallback) { - that.done(doneCallback); - return that.fail(failCallback); - }; - - this.resolve = function (optionalArgs) { - return callAll(Deferred.RESOLVED, done, arguments); - }; - - this.reject = function (optionalArgs) { - return callAll(Deferred.REJECTED, fail, arguments); - }; - - /** - * Use pipe to either chain deferred together or to filter/map the results - * The working is simple. Calling pipe will create a new deferred (master). One of the callbacks will be called - * when the top deferred is resolved or rejected along with the received arguments. If the return value of the - * callback is a deferred, this chained deferred would determine the state and return of the master deferred. - * If the return of the callback is not a deferred the results would simply be treated as filtered/mapped results. - * If using for filtering / mapping the return value of the function can either be an array containing filtered results - * for each arguments or a single non array value. - * If you simply want to return the arguments, convert it to an array first using - * Array.prototype.slice.call(arguments) - * @param doneCallback - * @param failCallback - * @return {Deferred} a new Deferred which will chain or filter the result using the appropriate callback - */ - this.pipe = function (doneCallback, failCallback) { - return new Deferred(function (master) { - if (doneCallback) { - that.done(function () { - var filter = doneCallback.apply(that, arguments); - if (Deferred.isPromise(filter)) { - filter.then(function () { - master.resolve.apply(master, arguments); - }, function () { - master.reject.apply(master, arguments); - }); - } else { - if (Array.isArray(filter)) { - master.resolve.apply(master, filter); - } else { - master.resolve.call(master, filter); - } - } - }); - } else { - that.done(function () { - master.resolve.apply(master, arguments); - }); - } - if (failCallback) { - that.fail(function () { - var filter = failCallback.apply(that, arguments); - if (Deferred.isPromise(filter)) { - filter.then(function () { - master.resolve.apply(master, arguments); - }, function () { - master.reject.apply(master, arguments); - }); - } else { - if (Array.isArray(filter)) { - master.reject.apply(master, filter); - } else { - master.reject.call(master, filter); - } - } - }); - } else { - that.fail(function () { - master.reject.apply(master, arguments); - }); - } - }); - }; - - if (ctor) { - ctor.call(this, this); - } -} - -Deferred.isPromise = function (object) { - return object !== null && typeof object.then === 'function'; -}; - -Deferred.PENDING = 'pending'; -Deferred.RESOLVED = 'resolved'; -Deferred.REJECTED = 'rejected'; diff --git a/ide/main/src/content/utils/dispatcher.js b/ide/main/src/content/utils/dispatcher.js deleted file mode 100644 index 3d434d839dd89..0000000000000 --- a/ide/main/src/content/utils/dispatcher.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2015 Samit Badle - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A dispatcher that accepts data and queues and posts it to a server - */ -function Dispatcher(queuePath, server) { - this.server = server; - this.queuePath = queuePath; -} - - -Dispatcher.prototype.setServer = function(server) { - this.server = server; -}; - - -Dispatcher.prototype.send = function(data) { - return HTTP.post(this.server, data); - // TODO convert and persist in queue - // TODO setup background process to handle failures -}; - diff --git a/ide/main/src/content/utils/gist.js b/ide/main/src/content/utils/gist.js deleted file mode 100644 index e507461069169..0000000000000 --- a/ide/main/src/content/utils/gist.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2015 Samit Badle - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Creating public gists on GitHub - */ -function GitHub() { -} - -/** - * Create a gist with the given description, content and optionally a filename and returns a deferred that gives the url of the created gist - * - * @param description description of the gist - * @param content content of the gist - * @param [filename] optional filename for the content - * @returns {Deferred} deferred which on success provides the gist url - */ -GitHub.createGist = function(description, content, filename) { - var files = {}; - files[filename || 'file'] = content; - return this.createGistWithFiles(description, files); -}; - -/** - * Create a gist with the given description and a set of files and returns a deferred that gives the url of the created gist - * - * @param description description of the gist - * @param {object.} files an object with each key is the filename and value is the content - * @returns {Deferred} deferred which on success provides the gist url - */ -GitHub.createGistWithFiles = function(description, files) { - var gistFiles = {}; - for (var file in files) { - gistFiles[file] = { - content: files[file] - }; - } - var data = { - description: description, - public: true, - files: gistFiles - }; - return new Deferred(function(deferred) { - HTTP.post('https://api.github.com/gists', data, {}, function(response, success, status) { - if (response && (status == "201")) { - var result = JSON.parse(response); - if (result.html_url) { - deferred.resolve(result.html_url); - return; - } - } - deferred.reject(response, success, status); - }); - }); -}; diff --git a/ide/main/src/content/utils/http.js b/ide/main/src/content/utils/http.js deleted file mode 100644 index f8b3a44402381..0000000000000 --- a/ide/main/src/content/utils/http.js +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2014 Samit Badle - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * HTTP service for Firefox addons - * Do not instantiate - */ -function HTTP() { -} - -/** - * Make a generic http request - * - * @param method GET, POST, DELETE, PUT or any other http request - * @param url - * @param {string|object} [data] string or object, object is converted to json and sets the Content-Type header - * @param {Object.} [headers] hash with keys containing header names and values containing its value - * @param {function(string, string, string)} [callback] a callback function that takes response, success, status. If callback is not given, - * a deferred object is created. If deferred.js is not loaded, an exception will occur. - * @returns {Deferred} if a deferred has been created - */ -HTTP.request = function(method, url, data, headers, callback) { - var deferred; - if (!callback) { - deferred = new Deferred(); - callback = function(response, success, status) { - if (success) { - deferred.resolve(response, success, status); - } else { - deferred.reject(response, success, status); - } - }; - - } - var httpRequest = new XMLHttpRequest(); - //LOG.debug('Executing: ' + method + " " + url); - httpRequest.open(method, url); - httpRequest.onreadystatechange = function() { - try { - if (httpRequest.readyState === 4) { - if (httpRequest.status === 200 || (httpRequest.status > 200 && httpRequest.status < 300)) { - callback(httpRequest.responseText, true, httpRequest.status); - } else if (httpRequest.status === 500 ) { - callback(httpRequest.responseText, false, httpRequest.status); - } else { - callback(httpRequest.responseText, false, httpRequest.status); - //TODO eliminate alert and signal the failure -// alert('There was a problem with the request.\nUrl: ' + url + '\nHttp Status: ' + httpRequest.status + "\nResponse: " + httpRequest.responseText); - LOG.debug('Error: There was a problem with the request.\nUrl: ' + url + '\nHttp Status: ' + httpRequest.status + "\nResponse: " + httpRequest.responseText); - } - } - } catch(e) { - //TODO eliminate alert and signal the failure, typically when callback is not given and Deferred is not loaded - //LOG.error('Error: There was a problem with the request.\nUrl: ' + url + '\nHttp Status: ' + httpRequest.status + "\nResponse: " + httpRequest.responseText); - alert('Caught Exception in HTTP.request: ' + e); - throw e; - } - }; - //httpRequest.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; - if (data && typeof data !== 'string') { - data = JSON.stringify(data); - //do this before you set custom headers, so that user supplied headers will overwrite this - httpRequest.setRequestHeader('Content-Type', 'application/json; charset=utf-8'); - } - if (headers) { - for (var header in headers) { - httpRequest.setRequestHeader(header, headers[header] + ''); - } - } - if (data) { - httpRequest.send(data); - } else { - httpRequest.send(); - } - return deferred; -}; - -/** - * Shortcut method to create HTTP POST requests. See HTTP.request() for more details. - * - * @param url - * @param {string|object} [data] string or object, object is converted to json and sets the Content-Type header - * @param {Object.} [headers] hash with keys containing header names and values containing its value - * @param {function(string, string, string)} [callback] a callback function that takes response, success, status. If callback is not given, - * a deferred object is created. If deferred.js is not loaded, an exception occurs. - * @returns {Deferred} if a deferred has been created - */ -HTTP.post = function(url, data, headers, callback) { - return this.request('POST', url, data, headers, callback); -}; - -/** - * Shortcut method to create HTTP GET requests. See HTTP.request() for more details. - * - * @param url - * @param {Object.} [headers] hash with keys containing header names and values containing its value - * @param {function(string, string, string)} [callback] a callback function that takes response, success, status. If callback is not given, - * a deferred object is created. If deferred.js is not loaded, an exception occurs. - * @returns {Deferred} if a deferred has been created - */ -HTTP.get = function (url, headers, callback) { - return this.request('GET', url, null, headers, callback); -}; - -/** - * Shortcut method to create HTTP DELETE requests. See HTTP.request() for more details. - * - * @param url - * @param {Object.} [headers] hash with keys containing header names and values containing its value - * @param {function(string, string, string)} [callback] a callback function that takes response, success, status. If callback is not given, - * a deferred object is created. If deferred.js is not loaded, an exception occurs. - * @returns {Deferred} if a deferred has been created - */ -HTTP._delete = function (url, headers, callback) { - return this.request('DELETE', url, null, headers, callback); -}; - diff --git a/ide/main/src/content/webdriver-backed-selenium.js b/ide/main/src/content/webdriver-backed-selenium.js deleted file mode 100644 index 218aac8b2352d..0000000000000 --- a/ide/main/src/content/webdriver-backed-selenium.js +++ /dev/null @@ -1,422 +0,0 @@ -function WebdriverBackedSelenium(baseUrl, useLastWindow, webDriverBrowserString, reuseBrowser, webDriverServer) { - this.defaultTimeout = WebdriverBackedSelenium.DEFAULT_TIMEOUT; - this.mouseSpeed = WebdriverBackedSelenium.DEFAULT_MOUSE_SPEED; - this.baseUrl = baseUrl; - this.webDriverBrowserString = webDriverBrowserString; - this.webDriverServer = webDriverServer || "http://localhost:4444"; - this.webDriverServer = this.webDriverServer.replace(/\/\s*$/, ""); - WebdriverBackedSelenium.webDriverServer = this.webDriverServer; - if ( reuseBrowser == 'never') { // never: Always open a new window, i.e. never reuse - this.reuseBrowser = false; - LOG.debug("Asked to always open a new window"); - } else if (reuseBrowser == 'always') { // always: Never open a new window, i.e. always reuse - this.reuseBrowser = true; - LOG.debug("Asked to always reuse an existing window"); - } else { // suite: Open a new window for a test suite, i.e. do not reuse for a play suite - // TODO currently this results in a new window for every test case if you interactively play it. Fix it is there is demand - this.reuseBrowser = useLastWindow ? true : false; - LOG.debug("Asked to open a new window for a suite, will " + (this.reuseBrowser ? "reuse window if available" : "open a new window")); - } - this.browserbot = { - baseUrl: baseUrl, - runScheduledPollers: function() { - } - } -} - -WebdriverBackedSelenium.prototype.reset = function() { - //TODO destroy the current session and establish a new one? -}; - -WebdriverBackedSelenium.prototype.ensureNoUnhandledPopups = function() { - -}; - -WebdriverBackedSelenium.prototype.preprocessParameter = function(value) { - var match = value.match(/^javascript\{((.|\r?\n)+)\}$/); - if (match && match[1]) { - //TODO Samit: need an alternative! - return eval(match[1]).toString(); - } - return this.replaceVariables(value); -}; - -/* - * Search through str and replace all variable references ${varName} with their - * value in storedVars. - */ -WebdriverBackedSelenium.prototype.replaceVariables = function(str) { - var stringResult = str; - - // Find all of the matching variable references - var match = stringResult.match(/\$\{\w+\}/g); - if (!match) { - return stringResult; - } - - // For each match, lookup the variable value, and replace if found - for (var i = 0; match && i < match.length; i++) { - var variable = match[i]; // The replacement variable, with ${} - var name = variable.substring(2, variable.length - 1); // The replacement variable without ${} - var replacement = storedVars[name]; - if (replacement && typeof(replacement) === 'string' && replacement.indexOf('$') != -1) { - replacement = replacement.replace(/\$/g, '$$$$'); //double up on $'s because of the special meaning these have in 'replace' - } - if (replacement != undefined) { - stringResult = stringResult.replace(variable, replacement); - } - } - return stringResult; -}; - -function webdriverBackedSeleniumBuilder() { - for (var fn in Selenium.prototype) { - var match = /^(get|is|do)([A-Z].+)$/.exec(fn); - if (match) { - var baseName = match[2]; - var isBoolean = (match[1] == "is"); - var argsLen = Selenium.prototype[fn].length; - var cmd = (match[1] != "do") ? fn : baseName.substr(0, 1).toLowerCase() + baseName.substr(1); - if (!WebdriverBackedSelenium.prototype[fn]) { - WebdriverBackedSelenium.prototype[fn] = webdriverBackedSeleniumFnBuilder(cmd, argsLen); - } - } - } - WebdriverBackedSelenium.DEFAULT_TIMEOUT = Selenium.DEFAULT_TIMEOUT; - WebdriverBackedSelenium.DEFAULT_MOUSE_SPEED = Selenium.DEFAULT_MOUSE_SPEED; - WebdriverBackedSelenium.webDriverServer = "http://localhost:4444"; - - //The following do* are from selenium-runner.js - //TODO: Samit: find a way to eliminate the copied code - WebdriverBackedSelenium.prototype.doPause = function(waitTime) { - currentTest.pauseInterval = waitTime; - }; - - WebdriverBackedSelenium.prototype.doEcho = function(message) { - LOG.info("echo: " + message); - }; - - WebdriverBackedSelenium.prototype.doSetSpeed = function(speed) { - var milliseconds = parseInt(speed); - if (milliseconds < 0) milliseconds = 0; - editor.setInterval(milliseconds); - }; - - WebdriverBackedSelenium.prototype.getSpeed = function() { - return editor.getInterval(); - }; - - WebdriverBackedSelenium.prototype.doSetTimeout = function() { - - }; - - WebdriverBackedSelenium.prototype.doStore = function(value, varName) { - storedVars[varName] = value; - }; - - WebdriverBackedSelenium.prototype._elementLocator = function(sel1Locator) { - var locator = parse_locator(sel1Locator); - if (sel1Locator.match(/^\/\//) || locator.type == 'xpath') { - locator.type = 'xpath'; - return locator; - } - if (locator.type == 'css') { - return locator; - } - if (locator.type == 'id') { - return locator; - } - if (locator.type == 'link') { - locator.string = locator.string.replace(/^exact:/, ''); - return locator; - } - if (locator.type == 'name') { - return locator; - } - return null; - }; - - WebdriverBackedSelenium.prototype.findElement = function(locator) { - var l = this._elementLocator(locator); - if (l) { -// alert("findElement - how: " + l.type + ", what: " + l.string); - return this.webDriverCommand('session/:sessionId/element', {}, {using: l.type, value: l.string}); - } else { - return new Deferred(function(deferred) { - deferred.reject('This types of locators cannot be used in webdriver playback mode. locator: ' + locator); - }); - } - }; - - WebdriverBackedSelenium.prototype.doSendKeys = function(locator, value) { -// alert("doSendKeys - Locator: " + locator + ", value: " + value); - var self = this; - var keys = value.split(/(.)/); - - return this.findElement(locator).pipe(function (webElement) { - return self.webDriverCommand('session/:sessionId/element/:id/value', {id: webElement.ELEMENT}, {value: keys}); - }); - }; - -// WebdriverBackedSelenium.prototype.doStoreText = function(target, varName) { -// var element = this.page().findElement(target); -// storedVars[varName] = getText(element); -// }; -// -// WebdriverBackedSelenium.prototype.doStoreAttribute = function(target, varName) { -// storedVars[varName] = this.page().findAttribute(target); -// }; -// -// WebdriverBackedSelenium.prototype.doStore = function(value, varName) { -// storedVars[varName] = value; -// }; - -} - -function webdriverBackedSeleniumFnBuilder(cmd, argsLen) { - if (argsLen != 1) { - return function() { - //TODO return a promise - var self = this; - var cmdArgs = Array.prototype.slice.call(arguments); - this.waitingForRemoteResult = true; - function invokeCommand() { - return self.remoteControlCommand(cmd, cmdArgs).done(function(response) { - self.waitingForRemoteResult = false; - //TODO do something with the response - //alert("Received response to " + cmd + ": " + response); - }).fail(function(response) { - self.waitingForRemoteResult = false; - //alert("Received response to " + cmd + ": " + response); - }); - } - - if (!self.sessionId) { - return self.startNewSession().pipe(invokeCommand); - } else { - return invokeCommand(); - } - }; - } - //There is no difference between this and the above fn, except the argument list - // This argument list is required for correct dispatching of the call - return function(arg1) { - //TODO return a promise - var self = this; - var cmdArgs = Array.prototype.slice.call(arguments); - this.waitingForRemoteResult = true; - function invokeCommand() { - return self.remoteControlCommand(cmd, cmdArgs).done(function(response) { - self.waitingForRemoteResult = false; - //TODO do something with the response - //alert("Received response to " + cmd + ": " + response); - }).fail(function(response) { - self.waitingForRemoteResult = false; - //alert("Received response to " + cmd + ": " + response); - }); - } - - if (!self.sessionId) { - return self.startNewSession().pipe(invokeCommand); - } else { - return invokeCommand(); - } - }; -} - -// Populate the WebdriverBackedSelenium with Selenium API functions -webdriverBackedSeleniumBuilder(); - -//TODO Samit: get these on some other object -WebdriverBackedSelenium.prototype.startNewSession = function() { - var self = this; - return this.startNewWebdriverSession(this.webDriverBrowserString).pipe(function() { - return self.startNewBrowserSession({}); - }, function (msg) { - //TODO failed to connect -// alert('Failed to start new session'); - return msg; - }); -}; - -WebdriverBackedSelenium.prototype.startNewWebdriverSession = function(browserName) { - var self = this; - return new Deferred(function(deferred) { - if (self.reuseBrowser && WebdriverBackedSelenium.webdriverSID) { - LOG.debug('Reusing existing connection to Selenium Server'); - self.webdriverSID = WebdriverBackedSelenium.webdriverSID; - self.webdriverResponse = WebdriverBackedSelenium.webdriverResponse; - deferred.resolve(self.webdriverSID); - return; - } - LOG.debug('Connecting to Selenium Server'); - HTTP.post(self.webDriverServer + '/wd/hub/session', - JSON.stringify({ - 'desiredCapabilities': {'browserName': browserName} - }), {'Accept': 'application/json; charset=utf-8'}, function(response, success) { - if (success && response) { - self.webdriverResponse = JSON.parse(response.replace(/\0/g, '')); - self.webdriverSID = self.webdriverResponse.sessionId; - WebdriverBackedSelenium.webdriverSID = self.webdriverSID; - WebdriverBackedSelenium.webdriverResponse = self.webdriverResponse; - deferred.resolve(self.webdriverSID); - } else { - if (response) { - var result = JSON.parse(response.replace(/\0/g, '')); - if (result.value.class && result.value.class == "org.openqa.selenium.WebDriverException") { - deferred.reject({message: {t: 'RemoteConnectError', m: 'Could not start browser. Have you installed the driver correctly? Error message was: ' + result.value.message }}); - return; - } - } - deferred.reject({message: {t: 'RemoteConnectError', m: 'Could not connect to Selenium Server. Have you started the Selenium Server yet?'}}); - } - }); - }); -}; - -WebdriverBackedSelenium.closeWebdriverSession = function() { - return new Deferred(function(deferred) { - if (WebdriverBackedSelenium.webdriverSID) { - LOG.debug('Closing existing connection to Selenium Server'); - var webdriverSID = WebdriverBackedSelenium.webdriverSID; - WebdriverBackedSelenium.webdriverSID = null; - WebdriverBackedSelenium.sessionId = null; - - HTTP._delete(WebdriverBackedSelenium.webDriverServer + '/wd/hub/session/' + webdriverSID, - {'Accept': 'application/json; charset=utf-8'}, function(response, success) { - if (success && response) { - deferred.resolve(); - } else { - deferred.reject({message: {t: 'RemoteConnectError', m: 'Could not close session, probably none existed.'}}); - } - } - ); - } else { - deferred.resolve(); - } - }); -}; - -WebdriverBackedSelenium.prototype.startNewBrowserSession = function(options, callback) { - //options should be an array of items in the form key=value - var self = this; - if (self.reuseBrowser && WebdriverBackedSelenium.sessionId) { - return new Deferred(function(deferred) { - self.sessionId = WebdriverBackedSelenium.sessionId; - deferred.resolve(self.sessionId); - }); - } - var startArgs = ['*webdriver', self.baseUrl, '']; - var sid = this.webdriverResponse.value['webdriver.remote.sessionid']; - startArgs.push('webdriver.remote.sessionid=' + sid); - if (options && options.length > 0) { - startArgs.push(options.sort().join(';')); - } - return self.remoteControlCommand('getNewBrowserSession', startArgs).done(function(response) { - self.sessionId = response; - WebdriverBackedSelenium.sessionId = response; - }); -}; - -WebdriverBackedSelenium.prototype.remoteControlCommand = function(verb, args) { - var self = this; - //TODO handle timeout stuff: timeout(@default_timeout_in_seconds) do - var requestData = httpRequestFor(verb, args, this.sessionId); -// alert("Sending server request: " + requestData); - return new Deferred(function(deferred) { - HTTP.post(self.webDriverServer + '/selenium-server/driver/', requestData, {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'}, function(response, success, status) { - if (success) { - if (response.substr(0, 2) === 'OK') { - deferred.resolve(response.substr(3)); //strip "OK," from response - } else { - //TODO raise CommandError, response unless status == "OK" - if (response.substr(0, 5) === 'ERROR') { - if (response.substr(6, 58) === "Window not found. The browser window may have been closed.") { - deferred.reject({message: {t: 'RemoteConnectError', m: 'It seems like the old window was closed. Close session and run test again to start over.'}}); - } else if (response.substr(6, 79).match(/Server Exception: sessionId [0-9a-f-]+ doesn't exist;/)) { - deferred.reject({message: {t: 'RemoteConnectError', m: 'It seems like Selenium server was restarted. Close session and run test again to start over.'}}); - } else { - deferred.reject(response.substr(6)); //strip "ERROR," from response - } - } else { - alert("Received command response (!=OK/ERROR): " + response + "\n Request Data: " + requestData); - deferred.reject(response); - } - } - } else if ( ! status ) { - deferred.reject({message: {t: 'RemoteConnectError', m: 'Could not connect to Selenium Server. Have you started the Selenium Server yet?'}}); - } else { - deferred.reject('Received an invalid status code from Selenium Server'); - } - }); - }); -}; - -WebdriverBackedSelenium.prototype.webDriverCommand = function(url, opts, args) { - //TODO handle timeout stuff: timeout(@default_timeout_in_seconds) do - if (this.webdriverSID) { - url = url.replace(':sessionId', this.webdriverSID); - } - for (var opt in opts) { - if (opts.hasOwnProperty(opt) && url.indexOf(':' + opt) >= 0) { - url = url.replace(':' + opt, encodeURIComponent(opts[opt])); - } - } - var requestData = null; - var requestMethod = 'GET'; - var contentType = {}; - if (args) { - requestMethod = 'POST'; - requestData = JSON.stringify(args); - contentType = {'Content-Type': 'application/json; charset=utf-8'}; - } -// alert("Sending server request: " + requestData); - var self = this; - return new Deferred(function(deferred) { - HTTP.request(requestMethod, self.webDriverServer + '/wd/hub/' + url, requestData, contentType, function(response, success, status) { - var result; - if (response) { -// alert("Response: " + response); - result = JSON.parse(response.replace(/\0/g, '')); - } - if (success) { - if (response) { - deferred.resolve(result.value); - }else { - deferred.resolve(); - } - } else { - if (response) { - if (result.value.class && result.value.class == "org.openqa.selenium.remote.SessionNotFoundException" ) { - self.webdriverSID = null; - WebdriverBackedSelenium.webdriverSID = null; - self.sessionId = null; - WebdriverBackedSelenium.sessionId = null; - deferred.reject({message: {t: 'RemoteConnectError', m: 'It seems like Selenium server was restarted. Run test again to start over.'}}); - } else if (result.value.class && result.value.class == "org.openqa.selenium.NoSuchWindowException" ) { - self.sessionId = null; - WebdriverBackedSelenium.sessionId = null; - deferred.reject({message: {t: 'RemoteConnectError', m: 'It seems like the old window was closed. Please close session and run test again to start over.'}}); - } else { - deferred.reject(result.value.message); - } - } else { - deferred.reject('Unknown webdriver error'); - } - } - }); - }); -}; - -function httpRequestFor(verb, args, sessionId) { - var data = 'cmd=' + encodeURIComponent(verb); - if (args) { - args.forEach(function(arg, index) { - data += '&' + (index + 1) + '=' + encodeURIComponent(arg); - }); - } - if (sessionId) { - data += '&sessionId=' + sessionId; - } - return data; -} diff --git a/ide/main/src/content/xhtml-entities.js b/ide/main/src/content/xhtml-entities.js deleted file mode 100644 index b8b8e90c5ae92..0000000000000 --- a/ide/main/src/content/xhtml-entities.js +++ /dev/null @@ -1,256 +0,0 @@ -// This file was generated by script/update_xhtml_entities.rb. Do not edit by hand! -var XhtmlEntities = { -nbsp: 160, -iexcl: 161, -cent: 162, -pound: 163, -curren: 164, -yen: 165, -brvbar: 166, -sect: 167, -uml: 168, -copy: 169, -ordf: 170, -laquo: 171, -not: 172, -shy: 173, -reg: 174, -macr: 175, -deg: 176, -plusmn: 177, -sup2: 178, -sup3: 179, -acute: 180, -micro: 181, -para: 182, -middot: 183, -cedil: 184, -sup1: 185, -ordm: 186, -raquo: 187, -frac14: 188, -frac12: 189, -frac34: 190, -iquest: 191, -Agrave: 192, -Aacute: 193, -Acirc: 194, -Atilde: 195, -Auml: 196, -Aring: 197, -AElig: 198, -Ccedil: 199, -Egrave: 200, -Eacute: 201, -Ecirc: 202, -Euml: 203, -Igrave: 204, -Iacute: 205, -Icirc: 206, -Iuml: 207, -ETH: 208, -Ntilde: 209, -Ograve: 210, -Oacute: 211, -Ocirc: 212, -Otilde: 213, -Ouml: 214, -times: 215, -Oslash: 216, -Ugrave: 217, -Uacute: 218, -Ucirc: 219, -Uuml: 220, -Yacute: 221, -THORN: 222, -szlig: 223, -agrave: 224, -aacute: 225, -acirc: 226, -atilde: 227, -auml: 228, -aring: 229, -aelig: 230, -ccedil: 231, -egrave: 232, -eacute: 233, -ecirc: 234, -euml: 235, -igrave: 236, -iacute: 237, -icirc: 238, -iuml: 239, -eth: 240, -ntilde: 241, -ograve: 242, -oacute: 243, -ocirc: 244, -otilde: 245, -ouml: 246, -divide: 247, -oslash: 248, -ugrave: 249, -uacute: 250, -ucirc: 251, -uuml: 252, -yacute: 253, -thorn: 254, -yuml: 255, -quot: 34, -amp: 38, -lt: 60, -gt: 62, -apos: 39, -OElig: 338, -oelig: 339, -Scaron: 352, -scaron: 353, -Yuml: 376, -circ: 710, -tilde: 732, -ensp: 8194, -emsp: 8195, -thinsp: 8201, -zwnj: 8204, -zwj: 8205, -lrm: 8206, -rlm: 8207, -ndash: 8211, -mdash: 8212, -lsquo: 8216, -rsquo: 8217, -sbquo: 8218, -ldquo: 8220, -rdquo: 8221, -bdquo: 8222, -dagger: 8224, -Dagger: 8225, -permil: 8240, -lsaquo: 8249, -rsaquo: 8250, -euro: 8364, -fnof: 402, -Alpha: 913, -Beta: 914, -Gamma: 915, -Delta: 916, -Epsilon: 917, -Zeta: 918, -Eta: 919, -Theta: 920, -Iota: 921, -Kappa: 922, -Lambda: 923, -Mu: 924, -Nu: 925, -Xi: 926, -Omicron: 927, -Pi: 928, -Rho: 929, -Sigma: 931, -Tau: 932, -Upsilon: 933, -Phi: 934, -Chi: 935, -Psi: 936, -Omega: 937, -alpha: 945, -beta: 946, -gamma: 947, -delta: 948, -epsilon: 949, -zeta: 950, -eta: 951, -theta: 952, -iota: 953, -kappa: 954, -lambda: 955, -mu: 956, -nu: 957, -xi: 958, -omicron: 959, -pi: 960, -rho: 961, -sigmaf: 962, -sigma: 963, -tau: 964, -upsilon: 965, -phi: 966, -chi: 967, -psi: 968, -omega: 969, -thetasym: 977, -upsih: 978, -piv: 982, -bull: 8226, -hellip: 8230, -prime: 8242, -Prime: 8243, -oline: 8254, -frasl: 8260, -weierp: 8472, -image: 8465, -real: 8476, -trade: 8482, -alefsym: 8501, -larr: 8592, -uarr: 8593, -rarr: 8594, -darr: 8595, -harr: 8596, -crarr: 8629, -lArr: 8656, -uArr: 8657, -rArr: 8658, -dArr: 8659, -hArr: 8660, -forall: 8704, -part: 8706, -exist: 8707, -empty: 8709, -nabla: 8711, -isin: 8712, -notin: 8713, -ni: 8715, -prod: 8719, -sum: 8721, -minus: 8722, -lowast: 8727, -radic: 8730, -prop: 8733, -infin: 8734, -ang: 8736, -and: 8743, -or: 8744, -cap: 8745, -cup: 8746, -"int": 8747, -there4: 8756, -sim: 8764, -cong: 8773, -asymp: 8776, -ne: 8800, -equiv: 8801, -le: 8804, -ge: 8805, -sub: 8834, -sup: 8835, -nsub: 8836, -sube: 8838, -supe: 8839, -oplus: 8853, -otimes: 8855, -perp: 8869, -sdot: 8901, -lceil: 8968, -rceil: 8969, -lfloor: 8970, -rfloor: 8971, -lang: 9001, -rang: 9002, -loz: 9674, -spades: 9824, -clubs: 9827, -hearts: 9829, -diams: 9830, -}; diff --git a/ide/main/src/content/xul-utils.js b/ide/main/src/content/xul-utils.js deleted file mode 100644 index 1b347a6033610..0000000000000 --- a/ide/main/src/content/xul-utils.js +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2005 Shinya Kasatani - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var XulUtils = { - clearChildren: function(e) { - var i; - for (i = e.childNodes.length - 1; i >= 0; i--) { - e.removeChild(e.childNodes[i]); - } - }, - - appendMenuItem: function(e, attributes) { - var menuitem = document.createElement("menuitem"); - for (var key in attributes) { - if (attributes[key] != null) { - menuitem.setAttribute(key, attributes[key]); - } - } - return e.appendChild(menuitem); - }, - - toXPCOMArray: function(data) { - var array = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); - for (var i = 0; i < data.length; i++) { - array.AppendElement(this.toXPCOMString(data[i])); - } - return array; - }, - - toXPCOMString: function(data) { - var string = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - string.data = data; - return string; - }, - - atomService: Components.classes["@mozilla.org/atom-service;1"]. - getService(Components.interfaces.nsIAtomService), - - setProperty: function(props, prop) { - if (props) { - props.AppendElement(this.atomService.getAtom(prop)); - } else { - return prop; - } - }, - - setPropertyRa: function(props, prop, propRa) { - if (props) { - props.AppendElement(this.atomService.getAtom(prop)); - } else { - propRa.push(prop); - } - } - -}; - -XulUtils.TreeViewHelper = classCreate(); -objectExtend(XulUtils.TreeViewHelper.prototype, { - initialize: function(tree) { - tree.view = this; - this.tree = tree; - }, - - scrollToRow: function(index) { - this.treebox.ensureRowIsVisible(index); - }, - - rowUpdated: function(index) { - this.treebox.invalidateRow(index); - }, - - //Samit: Enh: allow a range of rows to be updated - rowsUpdated: function(startIndex, toIndex) { - if (startIndex < toIndex) { - this.treebox.invalidateRange(startIndex, toIndex); - }else { - this.treebox.invalidateRange(toIndex, startIndex); - } - }, - // - // nsITreeView interfaces - // - setTree: function(treebox) { - this.log.debug("setTree: treebox=" + treebox); - this.treebox = treebox; - }, - isContainer: function(row) { - return false; - }, - isSeparator: function(row) { - return false; - }, - isSorted: function(row) { - return false; - }, - getLevel: function(row) { - return 0; - }, - getImageSrc: function(row,col) { - return null; - }, - getColumnProperties: function(colid, col, props) {}, - cycleHeader: function(colID, elt) {} -}); diff --git a/ide/main/src/idl/SeleniumIDEGenericAutoCompleteSearch.idl b/ide/main/src/idl/SeleniumIDEGenericAutoCompleteSearch.idl deleted file mode 100644 index 917f3a7b9d4f0..0000000000000 --- a/ide/main/src/idl/SeleniumIDEGenericAutoCompleteSearch.idl +++ /dev/null @@ -1,12 +0,0 @@ -#include "nsIAutoCompleteSearch.idl" - -interface nsISupportsString; -interface nsISupportsArray; - -[scriptable, uuid(47AFA811-9BAC-4211-AE30-EAEACE2138AE)] -interface nsISeleniumIDEGenericAutoCompleteSearch : nsIAutoCompleteSearch -{ - void setCandidates(in nsISupportsString searchKey, in nsISupportsArray values); - void setCandidatesWithComments(in nsISupportsString searchKey, in nsISupportsArray values, in nsISupportsArray comments); - void clearCandidates(in nsISupportsString searchKey); -}; diff --git a/ide/main/src/install.rdf b/ide/main/src/install.rdf deleted file mode 100644 index ba98583e45633..0000000000000 --- a/ide/main/src/install.rdf +++ /dev/null @@ -1,35 +0,0 @@ - - - - {a6fd85ed-e919-4a43-a5af-8da18bda539f} - Selenium IDE - 2.9.0 - Shinya Kasatani - Adam Goucher - Samit Badle - Dave Hunt - Record, edit and play Selenium tests - 2 - http://seleniumhq.org/projects/ide - chrome://selenium-ide/content/optionsDialog.xul - https://addons.seleniumhq.org/se-ide/update.rdf - chrome://selenium-ide/content/images/selenium-ide-logo32.png - - - - {ec8030f7-c20a-464f-9b0e-13a3a9e97384} - 3.6.* - 34.* - - - - - - fr-FR - Selenium IDE - Enregistrer, modifier et exécuter des tests Selenium - - - - diff --git a/ide/main/src/locale/en-US/options.dtd b/ide/main/src/locale/en-US/options.dtd deleted file mode 100644 index 0171975c3cbde..0000000000000 --- a/ide/main/src/locale/en-US/options.dtd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/en-US/selenium-ide.dtd b/ide/main/src/locale/en-US/selenium-ide.dtd deleted file mode 100644 index f9d70ed751332..0000000000000 --- a/ide/main/src/locale/en-US/selenium-ide.dtd +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/en-US/selenium-ide.properties b/ide/main/src/locale/en-US/selenium-ide.properties deleted file mode 100644 index cefda0aa7feee..0000000000000 --- a/ide/main/src/locale/en-US/selenium-ide.properties +++ /dev/null @@ -1,42 +0,0 @@ -selenium-ide.name=Selenium IDE -selenium-ide.version=2.9.0 - -showAllChecks.label=Show All Available Commands -askForVariableName=Enter the name of the variable -confirmReload=The file has been modified. Do you want to reload it? - -options.confirmLoadDefaultOptions=Do you really want to load default settings? -options.confirmFormatDisable=Disabling the experimental features will change the current format to HTML. This might lead to loss of changes, so you might want to cancel and copy your changes first. Do you really want to proceed? -error.invalidEncoding=Invalid encoding. -error.encodingNotSupported=% is not supported. -error.timeoutNotNumber=Timeout is not a number. -error.testCaseRemovalFailed=There must be at least 1 test case in a test suite. - -recordButton.tooltip.on=Now Recording. Click to Stop Recording -recordButton.tooltip.off=Click to Record - -chooseTestSuite=Select Test Suite -saveTestCaseAs=Save test case %1$S as... -exportTestSuiteAs=Export TestSuite as... -selectAFile=Select a file -save=Save? -saveTestSuite.confirm=Would you like to save the test suite? -saveTestCase.confirm=Would you like to save the %1$S changed test cases? -saveTestSuiteAndCase.confirm=Would you like to save the test suite and the %1$S changed test cases? - -plugin.disabled.message=The following plugins were disabled due to errors while loading their code. See the Plugins section in the Selenium IDE Options dialog for individual plugin details. -ide.extensions.failed=Failed to load Selenium IDE extensions: %1$S -user.extensions.failed=Failed to load user-extensions.js: %1$S - -scheduler.runNow.message=There are tests that were scheduled to run in the past. Would you like to play them now? -scheduler.runNow.title=Play Pending Tests Now? -scheduler.setupJobs.message=There are no tests currently scheduled. Would you like to set them up now? -scheduler.setupJobs.title=Schedule Tests Now? - -format.save.label=Save -format.switch.warn=Changing format is now marked experimental! If you continue, recording and playback may not work, your changes may be lost and you may have to copy and paste the test in a text editor to save. It is better to make a copy of your test cases before you continue. Do you still want to proceed? -format.switch.loseChanges=The selected format does not allow modifications. If you continue you will lose your changes. -format.switch.read=Want the formats back? Click to read more - -diag.gist.created=Gist created with diagnostic information.\nPlease update the issue on https://github.com/SeleniumHQ/selenium/issues with this url.\nURL: %1$S -diag.gist.failed=Gist creation failed with status %1$S\nResponse:-\n%2$S diff --git a/ide/main/src/locale/fr-FR/options.dtd b/ide/main/src/locale/fr-FR/options.dtd deleted file mode 100644 index 82e5188c575e0..0000000000000 --- a/ide/main/src/locale/fr-FR/options.dtd +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/fr-FR/selenium-ide.dtd b/ide/main/src/locale/fr-FR/selenium-ide.dtd deleted file mode 100644 index 08bca23e7eb50..0000000000000 --- a/ide/main/src/locale/fr-FR/selenium-ide.dtd +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ide/main/src/locale/fr-FR/selenium-ide.properties b/ide/main/src/locale/fr-FR/selenium-ide.properties deleted file mode 100644 index a7ffce4a78a5e..0000000000000 --- a/ide/main/src/locale/fr-FR/selenium-ide.properties +++ /dev/null @@ -1,42 +0,0 @@ -selenium-ide.name=Selenium IDE -selenium-ide.version=2.9.0 - -showAllChecks.label=Afficher toutes les commandes disponibles -askForVariableName=Entrez le nom de la variable -confirmReload=Le fichier a été modifié. Voulez-vous le recharger ? - -options.confirmLoadDefaultOptions=Voulez-vous vraiment charger les réglages par défaut ? -options.confirmFormatDisable=Disabling the experimental features will change the current format to HTML. This might lead to loss of changes, so you might want to cancel and copy your changes first. Do you really want to proceed? -error.invalidEncoding=Encodage invalide. -error.encodingNotSupported=% n'est pas supporté. -error.timeoutNotNumber=Timeout n'est pas un nombre. -error.testCaseRemovalFailed=Il doit y avoir au moins un cas de tests dans une suite. - -recordButton.tooltip.on=En cours d'enregistrement. Cliquer pour stopper l'enregistrement -recordButton.tooltip.off=Cliquer pour enregistrer - -chooseTestSuite=Sélectionner une suite de tests -saveTestCaseAs=Enregistrer le test %1$S sous... -exportTestSuiteAs=Exporter la suite de tests sous... -selectAFile=Choisir un fichier -save=Save? -saveTestSuite.confirm=Voulez-vous enregistrer la suite de tests? -saveTestCase.confirm=Voulez-vous enregistrer les cas de test %1$S changé? -saveTestSuiteAndCase.confirm=Voulez-vous enregistrer la suite de tests et le %1$S changé cas de test? - -plugin.disabled.message=Les plugins suivants ont été désactivés en raison d'erreurs lors du chargement de leur code. Voir la section Plugins dans les Options de l'EDI sélénium de dialogue pour plus de détails plugin individuels. -ide.extensions.failed=Impossible de charger les extensions Selenium IDE: %1$S -user.extensions.failed=Impossible de charger l'utilisateur-extensions.js: %1$S - -scheduler.runNow.message=Il existe des tests qui ont été planifiés pour être exécutés dans le passé. Souhaitez-vous y jouer maintenant? -scheduler.runNow.title=Jouer Tests en attente maintenant? -scheduler.setupJobs.message=Il n'existe aucun test actuellement prévues. Voulez-vous les mettre en place maintenant? -scheduler.setupJobs.title=Planning Tests maintenant? - -format.save.label=Save -format.switch.warn=Changer le format est maintenant marqué comme expérimental! Si vous continuez, l'enregistrement et la lecture peuvent ne pas fonctionner, vos modifications peuvent être perdues et vous pouvez avoir à copier et coller le test dans un éditeur de texte pour enregistrer. Il est préférable de faire une copie de vos cas de test avant de continuer. Voulez-vous toujours de procéder? -format.switch.loseChanges=Le format choisi ne permet pas de modifications. Si vous continuez, vous perdrez vos modifications. -format.switch.read=voulons que les formats de retour? Cliquez pour lire la suite - -diag.gist.created=Gist créé des informations de diagnostic.\nS'il vous plaît mettre à jour la question sur https://github.com/SeleniumHQ/selenium/issues à cette URL.\nURL: %1$S -diag.gist.failed=Création Gist échoué avec l'état%1$S\nRéponse:-\n%2$S diff --git a/ide/main/src/locale/ja-JP/options.dtd b/ide/main/src/locale/ja-JP/options.dtd deleted file mode 100644 index b994d84f0ddff..0000000000000 --- a/ide/main/src/locale/ja-JP/options.dtd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/ja-JP/selenium-ide.dtd b/ide/main/src/locale/ja-JP/selenium-ide.dtd deleted file mode 100644 index c722597588e60..0000000000000 --- a/ide/main/src/locale/ja-JP/selenium-ide.dtd +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/ja-JP/selenium-ide.properties b/ide/main/src/locale/ja-JP/selenium-ide.properties deleted file mode 100644 index 300beb1d86053..0000000000000 --- a/ide/main/src/locale/ja-JP/selenium-ide.properties +++ /dev/null @@ -1,42 +0,0 @@ -selenium-ide.name=Selenium IDE -selenium-ide.version=2.9.0 - -showAllChecks.label=利用可能な全てのコマンド -askForVariableName=変数の名前を入力してください -confirmReload=ファイルが外部のエディタにより書き換えられました。読み込み直しますか? - -options.confirmLoadDefaultOptions=設定を既定値に戻してもよろしいですか? -options.confirmFormatDisable=実験的な機能を無効にすると、HTMLに現在の形式が変更されます。これは、変更が失われる可能性がありますので、あなたはキャンセルして、最初に変更をコピーしたい場合があります。あなたが本当に続行しますか? -error.invalidEncoding=無効なエンコーディングです。 -error.encodingNotSupported=% には対応していません。 -error.timeoutNotNumber=タイムアウト値が数値ではありません。半角数字で指定してください。 -error.testCaseRemovalFailed=テストスイートには最低1つのテストケースが必要です。 - -recordButton.tooltip.on=記録中です。クリックすると停止します。 -recordButton.tooltip.off=クリックすると記録を開始します。 - -chooseTestSuite=テストスイートを選択してください -saveTestCaseAs=テストケース %1$S を付けて保存... -exportTestSuiteAs=輸出テストスイートとして... -selectAFile=ファイルを選択します -save=保存しますか? -saveTestSuite.confirm=あなたはテストスイートを保存しますか? -saveTestCase.confirm=あなたが%1$Sに変更テストケースを保存しますか? -saveTestSuiteAndCase.confirm=あなたはテストスイートを保存すると図%1$Sは、テストケースを変更しますか? - -plugin.disabled.message=自分のコードをロードしながら、以下のプラグインがエラーにより無効になっていた。個別のプラグインの詳細についてはダイアログのSelenium IDEオプションでのプラグインのセクションを参照してください。 -ide.extensions.failed=セレンのIDEの拡張機能の読み込みに失敗しました: %1$S -user.extensions.failed=ユーザーがextensions.jsの読み込みに失敗しました: %1$S - -scheduler.runNow.message=過去に実行するようにスケジュールされたテストがあります。あなたは今、それらを再生しますか? -scheduler.runNow.title=今保留中のテストをプレイ? -scheduler.setupJobs.message=現在予定さテストがありません。あなたは今、それらをセットアップしますか? -scheduler.setupJobs.title=今すぐスケジュールをテスト? - -format.save.label=保存する -format.switch.warn=書式を変更するようになりました実験マークされている!続行すると、録音や再生は、変更内容が失われる可能性があり、動作しない可能性があり、あなたが保存してテキストエディタでテストをコピーしてペーストする必要があります。それは、続行する前に、テストケースのコピーを作成することをお勧めします。それでも続行しますか? -format.switch.loseChanges=選択したフォーマットは、変更を許可していません。続行すると、あなたの変更が失われます。 -format.switch.read=フォーマットをバックしたいですか?続きを読むにはここをクリック - -diag.gist.created=要旨は、診断情報を使用して作成。\nはこのURLでhttps://github.com/SeleniumHQ/selenium/issues上の問題を更新してください。\nURL:%1$S -diag.gist.failed=要旨の作成は、ステータス%1$S\nの応答で失敗しました: -\n%2$S diff --git a/ide/main/src/locale/pt-BR/options.dtd b/ide/main/src/locale/pt-BR/options.dtd deleted file mode 100644 index 493f99b584801..0000000000000 --- a/ide/main/src/locale/pt-BR/options.dtd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/pt-BR/selenium-ide.dtd b/ide/main/src/locale/pt-BR/selenium-ide.dtd deleted file mode 100644 index cb44dfd4eaa13..0000000000000 --- a/ide/main/src/locale/pt-BR/selenium-ide.dtd +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/pt-BR/selenium-ide.properties b/ide/main/src/locale/pt-BR/selenium-ide.properties deleted file mode 100644 index bab155c50497e..0000000000000 --- a/ide/main/src/locale/pt-BR/selenium-ide.properties +++ /dev/null @@ -1,42 +0,0 @@ -selenium-ide.name=Selenium IDE -selenium-ide.version=2.9.0 - -showAllChecks.label=Exibir todos os comandos disponíveis -askForVariableName=Informe o nome da variável -confirmReload=O arquivo foi modificado. Deseja carregar as alterações? - -options.confirmLoadDefaultOptions=Deseja realmente descartar as alterações? -options.confirmFormatDisable=Disabling the experimental features will change the current format to HTML. This might lead to loss of changes, so you might want to cancel and copy your changes first. Do you really want to proceed? -error.invalidEncoding=Codificação inválida. -error.encodingNotSupported=% não é suportado. -error.timeoutNotNumber=O tempo de expiração deve ser numérico. -error.testCaseRemovalFailed=There must be at least 1 test case in a test suite. - -recordButton.tooltip.on=Now Recording. Click to Stop Recording -recordButton.tooltip.off=Click to Record - -chooseTestSuite=Select Test Suite -saveTestCaseAs=Save test case %1$S as... -exportTestSuiteAs=Export TestSuite as... -selectAFile=Select a file -save=Save? -saveTestSuite.confirm=Gostaria de salvar o conjunto de testes? -saveTestCase.confirm=Gostaria de salvar as %1$S mudaram de casos de teste? -saveTestSuiteAndCase.confirm=Gostaria de salvar o conjunto de testes e os %1$S mudado casos de teste? - -plugin.disabled.message=Os seguintes plugins foram desativados devido a erros ao carregar seu código. Consulte a seção Plugins nas Opções Selenium IDE de diálogo para obter mais detalhes do plugin individuais. -ide.extensions.failed=Falha ao carregar extensões Selenium IDE: %1$S -user.extensions.failed=Falha ao carregar usuário extensions.js-: %1$S - -scheduler.runNow.message=Existem testes que foram programados para serem executados no passado. Gostaria de jogá-los agora? -scheduler.runNow.title=Jogue testes pendentes Now? -scheduler.setupJobs.message=Não há testes programados. Você gostaria de configurá-los agora? -scheduler.setupJobs.title=Testes Programação agora? - -format.save.label=Salvar -format.switch.warn=Mudar formato agora está marcada experimental! Se você continuar, a gravação ea reprodução pode não funcionar, as alterações podem ser perdidas e você pode ter que copiar e colar o teste em um editor de texto para salvar. É melhor fazer uma cópia dos seus casos de teste antes de continuar. Você ainda quer continuar? -format.switch.loseChanges=O formato escolhido não permite modificações. Se você continuar, você vai perder as suas alterações. -format.switch.read=Quer os formatos de volta? Clique para ler mais - -diag.gist.created=Síntese criado com informações de diagnóstico.\nPor favor, atualize a questão em https://github.com/SeleniumHQ/selenium/issues com esta url.\nURL: %1$S -diag.gist.failed=Criação Gist falhou com status %1$S\nResposta:-\n%2$S diff --git a/ide/main/src/locale/sv-SE/options.dtd b/ide/main/src/locale/sv-SE/options.dtd deleted file mode 100644 index 4ee0d71af8a8f..0000000000000 --- a/ide/main/src/locale/sv-SE/options.dtd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/sv-SE/selenium-ide.dtd b/ide/main/src/locale/sv-SE/selenium-ide.dtd deleted file mode 100644 index f882fb6fcc9f8..0000000000000 --- a/ide/main/src/locale/sv-SE/selenium-ide.dtd +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/main/src/locale/sv-SE/selenium-ide.properties b/ide/main/src/locale/sv-SE/selenium-ide.properties deleted file mode 100644 index 611d998f00b00..0000000000000 --- a/ide/main/src/locale/sv-SE/selenium-ide.properties +++ /dev/null @@ -1,42 +0,0 @@ -selenium-ide.name=Selenium IDE -selenium-ide.version=2.9.0 - -showAllChecks.label=Visa Alla Tillgängliga Kommandon -askForVariableName=Ange variabelns namn -confirmReload=Filen har ändrats. Vill du ladda om den? - -options.confirmLoadDefaultOptions=Vill du verkligen ladda in standardinställningarna? -options.confirmFormatDisable=Disabling the experimental features will change the current format to HTML. This might lead to loss of changes, so you might want to cancel and copy your changes first. Do you really want to proceed? -error.invalidEncoding=Felaktig teckenkodning. -error.encodingNotSupported=% stöds inte. -error.timeoutNotNumber=Timeout är inte en siffra. -error.testCaseRemovalFailed=Det ska finnas minst 1 testfall i en testsvit. - -recordButton.tooltip.on=Spelar in nu. Klicka för att avsluta inspelning -recordButton.tooltip.off=Klicka för att spela in - -chooseTestSuite=Välj testsvit -saveTestCaseAs=Save test case %1$S as... -exportTestSuiteAs=Export TestSuite as... -selectAFile=Select a file -save=Save? -saveTestSuite.confirm=Vill du spara testsvit? -saveTestCase.confirm=Vill du spara %1$S förändrade testfall? -saveTestSuiteAndCase.confirm=Vill du spara testsvit och %1$S bytt testfall? - -plugin.disabled.message=Följande plugins inaktiverades på grund av fel vid inläsning sin kod. Se Plugins avsnittet i Selenium IDE Options dialogrutan för enskilda plugin information. -ide.extensions.failed=Det gick inte att läsa in Selenium IDE tillägg: %1$S -user.extensions.failed=Det gick inte att läsa in användar-extensions.js: %1$S - -scheduler.runNow.message=Det finns tester som var planerad att köras i det förflutna. Vill du spela upp dem nu? -scheduler.runNow.title=Spela Vänt Tester nu? -scheduler.setupJobs.message=Det finns inga tester för närvarande planerade. Vill du ställa in dem nu? -scheduler.setupJobs.title=Schema Tester nu? - -format.save.label=Spara -format.switch.warn=Ändra format är nu markerat experimentell! Om du fortsätter kan inspelning och uppspelning fungerar inte, dina ändringar kan gå förlorade och du kan behöva kopiera och klistra in testet i en textredigerare för att spara. Det är bättre att göra en kopia av dina testfall innan du fortsätter. Vill du ändå vill fortsätta? -format.switch.loseChanges=Det valda formatet tillåter inte ändringar. Om du fortsätter kommer du att förlora dina ändringar. -format.switch.read=Vill formaten tillbaka? Klicka för att läsa mer - -diag.gist.created=Gist skapas med diagnostisk information.\nUppdatera frågan om https://github.com/SeleniumHQ/selenium/issues med denna webbadress.\nURL: %1$S -diag.gist.failed=Gist skapelse misslyckades med status %1$S\nSvar:-\n%2$S diff --git a/ide/main/src/skin/classic/fa-chrome.png b/ide/main/src/skin/classic/fa-chrome.png deleted file mode 100644 index 3c73d0ff3ede45dfda7846406f0bc7032bd2fdf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324 zcmV-K0lWT*P)6@SH`?B!RN`GvsS$D(QEfCv`%3lV@oH8V_uFkmYx&>>ttr@xEyO~-|;*)x8NIXWEragD6Y{gHK?x$YjlA+$+dH5Ef)0xS~&B6$F>OL2eQA7z=9# zQ9(^(EXd{OIRn5|8y;Hs!@l?a001j?BuSDT1Axg~k|aqMCV-hQk}MrN@LQ4>z?#>t zOEygahI1|%@LaCg^1zC12ewV_`eiB4;85NecqPd$&Ll^0D!GPJNlvhk{9|$qcCiom zh;{H2UP^My%v?TMbwiRpxGBkBw=pn$mE;caL6RKVGdz)G4lwggl00?UQu5se09JjL voH%bTS-1!QaL-$hJ#yxq`v3p{3;=-tq)K&gxOE%Z00000NkvXXu0mjf%At0N diff --git a/ide/main/src/skin/classic/fa-firefox.png b/ide/main/src/skin/classic/fa-firefox.png deleted file mode 100644 index 2da39e21f205c628abf049bea5ad38c32fa908c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 297 zcmV+^0oMMBP)PzZo3 z=0*}HiEYdWFZn%8h}jX30T4rCM%3wHI$|0C$3et^DP|00000NkvXXu0mjf)!lx| diff --git a/ide/main/src/skin/classic/fa-firefox_on.png b/ide/main/src/skin/classic/fa-firefox_on.png deleted file mode 100644 index d4c34a1b6e42baaef2bc6d8223e322dd80e75963..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6ZhE>nhDb=V9$e@p!@$t+@V$*- zi3D4A@S8)sDw_^Ia0w8}<=S`PNQI{Wk681|xWt!D$)N(P-)~S#5;Bz8f1jO)5vWU2 zJmF$rw%>zC$HomxUj0& z@=@TVC+rM*Hm6$BJvY6xW-wFL|1(`>|A(t5Om9rB`QScDrE(L~J5~NSUX%V5r|~f> zd-~1ztmb(vO!wv|70-PK+EhFzsaP^uOb602j0gHws(2Q0Fc{?DKhhmu&Uc2nhDm67 Wt=cP) z6A?Lv9ItXgsj8}DF;lgjzpQ$% zs;buFld8IIu<5nCs;a7v#}idmSKPF#s;cTs5}T^3=I%LfM^#lxVz8&Gs=j*aq=`G` zz8U8i6Ejs+^)Wx$aOh$doHkWe_0U<5&0NkhD{ebbRWsX8Op@fvv0G+#E&MeFW=2VppJ20oneEP)7bIoCC`95 z|3a1gFX=8}1d0nmq(gxM6(w3FFX7T4xD=+Fv*dS)S&2l+_mV9@$8nZ~!3?bzYNHJdN1yc>}3Qp);a9HZd|V)J#-a&)B?k z=T6BURnNMcoAV~9iB~1IF0k zh!>iaa3v}nMx1AxG@qEbpUFy;$VnnemuU+Ph7%qrN_0qyb!NF6;VN?&3=_<-D(=aT z@D2&yF&K_erPmy65r5NWeJ`W^%VvEx-s4>YP zWC>fv8|8nf0OQ6^Qtf^K00000 diff --git a/ide/main/src/skin/classic/fa-safari_on.png b/ide/main/src/skin/classic/fa-safari_on.png deleted file mode 100644 index f6a62ee9eb5a82393aa572f7452440bde667642e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmV-I0lof-P)>fP z^csBk_1*I>&-?#9_0&VN(gy6RsMs|i9p_PvxHlmyB_(UpgW)8XtZO%K+mlNL8En{W z^0X!WK7{x^nnb}Aw5jS%U=ZxNlgEuV<_x-M;gTUi(5cT1*QQ%|S=y^0*pYHY!&VDZ zjQUg5X(-2BbEDgD^!xlDsLA_@qHY~t;_(Jh($07*qoM6N<$f*Svlv;Y7A diff --git a/ide/main/src/skin/classic/fa-times-circle-o.png b/ide/main/src/skin/classic/fa-times-circle-o.png deleted file mode 100644 index 1193de22ff424be8b9dfd542b52c99b827f67de8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324 zcmV-K0lWT*P)bXV$)YUEM21UrvoU^UIIG#V;S5Hj& z%iykhV@Tqp`eaJ1I-8hVOAKDAOG(^T*AuI%ZrD>BiG_NZ#Ev?VSg5M1^~6lo5Z}~F zesNP(ZRIyrQ+!bK#N3{$szqX^YK%MTYGO^*ma5If8MU3nX|-#X*sz{h*fb=bsVmv% zv3g+461UWjG5Z|$S-o@KlsM#+r|P?T4p{L*RaI5JH_tMIi=L~hx2_rUKL(RA|M&@m W3bnQ1(Odlh0000Da)1wWz(_WsFVP}KZ?g^QFh{Vwg3PC07*qoM6N<$g6yPh*#H0l diff --git a/ide/main/src/skin/classic/help-view.css b/ide/main/src/skin/classic/help-view.css deleted file mode 100644 index 19b6bfda089c7..0000000000000 --- a/ide/main/src/skin/classic/help-view.css +++ /dev/null @@ -1,8 +0,0 @@ -body { - font-size: 9pt; - background-color: white; -} - -.deprecated { - color: #ff6666; -} \ No newline at end of file diff --git a/ide/main/src/skin/classic/icons.png b/ide/main/src/skin/classic/icons.png deleted file mode 100644 index 7f3601ad823fc6a498b3f654cb39af40c33bf2bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5619 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 N002ovPDHLkV1j46>kR+^ diff --git a/ide/main/src/skin/classic/icons_disabled.png b/ide/main/src/skin/classic/icons_disabled.png deleted file mode 100644 index 309729785ab05450312b32962652c0df7dc86bf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7588 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 toolbox > #toolbar1 { - background-image: url(chrome://global/skin/toolbar/toolbar-background-inactive.png); -} - -#toolbar2 { - border-top-width: 1px; - border-top-style: solid; - border-top-color: rgba(255, 255, 255, 0.25); - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: -moz-use-text-color; - -moz-border-bottom-colors: rgba(0, 0, 0, 0.35); -/* background-color: rgba(190, 190, 190, 1);*/ - background-color: transparent; - background-image: url(chrome://browser/skin/bookmark_toolbar_background.gif); - background-position: center center; - background-repeat: repeat-x; - height: 28px; - padding: 0 4px; -} - -.sidebarToolbar { - background-color: transparent; -} - -window:not([active="true"]) > toolbox > #toolbar2 { - background-image: url(chrome://browser/skin/bookmark_toolbar_background-inactive.png); -} diff --git a/ide/main/src/skin/classic/progress-background.png b/ide/main/src/skin/classic/progress-background.png deleted file mode 100644 index b83614c9c9a0e8e6cbf8782173ca6607264fee65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 183 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 LNkvXXu0mjfN063} diff --git a/ide/main/src/skin/classic/selenium-ide.css b/ide/main/src/skin/classic/selenium-ide.css deleted file mode 100644 index 7d6138bb3b142..0000000000000 --- a/ide/main/src/skin/classic/selenium-ide.css +++ /dev/null @@ -1,369 +0,0 @@ -.error { - color: #FF0000; -} - -/* - * Tree View - */ -treechildren::-moz-tree-cell-text(comment) -{ - color: #AA33AA; -} - -treechildren::-moz-tree-cell(recordIndex) -{ - border-top: 1px solid #008800; -} - -treechildren::-moz-tree-row(commandFailed) -{ - background-color: #FFCCCC; -} - -.visualeye treechildren::-moz-tree-row(commandFailed) -{ - background-color: #cc7a7a; -} - -treechildren::-moz-tree-row(commandPassed) -{ - background-color: #CCFFCC; -} - -treechildren::-moz-tree-row(commandDone) -{ - background-color: #EEFFEE; -} - -treechildren::-moz-tree-row(commandSelectedForReplacement) -{ - background-color: #cef; -} - -treechildren::-moz-tree-row(debugIndex) -{ - background-color: #FFFFCC; -} - -/* -treechildren::-moz-tree-row(selected, focus) -{ - background-color: Highlight !important; -} -*/ - -treechildren::-moz-tree-image(breakpoint) -{ - list-style-image: url("treeView-icons.png"); - -moz-image-region: rect(0px 24px 12px 12px); - -moz-box-align: center; -} - -treechildren::-moz-tree-image(startpoint) -{ - list-style-image: url("treeView-icons.png"); - -moz-image-region: rect(0px 12px 12px 0px); - -moz-box-align: center; -} - -.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) { - color: #aaaaaa; -} -/* - * Test Suite View - */ - -treechildren::-moz-tree-cell-text(currentTestCase) -{ - font-weight: bold; -} - -/* - * Autocomplete show deprecated - */ -treechildren.autocomplete-treebody::-moz-tree-cell-text(deprecated) { - color: red; -} - -/* - * Log Console - */ - -#logBox { - margin: 8px; - border: 1px solid #aaa; -} - -#logMenu { - height: 26px; - border-bottom: 1px solid #aaa; -} - -/* these are the buttons along the bottom of the ide for log, reference, etc. */ -.console-tab { - margin: 0; - -moz-appearance: tab !important; -} - -.console-tab label { - font-size: 9pt; - padding-right: 4px; -} - -.console-tab[selected] { - background-color: #FFFFFF; -} - -.console-tab[selected] .toolbarbutton-text { - font-weight: bold; -} - -.console-button label { - font-size: 9pt; -} - -/* - * Toolbar icons - */ - -toolbarbutton.icon { - padding: 2px 4px 2px 4px; - margin: 0; - border: 0; -} - -toolbarbutton:hover:not([disabled="true"]) { - background-color: #aaaaaa; -} - -toolbarbutton.icon:not([disabled="true"]) { - list-style-image: url("icons.png"); -} - -toolbarbutton.icon[disabled="true"] { - list-style-image: url("icons_disabled.png"); -} - -toolbarbutton.icon image { - margin-right: 0px; -} - -toolbarbutton.icon label { - display: none; -} -#toolbar2 toolbarbutton:hover:not([disabled="true"]) { - background-color: #aaaaaa; -} - -toolbarbutton.toolbar2 { - list-style-image: url("icons.png"); -} - -toolbarbutton.toolbar2[disabled="true"] { - list-style-image: url("icons_disabled.png"); -} - -#play-suite-button { - -moz-image-region: rect(0px 121px 16px 96px); -} -#play-button { - -moz-image-region: rect(0px 146px 16px 121px); -} -.pause#pause-button { - -moz-image-region: rect(0px 32px 16px 16px); -} -.resume#pause-button { - -moz-image-region: rect(0px 80px 16px 64px); -} -#record-button:not([checked="true"]) { - -moz-image-region: rect(0px 48px 16px 32px); -} -#record-button[checked="true"] { - -moz-image-region: rect(16px 48px 32px 32px); - background-color: rgba(225, 225, 225, 0.3); -} -#schedule-button:not([checked="true"]) { - -moz-image-region: rect(0px 166px 16px 150px); -} -#schedule-button[checked="true"] { - -moz-image-region: rect(16px 166px 32px 150px); - background-color: rgba(225, 225, 225, 0.3); -} -#step-button { - -moz-image-region: rect(0px 64px 16px 48px); -} - -#rollup-button:not([disabled="true"]) { - list-style-image: url("spiral.png"); -} -#rollup-button[disabled="true"] { - list-style-image: url("spiral_disabled.png"); -} - -#browser-button { - list-style-image: url("fa-globe.png"); -} -#browser-button:hover:not([disabled="true"]) { - list-style-image: url("fa-globe_on.png"); -} -#browser-button.fx { - list-style-image: url("fa-firefox.png"); -} -#browser-button.fx:hover:not([disabled="true"]) { - list-style-image: url("fa-firefox_on.png"); -} -#browser-button.gc { - list-style-image: url("fa-chrome.png"); -} -#browser-button.gc:hover:not([disabled="true"]) { - list-style-image: url("fa-chrome_on.png"); -} -#browser-button.ie { - list-style-image: url("fa-internet-explorer.png"); -} -#browser-button.ie:hover:not([disabled="true"]) { - list-style-image: url("fa-internet-explorer_on.png"); -} -#browser-button.sa { - list-style-image: url("fa-safari.png"); -} -#browser-button.sa:hover:not([disabled="true"]) { - list-style-image: url("fa-safari_on.png"); -} - -#close-webdriver-button { - list-style-image: url("fa-times-circle-o.png"); -} -#close-webdriver-button:hover:not([disabled="true"]) { - list-style-image: url("fa-times-circle-o_on.png"); -} -#reload-button:not([disabled="true"]) { - list-style-image: url("reload.png"); -} -#reload-button[disabled="true"] { - list-style-image: url("reload_disabled.png"); -} - - -tab label { - font-size: 8.5pt; -} - -/* - * Slider - */ - -#speedSliderBox { - margin-left: 8px; - margin-right: 8px; -} - -#speedSliderBox label { - margin-top: 0; - font-size: 9px; - font-family: Lucida Grande, Verdana; -} - -#speedSliderBox .spacer { - height: 5px; -} - -#speedSliderBox slider { - margin-top: 3px; -} - -#speedSliderBox .slider-middle { - background: url("slider-middle.png"); - background-position: left 8px; - background-repeat: repeat-x; -} - -#speedSliderBox .slider-left { - background: url("slider.png"); - background-position: left 8px; - background-repeat: no-repeat; - width: 5px !important; -} - -#speedSliderBox .slider-right { - background: url("slider.png"); - background-position: right 8px; - background-repeat: no-repeat; - width: 5px; -} - -#speedSliderBox thumb { - -moz-appearance: none !important; - border: none; - background: url("slider-thumb.png"); - background-repeat: no-repeat; - background-position: 0 1px; - width: 13px; - height: 13px; - min-width: 13px; -} - -#speedSliderBox thumb > gripper { - /* hide gripper image on Windows */ - -moz-appearance: none; -} - -#tableViewUnavailable { - opacity:0.8; -} - -#tableViewUnavailable label { - width: 100%; - text-align: center; -} - -#suiteProgressBar { - background: url("progress-background.png"); - height: 16px; - width: 100%; - margin: 3px 3px 3px 4px; - border-width: 1px; - border-style: solid; - border-color: #444444 #eeeeee #eeeeee #444444; -} - -#suiteProgressIndicator.success { - background: url("progress-success.png"); -} - -#suiteProgressIndicator.failure { - background: url("progress-failure.png"); -} - -#suiteProgressRuns { - font-weight: bold; - color: #008800; - text-align: right; -} - -#suiteProgressFailures { - font-weight: bold; - color: #ee0000; - text-align: right; -} - -.visualeye #suiteProgressRuns { - color: #2fed2f; -} - -.visualeye #suiteProgressFailures { - color: #ba0000; -} - -.sm_btn { - width: 50px; - min-width: 50px; - padding-left: 2px; - margin-left: 1px; - padding-right: 2px; - margin-right: 1px; -} - -#source { - font-family: monospace; -} diff --git a/ide/main/src/skin/classic/slider-middle.png b/ide/main/src/skin/classic/slider-middle.png deleted file mode 100644 index 6ca211534834117a11c8d2f3cd2dee9bcf78f8b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngc!3HE{ZXRg@QY^(zo*^7SP{WbZ0pxQQctjQh z)n5l;MkkHg6+l7B64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1SHJY5_^ zB&H_!baebU@1T|t7!;%yuFu@PV+YI6S*|WFC$8_Q{Oq>L)HrTuQR^E9W`?<898;%y S^;!et>u>38|FCcRO#Epl5%VH@4DTp}i%ibvtjva%cFWqX@Om%gaki&Y^MrtgPMJG#>|VI{CL00CuI_Zf_}H zy|~khjM)f50w9+%0RqMM6z`wDD%`|9&?->fjfa;42?gc2I0kX$F^t06{mtOu<$hN~ zBnmEsQXb|ffaCE1ESN~bZyJF}q}{}|BveZ*Sg@Vcvn;;AOOrpeJ2b;gtbEn(ivz8(>dL(Pi)?8EqxKJOc;sedkk1YBAn|B{w)?9Yz7 z9Y2wp>X@6gx)`;h&E>@OQ=YQmz&^LTdL{xrW)At=Upum{0@Ovs2UrkHN&H|5U;v`G ru+g&jpwI;nfoMUH02spI5AXd3$3h;&ciT;G00000NkvXXu0mjfrke2< diff --git a/ide/main/src/skin/classic/slider.png b/ide/main/src/skin/classic/slider.png deleted file mode 100644 index 433f0b350abbcf02106e519cd0aed8cfacc7d66f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^azM<+!3HF+Y}E?^QY^(zo*^7SP{WbZ0pxQQctjQh z)n5l;MkkHg6+l7B64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Tcdb&7< zXiVICX(Mk_fQZ|}-|_Nx9y(hLFHOi`GXOVHndx0p)@CHc^*50sVZr)Q1 z)(7v|eBipwlS(?Tnb^Lm=O}=6Bs&_qGznwVq`C~;=m2KIovbi&!f8HoGvGJu< zq|b6=W0^jN1Db1A$*}CZZ*umKif7OD*S#8DC!+3a{`p(?qHe#UXVL|V6)^@I*SrA=aj%Zm*^_s=}&;!By<13kgu>FVdQ I&MBb@09U|$UjP6A diff --git a/ide/main/src/skin/classic/spiral.png b/ide/main/src/skin/classic/spiral.png deleted file mode 100644 index ceb6d4c016ab09010181ea045cb5833a764a72ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 730 zcmV<00ww*4P)D^lf+!FSr6?#`)T%{) z>ZWKDNmxW+6e^YtimTEBs|jlwGjwz;ni>CQymRk&+Gxy(MV{r$_de%4?>U5d<&w(* zAO*l~liA8ZCDDHxu-PS-a}{m4GN&g1fB-ubNLTNOe(z)cRtR8tHjBe<4z3Tw zczss%w45eq^)wq5pAkxp14P&?3PE4-l6@xu36gS$I4Fj-^zx4G@I<}~1i}I6_vSXy&Hk!(_8psn+3rTL?*y&06q{`d2oVA-aR4HcL#+D% zL}zu?!RlrJVE|~C%B7w;zj^~Ww4CJWX8#)`17D;T%!EoO?GEW zz_69&>vy@|GmdCW9DtdPX3KxHL0K}R<9=K-dZWwwU5?xrNL4QAbG({Y?ij$Y@`f$d1A?V(X%=L z{U`pjWB_=`1Nt6XrLUxt)WXm7K720Q>%6?k?5vQ%@+Xdcsx#%Rqyy}_8HN$ zFEpEcrkUe?j5L-puMG6`QG8hvbF&t=J}Olk3;02j?@xbCplH-aF0^a9_l*v%1Nz5q zv422|OUszo_chtJQRbX1Yh_0UFE(KXU(I@tO5I1z9R~UV0?h75nmYJJ^OtG}r(+V1 zMa1b-)jaU)1{Q#WHNB4!uSjtFXA)hSKlVX~4+WTqDT*CynH_F62?wDBgeM3@#P+D9 z0Dr7r4a8C2t|qnMIgvgzPy3jYg4dWw#eL-BkCV`Ov)s5c#lCd69tg1 zlZdm8c{lHCa(}Z)C~$p))DEQa8i#b$?$-Q`JpL^pH|Y~csXU*8J?LWZj1a0W5)1-7 z(ScT=mA_yCT+z?pM>IHJEn#=F)HU)S*ztHAfI5l1wP0b4@R7wbBh$gRxBn&RByU7` z;G;np`}7*ASu|g!KK(?_|0e-J8qai*Z||XSElbH%gk7%KLtiOp|0MVUcF`gDd}w4o P00000NkvXXu0mjff>lAD diff --git a/ide/main/src/skin/classic/toolbar.css b/ide/main/src/skin/classic/toolbar.css deleted file mode 100644 index f9d70d0c3e603..0000000000000 --- a/ide/main/src/skin/classic/toolbar.css +++ /dev/null @@ -1,13 +0,0 @@ -/* See license.txt for terms of usage */ -/* Toolbar button for Selenium IDE on Firefox */ -#selenium-ide-button { - list-style-image: url(chrome://selenium-ide/skin/selenium-ide-24.png); -} - -toolbar[iconsize="small"] #selenium-ide-button { - list-style-image: url(chrome://selenium-ide/skin/selenium-ide-16.png); -} - -toolbar[iconsize="large"] #selenium-ide-button { - list-style-image: url(chrome://selenium-ide/skin/selenium-ide-24.png); -} diff --git a/ide/main/src/skin/classic/treeView-icons.png b/ide/main/src/skin/classic/treeView-icons.png deleted file mode 100644 index d224900e83c27a8059eb8e95175b42ddf97a991f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 636 zcmV-?0)zdDP)b zkj-loVGzcj_hXYZO*AUDsfr(vHOWd)1O@#MJbF>^BHB}-Q7AnKdMOANMO0St=Dq$C z9>inNdRT?EXs{$zu{LYsZua9HFD7(tns{+w;GN-lpWn=Yh)|v_Fe1YLNLHRL>|}zk zaKWBOesse!Z3iRb`dsm25UK+JAOvrPp(><3;Hy+)8e+U3LfHB6AnJ^}= zaE;fEs(#t1>TDRm57glYi)s1rZeB7V3m_K+s&Mc2xV$;PU;2J@u&3n!z&KOo^Oe-e ztEY3B$?Rj1ly8ixeqtCz6D>fsflZ?%%@yh2!bmk=>V=V4sX@`o%#2&r>4-viDGtLg#A- z?z#(a!vhgP%OsMFF$K=f0$BQ&4Z?66K=3Po({!LBg(!;9tbJ~G9q$_{nzl^)#otDq zj)LpO%?1Jc0MGFtgus`#&2Fo{?vtWh0G?Q;9c}pqpxst*-S~;z0Vk6HKniSaxuKf1 z)h-b&k)nCaw7(BB?gf(- - - - - - - New Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Test
    openchrome://selenium-ide/content/tests/functional/aut/uploads.html
    typeid=uploaded-file/some/absolute/path
    verifyValueid=uploaded-file/some/absolute/path
    openchrome://selenium-ide/content/tests/functional/aut/form-fields.html
    typeid=field-texttest
    verifyValueid=field-texttest
    typeid=field-passwordpassword
    verifyValueid=field-passwordpassword
    - - diff --git a/ide/main/test/checks/checked.html b/ide/main/test/checks/checked.html deleted file mode 100644 index 581460ec29721..0000000000000 --- a/ide/main/test/checks/checked.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -checks - attributes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    checks - attributes
    openchrome://selenium-ide/content/tests/functional/aut/checksandradios.html
    verifyCheckedcss=input[name=monkeys]
    assertCheckedcss=input[name=monkeys]
    verifyNotCheckedcss=input[name=elephants]
    assertNotCheckedcss=input[name=elephants]
    verifyCheckedcss=input[name=kangaroos]
    assertCheckedcss=input[name=kangaroos]
    verifyNotCheckedcss=input[name=wombats]
    assertNotCheckedcss=input[name=wombats]
    - - diff --git a/ide/main/test/checks/disabled.html b/ide/main/test/checks/disabled.html deleted file mode 100644 index 1cf6666762f89..0000000000000 --- a/ide/main/test/checks/disabled.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -checks - disabled / editable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    checks - disabled / editable
    openchrome://selenium-ide/content/tests/functional/aut/disabled.html
    verifyEditablecss=input[name=monkeys]
    assertEditablecss=input[name=monkeys]
    verifyNotEditablecss=input[name=elephants]
    assertNotEditablecss=input[name=elephants]
    - - diff --git a/ide/main/test/checks/text.html b/ide/main/test/checks/text.html deleted file mode 100644 index eaedcc5394b56..0000000000000 --- a/ide/main/test/checks/text.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - -text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    text
    openchrome://selenium-ide/content/tests/functional/aut/search.html
    verifyTextlink=link with onclick attributelink with onclick attribute
    verifyNotTextlink=link with onclick attributeflying monkies!
    assertTextlink=link with onclick attributelink with onclick attribute
    assertNotTextlink=link with onclick attributeflying monkies!
    verifyTextPresentitems
    verifyTextNotPresentschool bus
    assertTextPresentitems
    assertTextNotPresentschool bus
    storeBodyTextbody_content
    verifyBodyText${body_content}
    verifyNotBodyTextelephants and zebras
    assertBodyText${body_content}
    assertNotBodyTextelephants and zebras
    - - diff --git a/ide/main/test/checks/visibility.html b/ide/main/test/checks/visibility.html deleted file mode 100644 index ecade4c054d85..0000000000000 --- a/ide/main/test/checks/visibility.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - -visibility - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    visibility
    openchrome://selenium-ide/content/tests/functional/aut/visibility.html
    verifyTextPresentText1
    verifyTextNotPresentText2
    verifyTextNotPresentText3
    verifyTextNotPresentText4
    verifyTextNotPresentText5
    verifyTextNotPresentText6
    verifyTextNotPresentText7
    verifyTextNotPresentText8
    verifyTextPresentexact:This is a test of
    verifyTextPresentThis is a test of*command.
    verifyTextNotPresentThis is a test of*comman.
    verifyTexttext1Text1
    verifyTextid=text1Text1
    verifyText//span[@id="text1"]Text1
    verifyNotTexttext2Text2
    verifyNotTexttext5Text5
    verifyNotTextid=text2Text2
    verifyNotTextid=text5Text5
    verifyNotTextcss=*[id="text2"]Text2
    verifyNotTextcss=*[id="text5"]Text5
    verifyText//bodyText1



    This is a test of the open command.
    - - diff --git a/ide/main/test/locators/css.html b/ide/main/test/locators/css.html deleted file mode 100644 index 5477dd2f03046..0000000000000 --- a/ide/main/test/locators/css.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -sizzle - - - - - - - - - - - - - - - - - -
    sizzle
    openchrome://selenium-ide/content/tests/functional/aut/search.html
    selectcss=selectlabel=10
    - - diff --git a/ide/main/test/locators/regexp.html b/ide/main/test/locators/regexp.html deleted file mode 100644 index b83b4274c775c..0000000000000 --- a/ide/main/test/locators/regexp.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -locators - regexp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    locators - regexp
    openchrome://selenium-ide/content/tests/functional/aut/search.html
    verifyTitleregexp:Bogus Sea.ch Engine
    verifyTitleregexp:Bogus Sea[opr]ch Engine
    verifyTitleregexp:Bogus Searq*ch Engine
    verifyTextlink=regexp:link with onclick at+ributelink with onclick attribute
    - - diff --git a/ide/main/test/popups/alert.html b/ide/main/test/popups/alert.html deleted file mode 100644 index 6d0add74ca150..0000000000000 --- a/ide/main/test/popups/alert.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/aut/alert.html
    clicklink=show alert
    assertAlerthello
    - - diff --git a/ide/main/test/popups/confirm-accept.html b/ide/main/test/popups/confirm-accept.html deleted file mode 100644 index 378ade6e90bf3..0000000000000 --- a/ide/main/test/popups/confirm-accept.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/aut/alert.html
    clicklink=show confirmation
    assertConfirmationAre you sure?
    - - diff --git a/ide/main/test/popups/confirm-cancel.html b/ide/main/test/popups/confirm-cancel.html deleted file mode 100644 index 7be497f2b2084..0000000000000 --- a/ide/main/test/popups/confirm-cancel.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/aut/alert.html
    chooseCancelOnNextConfirmation
    clicklink=show confirmation
    assertConfirmationAre you sure?
    - - diff --git a/ide/main/test/popups/prompt.html b/ide/main/test/popups/prompt.html deleted file mode 100644 index 1bb0b43878317..0000000000000 --- a/ide/main/test/popups/prompt.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - TestClick - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TestClick
    openchrome://selenium-ide/content/tests/functional/aut/alert.html
    answerOnNextPromptfoobar
    clicklink=show prompt
    assertPromptInput new name
    - - \ No newline at end of file diff --git a/ide/main/test/testsuite.html b/ide/main/test/testsuite.html deleted file mode 100644 index 080137ae9768b..0000000000000 --- a/ide/main/test/testsuite.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Test Suite - - - - - - - - - - - - - - -
    Test Suite
    locators - css
    locators - regexp
    actions - type
    checks - text
    checks - visibility
    checks - checked
    popups - alert
    popups - confirm accept
    popups - confirm cancel
    popups - prompt
    - - diff --git a/ide/main/test/testsuite.js b/ide/main/test/testsuite.js deleted file mode 100644 index 1759736fada33..0000000000000 --- a/ide/main/test/testsuite.js +++ /dev/null @@ -1,13 +0,0 @@ -var Utils = require("../../../third_party/js/mozmill/shared-modules/utils"); - -var setupModule = function(module) { - browser = mozmill.getBrowserController(); -}; - -var testRunSuite = function () { - browser.click(new elementslib.Elem(browser.menus.Tools['menuToolsSeleniumIDE'])); - Utils.handleWindow("type", "global:selenium-ide", function(browser) {}, true); - selenium = new mozmill.controller.MozMillController(mozmill.utils.getWindowByType("global:selenium-ide")); - - selenium.click(new elementslib.Elem(selenium.menus.File['menu_FileOpenSuite'])); -}; \ No newline at end of file diff --git a/ide/plugins/csharp-format/build.desc b/ide/plugins/csharp-format/build.desc deleted file mode 100644 index 4a1494c48f52c..0000000000000 --- a/ide/plugins/csharp-format/build.desc +++ /dev/null @@ -1,6 +0,0 @@ -mozilla_extension(name = "csharp-format", - resources = [ - {"src/content" : "chrome"} - ], - chrome = "src/chrome.manifest.production", - install = "src/install.rdf") diff --git a/ide/plugins/csharp-format/src/chrome.manifest b/ide/plugins/csharp-format/src/chrome.manifest deleted file mode 100644 index 1da7ea6d5e91a..0000000000000 --- a/ide/plugins/csharp-format/src/chrome.manifest +++ /dev/null @@ -1,4 +0,0 @@ -# chrome.manifest for development -content csharp-formatters content/ - -overlay chrome://selenium-ide/content/selenium-ide-overlay.xul chrome://csharp-formatters/content/formats/format-loader.xul diff --git a/ide/plugins/csharp-format/src/chrome.manifest.production b/ide/plugins/csharp-format/src/chrome.manifest.production deleted file mode 100644 index 345781ad8d74d..0000000000000 --- a/ide/plugins/csharp-format/src/chrome.manifest.production +++ /dev/null @@ -1,4 +0,0 @@ -# chrome.manifest for production -content csharp-formatters chrome/content/ - -overlay chrome://selenium-ide/content/selenium-ide-overlay.xul chrome://csharp-formatters/content/formats/format-loader.xul diff --git a/ide/plugins/csharp-format/src/content/formats/cs-rc.js b/ide/plugins/csharp-format/src/content/formats/cs-rc.js deleted file mode 100644 index a69324f0303c7..0000000000000 --- a/ide/plugins/csharp-format/src/content/formats/cs-rc.js +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Format for Selenium Remote Control .NET (C#) client. - */ - -var subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); -subScriptLoader.loadSubScript('chrome://selenium-ide/content/formats/remoteControl.js', this); - -this.name = "cs-rc"; - -function testMethodName(testName) { - return "The" + capitalize(testName) + "Test"; -} - -function assertTrue(expression) { - return "Assert.IsTrue(" + expression.toString() + ");"; -} - -function assertFalse(expression) { - return "Assert.IsFalse(" + expression.toString() + ");"; -} - -function verify(statement) { - return "try\n" + - "{\n" + - indents(1) + statement + "\n" + - "}\n" + - "catch (AssertionException e)\n" + - "{\n" + - indents(1) + "verificationErrors.Append(e.Message);\n" + - "}"; -} - -function verifyTrue(expression) { - return verify(assertTrue(expression)); -} - -function verifyFalse(expression) { - return verify(assertFalse(expression)); -} - -function joinExpression(expression) { - return "String.Join(\",\", " + expression.toString() + ")"; -} - -function assignToVariable(type, variable, expression) { - return capitalize(type) + " " + variable + " = " + expression.toString(); -} - -function waitFor(expression) { - return "for (int second = 0;; second++) {\n" + - indents(1) + 'if (second >= 60) Assert.Fail("timeout");\n' + - indents(1) + "try\n" + - indents(1) + "{\n" + - (expression.setup ? indents(2) + expression.setup() + "\n" : "") + - indents(2) + "if (" + expression.toString() + ") break;\n" + - indents(1) + "}\n" + - indents(1) + "catch (Exception)\n" + - indents(1) + "{}\n" + - indents(1) + "Thread.Sleep(1000);\n" + - "}"; -} - -function assertOrVerifyFailure(line, isAssert) { - var message = '"expected failure"'; - var failStatement = isAssert ? "Assert.Fail(" + message + ");" : - "verificationErrors.Append(" + message + ");"; - return "try\n" + - "{\n" + - line + "\n" + - failStatement + "\n" + - "}\n" + - "catch (Exception) {}\n"; -} - -Equals.prototype.toString = function() { - return this.e1.toString() + " == " + this.e2.toString(); -}; - -NotEquals.prototype.toString = function() { - return this.e1.toString() + " != " + this.e2.toString(); -}; - -Equals.prototype.assert = function() { - return "Assert.AreEqual(" + this.e1.toString() + ", " + this.e2.toString() + ");"; -}; - -Equals.prototype.verify = function() { - return verify(this.assert()); -}; - -NotEquals.prototype.assert = function() { - return "Assert.AreNotEqual(" + this.e1.toString() + ", " + this.e2.toString() + ");"; -}; - -NotEquals.prototype.verify = function() { - return verify(this.assert()); -}; - -RegexpMatch.prototype.toString = function() { - return "Regex.IsMatch(" + this.expression + ", " + string(this.pattern) + ")"; -}; - -function pause(milliseconds) { - return "Thread.Sleep(" + parseInt(milliseconds, 10) + ");"; -} - -function echo(message) { - return "Console.WriteLine(" + xlateArgument(message) + ");"; -} - -function statement(expression) { - return expression.toString() + ';'; -} - -function array(value) { - var str = 'new String[] {'; - for (var i = 0; i < value.length; i++) { - str += string(value[i]); - if (i < value.length - 1) str += ", "; - } - str += '}'; - return str; -} - -function nonBreakingSpace() { - return "\"\\u00a0\""; -} - -CallSelenium.prototype.toString = function() { - var result = ''; - if (this.negative) { - result += '!'; - } - if (options.receiver) { - result += options.receiver + '.'; - } - result += capitalize(this.message); - result += '('; - for (var i = 0; i < this.args.length; i++) { - result += this.args[i]; - if (i < this.args.length - 1) { - result += ', '; - } - } - result += ')'; - return result; -}; - -function formatComment(comment) { - return comment.comment.replace(/.+/mg, function(str) { - return "// " + str; - }); -} - -function defaultExtension() { - return this.options.defaultExtension; -} - -this.options = { - receiver: "selenium", - rcHost: "localhost", - rcPort: "4444", - environment: "*chrome", - namespace: "SeleniumTests", - indent: 'tab', - initialIndents: '3', - header: - 'using System;\n' + - 'using System.Text;\n' + - 'using System.Text.RegularExpressions;\n' + - 'using System.Threading;\n' + - 'using NUnit.Framework;\n' + - 'using Selenium;\n' + - '\n' + - 'namespace ${namespace}\n' + - '{\n' + - indents(1) + '[TestFixture]\n' + - indents(1) + 'public class ${className}\n' + - indents(1) + '{\n' + - indents(2) + 'private ISelenium selenium;\n' + - indents(2) + 'private StringBuilder verificationErrors;\n' + - indents(2) + '\n' + - indents(2) + '[SetUp]\n' + - indents(2) + 'public void SetupTest()\n' + - indents(2) + '{\n' + - indents(3) + '${receiver} = new DefaultSelenium("${rcHost}", ${rcPort}, "${environment}", "${baseURL}");\n' + - indents(3) + '${receiver}.Start();\n' + - indents(3) + 'verificationErrors = new StringBuilder();\n' + - indents(2) + '}\n' + - indents(2) + '\n' + - indents(2) + '[TearDown]\n' + - indents(2) + 'public void TeardownTest()\n' + - indents(2) + '{\n' + - indents(3) + 'try\n' + - indents(3) + '{\n' + - indents(4) + '${receiver}.Stop();\n' + - indents(3) + '}\n' + - indents(3) + 'catch (Exception)\n' + - indents(3) + '{\n' + - indents(4) + '// Ignore errors if unable to close the browser\n' + - indents(3) + '}\n' + - indents(3) + 'Assert.AreEqual("", verificationErrors.ToString());\n' + - indents(2) + '}\n' + - indents(2) + '\n' + - indents(2) + '[Test]\n' + - indents(2) + 'public void ${methodName}()\n' + - indents(2) + '{\n', - footer: - indents(2) + '}\n' + - indents(1) + '}\n' + - '}\n', - defaultExtension: "cs" -}; -this.configForm = - 'Variable for Selenium instance' + - '' + - 'Selenium RC host' + - '' + - 'Selenium RC port' + - '' + - 'Environment' + - '' + - 'Namespace' + - ''; diff --git a/ide/plugins/csharp-format/src/content/formats/cs-wd.js b/ide/plugins/csharp-format/src/content/formats/cs-wd.js deleted file mode 100644 index 71b25e45ff5e9..0000000000000 --- a/ide/plugins/csharp-format/src/content/formats/cs-wd.js +++ /dev/null @@ -1,539 +0,0 @@ -/* - * Formatter for Selenium 2 / WebDriver .NET (C#) client. - */ - -if (!this.formatterType) { // this.formatterType is defined for the new Formatter system - // This method (the if block) of loading the formatter type is deprecated. - // For new formatters, simply specify the type in the addPluginProvidedFormatter() and omit this - // if block in your formatter. - var subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); - subScriptLoader.loadSubScript('chrome://selenium-ide/content/formats/webdriver.js', this); -} - -function testClassName(testName) { - return testName.split(/[^0-9A-Za-z]+/).map( - function(x) { - return capitalize(x); - }).join(''); -} - -function testMethodName(testName) { - return "The" + capitalize(testName) + "Test"; -} - -function nonBreakingSpace() { - return "\"\\u00a0\""; -} - -function array(value) { - var str = 'new String[] {'; - for (var i = 0; i < value.length; i++) { - str += string(value[i]); - if (i < value.length - 1) str += ", "; - } - str += '}'; - return str; -} - -Equals.prototype.toString = function() { - return this.e1.toString() + " == " + this.e2.toString(); -}; - -Equals.prototype.assert = function() { - return "Assert.AreEqual(" + this.e1.toString() + ", " + this.e2.toString() + ");"; -}; - -Equals.prototype.verify = function() { - return verify(this.assert()); -}; - -NotEquals.prototype.toString = function() { - return this.e1.toString() + " != " + this.e2.toString(); -}; - -NotEquals.prototype.assert = function() { - return "Assert.AreNotEqual(" + this.e1.toString() + ", " + this.e2.toString() + ");"; -}; - -NotEquals.prototype.verify = function() { - return verify(this.assert()); -}; - -function joinExpression(expression) { - return "String.Join(\",\", " + expression.toString() + ")"; -} - -function statement(expression) { - return expression.toString() + ';'; -} - -function assignToVariable(type, variable, expression) { - return capitalize(type) + " " + variable + " = " + expression.toString(); -} - -function ifCondition(expression, callback) { - return "if (" + expression.toString() + ")\n{\n" + callback() + "}"; -} - -function assertTrue(expression) { - return "Assert.IsTrue(" + expression.toString() + ");"; -} - -function assertFalse(expression) { - return "Assert.IsFalse(" + expression.toString() + ");"; -} - -function verify(statement) { - return "try\n" + - "{\n" + - indents(1) + statement + "\n" + - "}\n" + - "catch (AssertionException e)\n" + - "{\n" + - indents(1) + "verificationErrors.Append(e.Message);\n" + - "}"; -} - -function verifyTrue(expression) { - return verify(assertTrue(expression)); -} - -function verifyFalse(expression) { - return verify(assertFalse(expression)); -} - -RegexpMatch.patternToString = function(pattern) { - if (pattern != null) { - //value = value.replace(/^\s+/, ''); - //value = value.replace(/\s+$/, ''); - pattern = pattern.replace(/\\/g, '\\\\'); - pattern = pattern.replace(/\"/g, '\\"'); - pattern = pattern.replace(/\r/g, '\\r'); - pattern = pattern.replace(/\n/g, '(\\n|\\r\\n)'); - return '"' + pattern + '"'; - } else { - return '""'; - } -}; - -RegexpMatch.prototype.toString = function() { - return "Regex.IsMatch(" + this.expression + ", " + RegexpMatch.patternToString(this.pattern) + ")"; -}; - -function waitFor(expression) { - return "for (int second = 0;; second++) {\n" + - indents(1) + 'if (second >= 60) Assert.Fail("timeout");\n' + - indents(1) + "try\n" + - indents(1) + "{\n" + - (expression.setup ? indents(2) + expression.setup() + "\n" : "") + - indents(2) + "if (" + expression.toString() + ") break;\n" + - indents(1) + "}\n" + - indents(1) + "catch (Exception)\n" + - indents(1) + "{}\n" + - indents(1) + "Thread.Sleep(1000);\n" + - "}"; -} - -function assertOrVerifyFailure(line, isAssert) { - var message = '"expected failure"'; - var failStatement = isAssert ? "Assert.Fail(" + message + ");" : - "verificationErrors.Append(" + message + ");"; - return "try\n" + - "{\n" + - line + "\n" + - failStatement + "\n" + - "}\n" + - "catch (Exception) {}\n"; -} - -function pause(milliseconds) { - return "Thread.Sleep(" + parseInt(milliseconds, 10) + ");"; -} - -function echo(message) { - return "Console.WriteLine(" + xlateArgument(message) + ");"; -} - -function formatComment(comment) { - return comment.comment.replace(/.+/mg, function(str) { - return "// " + str; - }); -} - -function keyVariable(key) { - return "Keys." + key; -} - -this.sendKeysMaping = { - BKSP: "Backspace", - BACKSPACE: "Backspace", - TAB: "Tab", - ENTER: "Enter", - SHIFT: "Shift", - CONTROL: "Control", - CTRL: "Control", - ALT: "Alt", - PAUSE: "Pause", - ESCAPE: "Escape", - ESC: "Escape", - SPACE: "Space", - PAGE_UP: "PageUp", - PGUP: "PageUp", - PAGE_DOWN: "PageDown", - PGDN: "PageDown", - END: "End", - HOME: "Home", - LEFT: "Left", - UP: "Up", - RIGHT: "Right", - DOWN: "Down", - INSERT: "Insert", - INS: "Insert", - DELETE: "Delete", - DEL: "Delete", - SEMICOLON: "Semicolon", - EQUALS: "Equal", - - NUMPAD0: "NumberPad0", - N0: "NumberPad0", - NUMPAD1: "NumberPad1", - N1: "NumberPad1", - NUMPAD2: "NumberPad2", - N2: "NumberPad2", - NUMPAD3: "NumberPad3", - N3: "NumberPad3", - NUMPAD4: "NumberPad4", - N4: "NumberPad4", - NUMPAD5: "NumberPad5", - N5: "NumberPad5", - NUMPAD6: "NumberPad6", - N6: "NumberPad6", - NUMPAD7: "NumberPad7", - N7: "NumberPad7", - NUMPAD8: "NumberPad8", - N8: "NumberPad8", - NUMPAD9: "NumberPad9", - N9: "NumberPad9", - MULTIPLY: "Multiply", - MUL: "Multiply", - ADD: "Add", - PLUS: "Add", - SEPARATOR: "Separator", - SEP: "Separator", - SUBTRACT: "Subtract", - MINUS: "Subtract", - DECIMAL: "Decimal", - PERIOD: "Decimal", - DIVIDE: "Divide", - DIV: "Divide", - - F1: "F1", - F2: "F2", - F3: "F3", - F4: "F4", - F5: "F5", - F6: "F6", - F7: "F7", - F8: "F8", - F9: "F9", - F10: "F10", - F11: "F11", - F12: "F12", - - META: "Meta", - COMMAND: "Command" -}; - -/** - * Returns a string representing the suite for this formatter language. - * - * @param testSuite the suite to format - * @param filename the file the formatted suite will be saved as - */ -function formatSuite(testSuite, filename) { - var suiteClass = /^(\w+)/.exec(filename)[1]; - suiteClass = suiteClass[0].toUpperCase() + suiteClass.substring(1); - - var formattedSuite = "using NUnit.Framework;\n" - + "using NUnit.Core;\n" - + "\n" - + "namespace " + this.options.namespace + "\n" - + '{\n' - + indents(1) + "public class " + suiteClass + "\n" - + indents(1) + '{\n' - + indents(2) + "[Suite] public static TestSuite Suite\n" - + indents(2) + '{\n' - + indents(3) + "get\n" - + indents(3) + '{\n' - + indents(4) + 'TestSuite suite = new TestSuite("'+ suiteClass +'");\n'; - - for (var i = 0; i < testSuite.tests.length; ++i) { - var testClass = testSuite.tests[i].getTitle(); - formattedSuite += indents(4) - + "suite.Add(new " + testClass + "());\n"; - } - - formattedSuite += indents(4) + "return suite;\n" - + indents(3) + "}\n" - + indents(2) + "}\n" - + indents(1) + "}\n" - + "}\n"; - - return formattedSuite; -} - -function defaultExtension() { - return this.options.defaultExtension; -} - -this.options = { - receiver: "driver", - showSelenese: 'false', - namespace: "SeleniumTests", - indent: '4', - initialIndents: '3', - header: - 'using System;\n' + - 'using System.Text;\n' + - 'using System.Text.RegularExpressions;\n' + - 'using System.Threading;\n' + - 'using NUnit.Framework;\n' + - 'using OpenQA.Selenium;\n' + - 'using OpenQA.Selenium.Firefox;\n' + - 'using OpenQA.Selenium.Support.UI;\n' + - '\n' + - 'namespace ${namespace}\n' + - '{\n' + - ' [TestFixture]\n' + - ' public class ${className}\n' + - ' {\n' + - ' private IWebDriver driver;\n' + - ' private StringBuilder verificationErrors;\n' + - ' private string baseURL;\n' + - " private bool acceptNextAlert = true;\n" + - ' \n' + - ' [SetUp]\n' + - ' public void SetupTest()\n' + - ' {\n' + - ' ${receiver} = new FirefoxDriver();\n' + - ' baseURL = "${baseURL}";\n' + - ' verificationErrors = new StringBuilder();\n' + - ' }\n' + - ' \n' + - ' [TearDown]\n' + - ' public void TeardownTest()\n' + - ' {\n' + - ' try\n' + - ' {\n' + - ' ${receiver}.Quit();\n' + - ' }\n' + - ' catch (Exception)\n' + - ' {\n' + - ' // Ignore errors if unable to close the browser\n' + - ' }\n' + - ' Assert.AreEqual("", verificationErrors.ToString());\n' + - ' }\n' + - ' \n' + - ' [Test]\n' + - ' public void ${methodName}()\n' + - ' {\n', - footer: - ' }\n' + - " private bool IsElementPresent(By by)\n" + - " {\n" + - " try\n" + - " {\n" + - " driver.FindElement(by);\n" + - " return true;\n" + - " }\n" + - " catch (NoSuchElementException)\n" + - " {\n" + - " return false;\n" + - " }\n" + - " }\n" + - ' \n' + - " private bool IsAlertPresent()\n" + - " {\n" + - " try\n" + - " {\n" + - " driver.SwitchTo().Alert();\n" + - " return true;\n" + - " }\n" + - " catch (NoAlertPresentException)\n" + - " {\n" + - " return false;\n" + - " }\n" + - " }\n" + - ' \n' + - " private string CloseAlertAndGetItsText() {\n" + - " try {\n" + - " IAlert alert = driver.SwitchTo().Alert();\n" + - " string alertText = alert.Text;\n" + - " if (acceptNextAlert) {\n" + - " alert.Accept();\n" + - " } else {\n" + - " alert.Dismiss();\n" + - " }\n" + - " return alertText;\n" + - " } finally {\n" + - " acceptNextAlert = true;\n" + - " }\n" + - " }\n" + - ' }\n' + - '}\n', - defaultExtension: "cs" -}; -this.configForm = 'Variable for Selenium instance' + - '' + - 'Namespace' + - '' + - ''; - -this.name = "C# (WebDriver)"; -this.testcaseExtension = ".cs"; -this.suiteExtension = ".cs"; -this.webdriver = true; - -WDAPI.Driver = function() { - this.ref = options.receiver; -}; - -WDAPI.Driver.searchContext = function(locatorType, locator) { - var locatorString = xlateArgument(locator); - switch (locatorType) { - case 'xpath': - return 'By.XPath(' + locatorString + ')'; - case 'css': - return 'By.CssSelector(' + locatorString + ')'; - case 'id': - return 'By.Id(' + locatorString + ')'; - case 'link': - return 'By.LinkText(' + locatorString + ')'; - case 'name': - return 'By.Name(' + locatorString + ')'; - case 'tag_name': - return 'By.TagName(' + locatorString + ')'; - } - throw 'Error: unknown strategy [' + locatorType + '] for locator [' + locator + ']'; -}; - -WDAPI.Driver.prototype.back = function() { - return this.ref + ".Navigate().Back()"; -}; - -WDAPI.Driver.prototype.close = function() { - return this.ref + ".Close()"; -}; - -WDAPI.Driver.prototype.findElement = function(locatorType, locator) { - return new WDAPI.Element(this.ref + ".FindElement(" + WDAPI.Driver.searchContext(locatorType, locator) + ")"); -}; - -WDAPI.Driver.prototype.findElements = function(locatorType, locator) { - return new WDAPI.ElementList(this.ref + ".FindElements(" + WDAPI.Driver.searchContext(locatorType, locator) + ")"); -}; - -WDAPI.Driver.prototype.getCurrentUrl = function() { - return this.ref + ".Url"; -}; - -WDAPI.Driver.prototype.get = function(url) { - if (url.length > 1 && (url.substring(1,8) == "http://" || url.substring(1,9) == "https://")) { // url is quoted - return this.ref + ".Navigate().GoToUrl(" + url + ")"; - } else { - return this.ref + ".Navigate().GoToUrl(baseURL + " + url + ")"; - } -}; - -WDAPI.Driver.prototype.getTitle = function() { - return this.ref + ".Title"; -}; - -WDAPI.Driver.prototype.getAlert = function() { - return "CloseAlertAndGetItsText()"; -}; - -WDAPI.Driver.prototype.chooseOkOnNextConfirmation = function() { - return "acceptNextAlert = true"; -}; - -WDAPI.Driver.prototype.chooseCancelOnNextConfirmation = function() { - return "acceptNextAlert = false"; -}; - -WDAPI.Driver.prototype.refresh = function() { - return this.ref + ".Navigate().Refresh()"; -}; - -WDAPI.Element = function(ref) { - this.ref = ref; -}; - -WDAPI.Element.prototype.clear = function() { - return this.ref + ".Clear()"; -}; - -WDAPI.Element.prototype.click = function() { - return this.ref + ".Click()"; -}; - -WDAPI.Element.prototype.getAttribute = function(attributeName) { - return this.ref + ".GetAttribute(" + xlateArgument(attributeName) + ")"; -}; - -WDAPI.Element.prototype.getText = function() { - return this.ref + ".Text"; -}; - -WDAPI.Element.prototype.isDisplayed = function() { - return this.ref + ".Displayed"; -}; - -WDAPI.Element.prototype.isSelected = function() { - return this.ref + ".Selected"; -}; - -WDAPI.Element.prototype.sendKeys = function(text) { - return this.ref + ".SendKeys(" + xlateArgument(text) + ")"; -}; - -WDAPI.Element.prototype.submit = function() { - return this.ref + ".Submit()"; -}; - -WDAPI.Element.prototype.select = function(selectLocator) { - if (selectLocator.type == 'index') { - return "new SelectElement(" + this.ref + ").SelectByIndex(" + selectLocator.string + ")"; - } - if (selectLocator.type == 'value') { - return "new SelectElement(" + this.ref + ").SelectByValue(" + xlateArgument(selectLocator.string) + ")"; - } - return "new SelectElement(" + this.ref + ").SelectByText(" + xlateArgument(selectLocator.string) + ")"; -}; - -WDAPI.ElementList = function(ref) { - this.ref = ref; -}; - -WDAPI.ElementList.prototype.getItem = function(index) { - return this.ref + "[" + index + "]"; -}; - -WDAPI.ElementList.prototype.getSize = function() { - return this.ref + ".Count"; -}; - -WDAPI.ElementList.prototype.isEmpty = function() { - return this.ref + ".Count == 0"; -}; - -WDAPI.Utils = function() { -}; - -WDAPI.Utils.isElementPresent = function(how, what) { - return "IsElementPresent(" + WDAPI.Driver.searchContext(how, what) + ")"; -}; - -WDAPI.Utils.isAlertPresent = function() { - return "IsAlertPresent()"; -}; diff --git a/ide/plugins/csharp-format/src/content/formats/format-loader.xul b/ide/plugins/csharp-format/src/content/formats/format-loader.xul deleted file mode 100644 index a79e65b35fb6b..0000000000000 --- a/ide/plugins/csharp-format/src/content/formats/format-loader.xul +++ /dev/null @@ -1,15 +0,0 @@ - - - - -