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

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

Issue 11343028: Revert 164652 - speculative revert - this change may have caused print dialog test failures on XP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
39 gfx::Rect expected_bounds(gfx::Rect(20, 30, 400, 500)); 40 gfx::Rect expected_bounds(gfx::Rect(20, 30, 400, 500));
40 ASSERT_EQ(expected_bounds.ToString(), bounds.ToString()); 41 ASSERT_EQ(expected_bounds, bounds);
41 } 42 }
42 43
43 #endif // defined(TOOLKIT_GTK) 44 #endif // defined(TOOLKIT_GTK)
44 45
45 class PreferenceServiceTest : public InProcessBrowserTest { 46 class PreferenceServiceTest : public InProcessBrowserTest {
46 public: 47 public:
47 explicit PreferenceServiceTest(bool new_profile) : new_profile_(new_profile) { 48 explicit PreferenceServiceTest(bool new_profile) : new_profile_(new_profile) {
48 } 49 }
49 50
50 virtual bool SetUpUserDataDirectory() OVERRIDE { 51 virtual bool SetUpUserDataDirectory() OVERRIDE {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 EXPECT_EQ(right, bounds.x() + bounds.width()); 200 EXPECT_EQ(right, bounds.x() + bounds.width());
200 201
201 // Find if launched window is maximized. 202 // Find if launched window is maximized.
202 bool is_window_maximized = browser()->window()->IsMaximized(); 203 bool is_window_maximized = browser()->window()->IsMaximized();
203 bool is_maximized = false; 204 bool is_maximized = false;
204 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized", 205 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized",
205 &is_maximized)); 206 &is_maximized));
206 EXPECT_EQ(is_maximized, is_window_maximized); 207 EXPECT_EQ(is_maximized, is_window_maximized);
207 } 208 }
208 #endif 209 #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