Skip to content

Commit

Permalink
Fix tests that break with Chromium build.
Browse files Browse the repository at this point in the history
BUG=1296800


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1505 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rahulk@google.com committed Aug 28, 2008
1 parent 6457ac4 commit 7ea9cbb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions chrome/test/accessibility/accessibility_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ TEST_F(AccessibilityTest, TestChromeToolbarAccObject) {
ASSERT_TRUE(NULL != p_accobj);

// Check Name - "Google Chrome Toolbar".
#if defined(GOOGLE_CHROME_BUILD)
EXPECT_EQ(L"Google Chrome Toolbar", GetName(p_accobj));
#else
EXPECT_EQ(L"Chromium Toolbar", GetName(p_accobj));
#endif
// Check Role - "tool bar".
EXPECT_EQ(L"tool bar", GetRole(p_accobj));
// Check State - "focusable"
Expand Down
8 changes: 7 additions & 1 deletion chrome/test/accessibility/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@
// Chrome Client chidren.
#define BROWSER_VIEW_ACC_INDEX (0)
#define TABSTRIP_ACC_INDEX (1)
#if defined(GOOGLE_CHROME_BUILD)
#define CHROME_MIN_ACC_INDEX (4)
#define CHROME_MAX_ACC_INDEX (5)
#define CHROME_RESTORE_ACC_INDEX (6)
#define CHROME_CLOSE_ACC_INDEX (7)

#else
#define CHROME_MIN_ACC_INDEX (3)
#define CHROME_MAX_ACC_INDEX (4)
#define CHROME_RESTORE_ACC_INDEX (5)
#define CHROME_CLOSE_ACC_INDEX (6)
#endif
// Browser View children.
#define TOOLBAR_ACC_INDEX (0)

Expand Down
11 changes: 9 additions & 2 deletions chrome/test/automation/automation_proxy_uitest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -652,13 +652,20 @@ TEST_F(AutomationProxyTest, ConstrainedWindowTest) {

std::wstring title;
ASSERT_TRUE(cwindow->GetTitle(&title));
ASSERT_STREQ(L"Constrained Window 0 - Google Chrome", title.c_str());
#if defined(GOOGLE_CHROME_BUILD)
std::wstring app_name = L"Google Chrome";
#else
std::wstring app_name = L"Chromium";
#endif
std::wstring window_title = L"Constrained Window 0 - " + app_name;
ASSERT_STREQ(window_title.c_str(), title.c_str());
delete cwindow;

cwindow = tab->GetConstrainedWindow(1);
ASSERT_TRUE(cwindow);
ASSERT_TRUE(cwindow->GetTitle(&title));
ASSERT_STREQ(L"Constrained Window 1 - Google Chrome", title.c_str());
window_title = L"Constrained Window 1 - " + app_name;
ASSERT_STREQ(window_title.c_str(), title.c_str());
delete cwindow;
}

Expand Down

0 comments on commit 7ea9cbb

Please sign in to comment.