OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |