summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 20:50:05 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 20:50:05 +0000
commitf1d306e67b8676336f55aae95652d7cd51359534 (patch)
tree6f25205e78ba4c69e7b45468b3fdd0f6bed259f5 /chrome/test
parentb3d565264e6073bd00e4dfd81c8f887ea01fb58c (diff)
downloadchromium_src-f1d306e67b8676336f55aae95652d7cd51359534.zip
chromium_src-f1d306e67b8676336f55aae95652d7cd51359534.tar.gz
chromium_src-f1d306e67b8676336f55aae95652d7cd51359534.tar.bz2
Cleanup, part 1.
* Consistently use underscores between words in identifiers (IDC_NEWTAB -> IDC_NEW_TAB) * Make some identifiers clearer or more up-to-date (IDC_DUPLICATE -> IDC_DUPLICATE_TAB, IDC_GOOFFTHERECORD -> IDC_NEW_INCOGNITO_WINDOW, IDC_NEWPROFILEWINDOW -> IDC_PROFILE_MENU) * Try and make string identifiers (IDS_xxx) match their corresponding IDC_xxx commands. Tony tells me this will not cause any need for retranslation. * As much as possible (without modifying automated UI test XML files), use "Bookmark Bar", not "Bookmarks Bar" (this seemed to be prevailing usage in the code) * Fix 80-column issues This patch touches move files than any subsequent patches, but should be the most rubber-stampable. Review URL: http://codereview.chromium.org/13633 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/accessibility/accessibility_tests.cc6
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc24
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.h2
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc4
-rw-r--r--chrome/test/startup/feature_startup_test.cc8
-rw-r--r--chrome/test/ui/ui_test.cc2
6 files changed, 23 insertions, 23 deletions
diff --git a/chrome/test/accessibility/accessibility_tests.cc b/chrome/test/accessibility/accessibility_tests.cc
index 42c087a..1eacede 100644
--- a/chrome/test/accessibility/accessibility_tests.cc
+++ b/chrome/test/accessibility/accessibility_tests.cc
@@ -210,7 +210,7 @@ TEST_F(AccessibilityTest, TestStarBtnStatusOnNewTab) {
// Add empty new tab and check status.
int old_tab_count = -1;
ASSERT_TRUE(window->GetTabCount(&old_tab_count));
- ASSERT_TRUE(window->ApplyAccelerator(IDC_NEWTAB));
+ ASSERT_TRUE(window->ApplyAccelerator(IDC_NEW_TAB));
int new_tab_count;
ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count,
5000));
@@ -335,7 +335,7 @@ TEST_F(AccessibilityTest, DISABLED_TestBackBtnStatusOnNewTab) {
// Add empty new tab and check status.
ASSERT_TRUE(window->GetTabCount(&old_tab_count));
- ASSERT_TRUE(window->ApplyAccelerator(IDC_NEWTAB));
+ ASSERT_TRUE(window->ApplyAccelerator(IDC_NEW_TAB));
ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count,
5000));
// Check tab count. Also, check accessibility object's children.
@@ -484,7 +484,7 @@ TEST_F(AccessibilityTest, DISABLED_TestForwardBtnStatusOnNewTab) {
// Add empty new tab and check status.
ASSERT_TRUE(window->GetTabCount(&old_tab_count));
- ASSERT_TRUE(window->ApplyAccelerator(IDC_NEWTAB));
+ ASSERT_TRUE(window->ApplyAccelerator(IDC_NEW_TAB));
ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count,
5000));
// Check tab count.
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index f96a261..3f1f317 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -328,7 +328,7 @@ bool AutomatedUITest::DoAction(const std::string & action) {
} else if (LowerCaseEqualsASCII(action, "selectprevtab")) {
did_complete_action = SelectPreviousTab();
} else if (LowerCaseEqualsASCII(action, "showbookmarks")) {
- did_complete_action = ShowBookmarksBar();
+ did_complete_action = ShowBookmarkBar();
} else if (LowerCaseEqualsASCII(action, "setup")) {
LaunchBrowserAndServer();
did_complete_action = true;
@@ -445,7 +445,7 @@ bool AutomatedUITest::CloseActiveTab() {
// Avoid quitting the application by not closing the last window.
if (tab_count > 1) {
int new_tab_count;
- return_value = browser->RunCommand(IDC_CLOSETAB);
+ return_value = browser->RunCommand(IDC_CLOSE_TAB);
// Wait for the tab to close before we continue.
if (!browser->WaitForTabCountToChange(
tab_count, &new_tab_count, kWaitForActionMaxMsec)) {
@@ -454,7 +454,7 @@ bool AutomatedUITest::CloseActiveTab() {
}
} else if (tab_count == 1 && browser_windows_count > 1) {
int new_window_count;
- return_value = browser->RunCommand(IDC_CLOSETAB);
+ return_value = browser->RunCommand(IDC_CLOSE_TAB);
// Wait for the window to close before we continue.
if (!automation()->WaitForWindowCountToChange(
browser_windows_count, &new_window_count, kWaitForActionMaxMsec)) {
@@ -469,7 +469,7 @@ bool AutomatedUITest::CloseActiveTab() {
}
bool AutomatedUITest::DuplicateTab() {
- return RunCommand(IDC_DUPLICATE);
+ return RunCommand(IDC_DUPLICATE_TAB);
}
bool AutomatedUITest::FindInPage() {
@@ -481,7 +481,7 @@ bool AutomatedUITest::ForwardButton() {
}
bool AutomatedUITest::GoOffTheRecord() {
- return RunCommand(IDC_GOOFFTHERECORD);
+ return RunCommand(IDC_NEW_INCOGNITO_WINDOW);
}
bool AutomatedUITest::Home() {
@@ -489,7 +489,7 @@ bool AutomatedUITest::Home() {
}
bool AutomatedUITest::JavaScriptConsole() {
- return RunCommand(IDC_SHOW_JS_CONSOLE);
+ return RunCommand(IDC_JS_CONSOLE);
}
bool AutomatedUITest::JavaScriptDebugger() {
@@ -541,7 +541,7 @@ bool AutomatedUITest::NewTab() {
&is_timeout);
// Apply accelerator and wait for a new tab to open, if either
// fails, return false. Apply Accelerator takes care of logging its failure.
- bool return_value = RunCommand(IDC_NEWTAB);
+ bool return_value = RunCommand(IDC_NEW_TAB);
if (!browser->WaitForTabCountToChange(
old_tab_count, &new_tab_count, kWaitForActionMaxMsec)) {
AddWarningAttribute("tab_count_failed_to_change");
@@ -567,7 +567,7 @@ bool AutomatedUITest::OpenImportSettingsDialog() {
}
bool AutomatedUITest::OpenTaskManagerDialog() {
- return RunCommand(IDC_TASKMANAGER);
+ return RunCommand(IDC_TASK_MANAGER);
}
bool AutomatedUITest::OpenViewPasswordsDialog() {
@@ -623,11 +623,11 @@ bool AutomatedUITest::SelectNextTab() {
}
bool AutomatedUITest::SelectPreviousTab() {
- return RunCommand(IDC_SELECT_PREV_TAB);
+ return RunCommand(IDC_SELECT_PREVIOUS_TAB);
}
-bool AutomatedUITest::ShowBookmarksBar() {
- return RunCommand(IDC_SHOW_BOOKMARKS_BAR);
+bool AutomatedUITest::ShowBookmarkBar() {
+ return RunCommand(IDC_SHOW_BOOKMARK_BAR);
}
bool AutomatedUITest::ShowDownloads() {
@@ -643,7 +643,7 @@ bool AutomatedUITest::StarPage() {
}
bool AutomatedUITest::ViewSource() {
- return RunCommand(IDC_VIEWSOURCE);
+ return RunCommand(IDC_VIEW_SOURCE);
}
bool AutomatedUITest::ZoomMinus() {
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.h b/chrome/test/automated_ui_tests/automated_ui_tests.h
index 1e2656c..b747d34 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.h
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.h
@@ -286,7 +286,7 @@ class AutomatedUITest : public UITest {
// Displays the bookmark bar.
// Returns true if call to activate the accelerator is successful.
// XML element: <ShowBookmarks/>
- bool ShowBookmarksBar();
+ bool ShowBookmarkBar();
// Opens the Downloads page in the current active browser window.
// XML element: <Downloads/>
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index ece5fd8..4a0cd90 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -476,7 +476,7 @@ TEST_F(AutomationProxyTest, AcceleratorNewTab) {
int old_tab_count = -1;
ASSERT_TRUE(window->GetTabCount(&old_tab_count));
- ASSERT_TRUE(window->ApplyAccelerator(IDC_NEWTAB));
+ ASSERT_TRUE(window->ApplyAccelerator(IDC_NEW_TAB));
int new_tab_count;
ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count,
5000));
@@ -785,7 +785,7 @@ TEST_F(AutomationProxyTest, AutocompleteParallelProxy) {
scoped_ptr<AutocompleteEditProxy> edit1(
automation()->GetAutocompleteEditForBrowser(browser1.get()));
ASSERT_TRUE(edit1.get());
- EXPECT_TRUE(browser1->ApplyAccelerator(IDC_NEWWINDOW));
+ EXPECT_TRUE(browser1->ApplyAccelerator(IDC_NEW_WINDOW));
scoped_ptr<BrowserProxy> browser2(automation()->GetBrowserWindow(1));
ASSERT_TRUE(browser2.get());
scoped_ptr<AutocompleteEditProxy> edit2(
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc
index 59fdfa1..28d16e8 100644
--- a/chrome/test/startup/feature_startup_test.cc
+++ b/chrome/test/startup/feature_startup_test.cc
@@ -69,7 +69,7 @@ class NewTabUIStartupTest : public UITest {
ASSERT_EQ(1, old_tab_count);
// Hit ctl-t and wait for the tab to load.
- window->ApplyAccelerator(IDC_NEWTAB);
+ window->ApplyAccelerator(IDC_NEW_TAB);
int new_tab_count = -1;
ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count,
5000));
@@ -82,9 +82,9 @@ class NewTabUIStartupTest : public UITest {
// Bring up a second tab, now that we've already shown one tab.
old_tab_count = new_tab_count;
new_tab_count = -1;
- window->ApplyAccelerator(IDC_NEWTAB);
- ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count, &new_tab_count,
- 5000));
+ window->ApplyAccelerator(IDC_NEW_TAB);
+ ASSERT_TRUE(window->WaitForTabCountToChange(old_tab_count,
+ &new_tab_count, 5000));
ASSERT_EQ(3, new_tab_count);
ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
timings[i] = TimeDelta::FromMilliseconds(load_time);
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 5b549a0..35f09cf 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -292,7 +292,7 @@ void UITest::QuitBrowser() {
for (BrowserVector::iterator iter = browsers.begin();
iter != browsers.end(); ++iter) {
// Use ApplyAccelerator since it doesn't wait
- (*iter)->ApplyAccelerator(IDC_CLOSEWINDOW);
+ (*iter)->ApplyAccelerator(IDC_CLOSE_WINDOW);
delete (*iter);
}