summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 19:57:24 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 19:57:24 +0000
commit8dd404bbb05b99e7ee13b4e70899ebbcaeb3e8fb (patch)
tree0e4b5ba4be534f7e769db542d0882d6983fcb59a /chrome/common
parent24f4035eb84f25a51bf7ed6696671c99bf89bb25 (diff)
downloadchromium_src-8dd404bbb05b99e7ee13b4e70899ebbcaeb3e8fb.zip
chromium_src-8dd404bbb05b99e7ee13b4e70899ebbcaeb3e8fb.tar.gz
chromium_src-8dd404bbb05b99e7ee13b4e70899ebbcaeb3e8fb.tar.bz2
Automated ui test porting + cleanup:
- Change POINTs to gfx::Point - Get rid of 2 unused automation messages (the messages themselves are staying for now so we don't mess with the reference build) -- add new automation messages to replace GetWindowHWND, which is not portable - re-enable automated_ui_test_interactive_test (it seems to have been dropped when we converted to gyp) - compile additional tests on linux (they don't pass, so they are disabled) - stub out linux tab dragging automation implementation (browser side) - delete various cruft BUG=19758 Review URL: http://codereview.chromium.org/211033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/pref_service_uitest.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/common/pref_service_uitest.cc b/chrome/common/pref_service_uitest.cc
index 9bb027a..00f05a0 100644
--- a/chrome/common/pref_service_uitest.cc
+++ b/chrome/common/pref_service_uitest.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/gfx/rect.h"
#include "base/test_file_util.h"
#include "base/values.h"
#include "build/build_config.h"
@@ -96,37 +97,34 @@ TEST_F(PreferenceServiceTest, PreservedWindowPlacementIsLoaded) {
ASSERT_TRUE(browser.get());
scoped_refptr<WindowProxy> window(browser->GetWindow());
- HWND hWnd;
- ASSERT_TRUE(window->GetHWND(&hWnd));
-
- WINDOWPLACEMENT window_placement;
- ASSERT_TRUE(GetWindowPlacement(hWnd, &window_placement));
+ gfx::Rect bounds;
+ ASSERT_TRUE(window->GetBounds(&bounds));
// Retrieve the expected rect values from "Preferences"
int bottom = 0;
std::wstring kBrowserWindowPlacement(prefs::kBrowserWindowPlacement);
EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + L".bottom",
&bottom));
- EXPECT_EQ(bottom, window_placement.rcNormalPosition.bottom);
+ EXPECT_EQ(bottom, bounds.y() + bounds.height());
int top = 0;
EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + L".top",
&top));
- EXPECT_EQ(top, window_placement.rcNormalPosition.top);
+ EXPECT_EQ(top, bounds.y());
int left = 0;
EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + L".left",
&left));
- EXPECT_EQ(left, window_placement.rcNormalPosition.left);
+ EXPECT_EQ(left, bounds.x());
int right = 0;
EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + L".right",
&right));
- EXPECT_EQ(right, window_placement.rcNormalPosition.right);
-
- // Find if launched window is maximized
- bool is_window_maximized = (window_placement.showCmd == SW_MAXIMIZE);
+ EXPECT_EQ(right, bounds.x() + bounds.width());
+ // Find if launched window is maximized.
+ bool is_window_maximized = false;
+ ASSERT_TRUE(window->IsMaximized(&is_window_maximized));
bool is_maximized = false;
EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + L".maximized",
&is_maximized));