Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: chrome/browser/prefs/pref_service_browsertest.cc

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a part of the change which slipped in through a branch switch and eclipse usage Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 18 matching lines...) Expand all
29 #if !defined(TOOLKIT_GTK) 29 #if !defined(TOOLKIT_GTK)
30 30
31 typedef InProcessBrowserTest PreservedWindowPlacement; 31 typedef InProcessBrowserTest PreservedWindowPlacement;
32 32
33 IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, PRE_Test) { 33 IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, PRE_Test) {
34 browser()->window()->SetBounds(gfx::Rect(20, 30, 400, 500)); 34 browser()->window()->SetBounds(gfx::Rect(20, 30, 400, 500));
35 } 35 }
36 36
37 IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, Test) { 37 IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, Test) {
38 gfx::Rect bounds = browser()->window()->GetBounds(); 38 gfx::Rect bounds = browser()->window()->GetBounds();
39
40 gfx::Rect expected_bounds(gfx::Rect(20, 30, 400, 500)); 39 gfx::Rect expected_bounds(gfx::Rect(20, 30, 400, 500));
41 ASSERT_EQ(expected_bounds, bounds); 40 ASSERT_EQ(expected_bounds.ToString(), bounds.ToString());
42 } 41 }
43 42
44 #endif // defined(TOOLKIT_GTK) 43 #endif // defined(TOOLKIT_GTK)
45 44
46 class PreferenceServiceTest : public InProcessBrowserTest { 45 class PreferenceServiceTest : public InProcessBrowserTest {
47 public: 46 public:
48 explicit PreferenceServiceTest(bool new_profile) : new_profile_(new_profile) { 47 explicit PreferenceServiceTest(bool new_profile) : new_profile_(new_profile) {
49 } 48 }
50 49
51 virtual bool SetUpUserDataDirectory() OVERRIDE { 50 virtual bool SetUpUserDataDirectory() OVERRIDE {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 EXPECT_EQ(right, bounds.x() + bounds.width()); 199 EXPECT_EQ(right, bounds.x() + bounds.width());
201 200
202 // Find if launched window is maximized. 201 // Find if launched window is maximized.
203 bool is_window_maximized = browser()->window()->IsMaximized(); 202 bool is_window_maximized = browser()->window()->IsMaximized();
204 bool is_maximized = false; 203 bool is_maximized = false;
205 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized", 204 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized",
206 &is_maximized)); 205 &is_maximized));
207 EXPECT_EQ(is_maximized, is_window_maximized); 206 EXPECT_EQ(is_maximized, is_window_maximized);
208 } 207 }
209 #endif 208 #endif
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698