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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 #if !defined(OS_MACOSX) | 106 #if !defined(OS_MACOSX) |
107 class KioskModeTest : public UITest { | 107 class KioskModeTest : public UITest { |
108 public: | 108 public: |
109 KioskModeTest() { | 109 KioskModeTest() { |
110 launch_arguments_.AppendSwitch(switches::kKioskMode); | 110 launch_arguments_.AppendSwitch(switches::kKioskMode); |
111 } | 111 } |
112 }; | 112 }; |
113 | 113 |
114 TEST_F(KioskModeTest, EnableKioskModeTest) { | 114 TEST_F(KioskModeTest, EnableKioskModeTest) { |
115 // Load a local file. | |
116 FilePath test_file(test_data_directory_); | |
117 test_file = test_file.AppendASCII("title1.html"); | |
118 | |
119 // Verify that the window is present. | 115 // Verify that the window is present. |
120 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 116 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
121 ASSERT_TRUE(browser.get()); | 117 ASSERT_TRUE(browser.get()); |
122 | 118 |
123 // Check if browser is in fullscreen mode. | 119 // Check if browser is in fullscreen mode. |
124 bool is_visible; | 120 bool is_visible; |
125 ASSERT_TRUE(browser->IsFullscreen(&is_visible)); | 121 ASSERT_TRUE(browser->IsFullscreen(&is_visible)); |
126 EXPECT_TRUE(is_visible); | 122 EXPECT_TRUE(is_visible); |
127 ASSERT_TRUE(browser->IsFullscreenBubbleVisible(&is_visible)); | 123 ASSERT_TRUE(browser->IsFullscreenBubbleVisible(&is_visible)); |
128 EXPECT_FALSE(is_visible); | 124 EXPECT_FALSE(is_visible); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 227 |
232 // Verify that the window is present. | 228 // Verify that the window is present. |
233 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 229 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
234 ASSERT_TRUE(browser.get()); | 230 ASSERT_TRUE(browser.get()); |
235 | 231 |
236 // Verify the browser is in application mode. | 232 // Verify the browser is in application mode. |
237 bool is_application; | 233 bool is_application; |
238 ASSERT_TRUE(browser->IsApplication(&is_application)); | 234 ASSERT_TRUE(browser->IsApplication(&is_application)); |
239 EXPECT_TRUE(is_application); | 235 EXPECT_TRUE(is_application); |
240 } | 236 } |
OLD | NEW |