diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-13 03:11:55 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-13 03:11:55 +0000 |
commit | 8402a31a982f9d4470a5d2957624b91f06559a61 (patch) | |
tree | 069b9508f41db0397ca4dffe16048f8fc61d49e2 | |
parent | 608b1eb1811d270ee031a1a734a2b24344d2d8f2 (diff) | |
download | chromium_src-8402a31a982f9d4470a5d2957624b91f06559a61.zip chromium_src-8402a31a982f9d4470a5d2957624b91f06559a61.tar.gz chromium_src-8402a31a982f9d4470a5d2957624b91f06559a61.tar.bz2 |
Compile a list of the 34 automated UI test commands we want to run on the distributed tests. The goal is to make a test run of all combinations of 4 (as opposed to 5 now) for a total of 34^4 commands (as opposed to 17^5) and see what comes out of it. We won't be running any random keypresses in this run (except in the Dialog fuzzers), only explicit actions.
There were also some discrepancies in how we were using the HTML elements, which I have fixed (Import is now ImportSettings, EditKeywords is now EditSearchEngines and ClearBrowserData is now ClearBrowsingData). I also reordered some functions to match .h file (alphabetical order).
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@780 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 41 | ||||
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.h | 14 | ||||
-rw-r--r-- | chrome/tools/automated_ui_test_tools/possible_actions.txt | 35 |
3 files changed, 60 insertions, 30 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index d682d9e..b831fb1 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -93,7 +93,7 @@ const std::string kDialogs[] = { "JavaScriptDebugger", "JavaScriptConsole", "ClearBrowsingData", - "Import", + "ImportSettings", "EditSearchEngines", "ViewPasswords" }; @@ -318,7 +318,7 @@ bool AutomatedUITest::DoAction(const std::string & action) { did_complete_action = ShowHistory(); } else if (LowerCaseEqualsASCII(action, "home")) { did_complete_action = Home(); - } else if (LowerCaseEqualsASCII(action, "import")) { + } else if (LowerCaseEqualsASCII(action, "importsettings")) { did_complete_action = OpenImportSettingsDialog(); } else if (LowerCaseEqualsASCII(action, "javascriptconsole")) { did_complete_action = JavaScriptConsole(); @@ -368,10 +368,12 @@ bool AutomatedUITest::DoAction(const std::string & action) { } else if (LowerCaseEqualsASCII(action, "teardown")) { CloseBrowserAndServer(); did_complete_action = true; - } else if (LowerCaseEqualsASCII(action, "testclearbrowserdata")) { + } else if (LowerCaseEqualsASCII(action, "testaboutchrome")) { + did_complete_action = TestAboutChrome(); + } else if (LowerCaseEqualsASCII(action, "testclearbrowsingdata")) { did_complete_action = TestClearBrowsingData(); - } else if (LowerCaseEqualsASCII(action, "testeditkeywords")) { - did_complete_action = TestEditKeywords(); + } else if (LowerCaseEqualsASCII(action, "testeditsearchengines")) { + did_complete_action = TestEditSearchEngines(); } else if (LowerCaseEqualsASCII(action, "testimportsettings")) { did_complete_action = TestImportSettings(); } else if (LowerCaseEqualsASCII(action, "testoptions")) { @@ -677,33 +679,38 @@ bool AutomatedUITest::ZoomPlus() { return RunCommand(IDC_ZOOM_PLUS); } -bool AutomatedUITest::TestEditKeywords() { - DoAction("EditKeywords"); +bool AutomatedUITest::TestAboutChrome() { + DoAction("About"); return FuzzyTestDialog(kTestDialogActionsToRun); } -bool AutomatedUITest::TestTaskManager() { - DoAction("TaskManager"); +bool AutomatedUITest::TestClearBrowsingData() { + DoAction("ClearBrowsingData"); return FuzzyTestDialog(kTestDialogActionsToRun); } -bool AutomatedUITest::TestOptions() { - DoAction("Options"); +bool AutomatedUITest::TestEditSearchEngines() { + DoAction("EditSearchEngines"); return FuzzyTestDialog(kTestDialogActionsToRun); } -bool AutomatedUITest::TestViewPasswords() { - DoAction("ViewPasswords"); +bool AutomatedUITest::TestImportSettings() { + DoAction("ImportSettings"); return FuzzyTestDialog(kTestDialogActionsToRun); } -bool AutomatedUITest::TestClearBrowsingData() { - DoAction("ClearBrowserData"); +bool AutomatedUITest::TestTaskManager() { + DoAction("TaskManager"); return FuzzyTestDialog(kTestDialogActionsToRun); } -bool AutomatedUITest::TestImportSettings() { - DoAction("ImportSettings"); +bool AutomatedUITest::TestOptions() { + DoAction("Options"); + return FuzzyTestDialog(kTestDialogActionsToRun); +} + +bool AutomatedUITest::TestViewPasswords() { + DoAction("ViewPasswords"); return FuzzyTestDialog(kTestDialogActionsToRun); } diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.h b/chrome/test/automated_ui_tests/automated_ui_tests.h index 2a4fbf0..e8573ec 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.h +++ b/chrome/test/automated_ui_tests/automated_ui_tests.h @@ -228,7 +228,7 @@ class AutomatedUITest : public UITest { // Opens the Clear Browsing Data dialog, this dialog is modal so a majority of // the test can't be completed until it is dismissed. - // XML element: <ClearBrowserData/> + // XML element: <ClearBrowsingData/> bool OpenClearBrowsingDataDialog(); // Opens the Search Engines dialog. While it isn't modal, it takes focus from @@ -351,13 +351,17 @@ class AutomatedUITest : public UITest { // <TestEditKeywords> <PressTabKey/><PressEnterKey/><DownArrow/> // <DownArrow/><PressEscapeKey/> </TestEditKeywords> + // Opens About dialog and runs random actions on it. + // XML element: <TestAboutChrome/> + bool TestAboutChrome(); + // Opens Clear Browsing Data dialog and runs random actions on it. - // XML element: <TestClearBrowserData/> + // XML element: <TestClearBrowsingData/> bool TestClearBrowsingData(); // Opens Edit Keywords dialog and runs random actions on it. - // XML element: <TestEditKeywords/> - bool TestEditKeywords(); + // XML element: <TestEditSearchEngines/> + bool TestEditSearchEngines(); // Opens Import Settings dialog and runs random actions on it. // XML element: <TestImportSettings/> @@ -418,7 +422,7 @@ class AutomatedUITest : public UITest { // Calls SimulateOSKeyPress on the active window. Simulates a key press at // the OS level. |key| is the key pressed and |flags| specifies which - // modifiers keys are also pressed (as defined inchrome/views/event.h). + // modifiers keys are also pressed (as defined in chrome/views/event.h). bool SimulateKeyPressInActiveWindow(wchar_t key, int flags); // Opens init file, reads it into the reader, and closes the file. diff --git a/chrome/tools/automated_ui_test_tools/possible_actions.txt b/chrome/tools/automated_ui_test_tools/possible_actions.txt index a7cf2ab..9e5ad61 100644 --- a/chrome/tools/automated_ui_test_tools/possible_actions.txt +++ b/chrome/tools/automated_ui_test_tools/possible_actions.txt @@ -1,15 +1,34 @@ -Navigate -NewTab Back -Forward +ChangeEncoding CloseTab +DownArrow +Downloads +DuplicateTab +FindInPage +Forward +GoOffTheRecord +History +Home +Navigate +NewTab +DragTabLeft +DragTabRight +DragTabOut OpenWindow Reload -FindInPage +RestoreTab SelectNextTab SelectPrevTab -ZoomPlus +ShowBookmarks +Star +TestAboutChrome +TestClearBrowsingData +TestEditSearchEngines +TestImportSettings +TestOptions +TestTaskManager +TestViewPasswords +UpArrow +ViewSource ZoomMinus -History -Downloads -Dialog +ZoomPlus |