OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/test/test_file_util.h" | 10 #include "base/test/test_file_util.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "chrome/common/chrome_constants.h" | 13 #include "chrome/common/chrome_constants.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/common/json_value_serializer.h" | 15 #include "chrome/common/json_value_serializer.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "chrome/test/automation/browser_proxy.h" | 17 #include "chrome/test/automation/browser_proxy.h" |
18 #include "chrome/test/automation/window_proxy.h" | 18 #include "chrome/test/automation/window_proxy.h" |
19 #include "chrome/test/ui/ui_test.h" | 19 #include "chrome/test/ui/ui_test.h" |
20 #include "gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
21 | 21 |
22 class PreferenceServiceTest : public UITest { | 22 class PreferenceServiceTest : public UITest { |
23 public: | 23 public: |
24 void SetUp() { | 24 void SetUp() { |
25 PathService::Get(base::DIR_TEMP, &tmp_profile_); | 25 PathService::Get(base::DIR_TEMP, &tmp_profile_); |
26 tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); | 26 tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); |
27 | 27 |
28 // Create a fresh, empty copy of this directory. | 28 // Create a fresh, empty copy of this directory. |
29 file_util::Delete(tmp_profile_, true); | 29 file_util::Delete(tmp_profile_, true); |
30 file_util::CreateDirectory(tmp_profile_); | 30 file_util::CreateDirectory(tmp_profile_); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Find if launched window is maximized. | 199 // Find if launched window is maximized. |
200 bool is_window_maximized = false; | 200 bool is_window_maximized = false; |
201 ASSERT_TRUE(window->IsMaximized(&is_window_maximized)); | 201 ASSERT_TRUE(window->IsMaximized(&is_window_maximized)); |
202 bool is_maximized = false; | 202 bool is_maximized = false; |
203 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized", | 203 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized", |
204 &is_maximized)); | 204 &is_maximized)); |
205 EXPECT_EQ(is_maximized, is_window_maximized); | 205 EXPECT_EQ(is_maximized, is_window_maximized); |
206 } | 206 } |
207 #endif | 207 #endif |
208 | 208 |
OLD | NEW |