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

Side by Side Diff: chrome/browser/browser_uitest.cc

Issue 244003: Kiosk Mode implementation (Closed)
Patch Set: Finally fix MACOSX Created 11 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
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/browser_window.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/gfx/native_widget_types.h" 5 #include "app/gfx/native_widget_types.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 test_file = test_file.AppendASCII("fileurl_universalaccess.html"); 281 test_file = test_file.AppendASCII("fileurl_universalaccess.html");
282 282
283 GURL url = net::FilePathToFileURL(test_file); 283 GURL url = net::FilePathToFileURL(test_file);
284 ASSERT_TRUE(tab->NavigateToURL(url)); 284 ASSERT_TRUE(tab->NavigateToURL(url));
285 285
286 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, 286 std::string value = WaitUntilCookieNonEmpty(tab.get(), url,
287 "status", kTestIntervalMs, kTestWaitTimeoutMs); 287 "status", kTestIntervalMs, kTestWaitTimeoutMs);
288 ASSERT_STREQ("Disallowed", value.c_str()); 288 ASSERT_STREQ("Disallowed", value.c_str());
289 } 289 }
290 290
291 #if !defined(OS_MACOSX)
292 class KioskModeTest : public UITest {
293 public:
294 KioskModeTest() {
295 launch_arguments_.AppendSwitch(switches::kKioskMode);
296 }
297 };
298
299 TEST_F(KioskModeTest, EnableKioskModeTest) {
300 // Load a dummy url.
301 FilePath test_file(test_data_directory_);
302 test_file = test_file.AppendASCII("title1.html");
303
304 // Verify that the window is present.
305 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
306 ASSERT_TRUE(browser.get());
307
308 // Check if browser is in fullscreen mode.
309 bool is_visible;
310 ASSERT_TRUE(browser->IsFullscreen(&is_visible));
311 EXPECT_TRUE(is_visible);
312 ASSERT_TRUE(browser->IsFullscreenBubbleVisible(&is_visible));
313 EXPECT_FALSE(is_visible);
314 }
315 #endif
316
291 } // namespace 317 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698