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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 FilePath(), FilePath().AppendASCII("fileurl_universalaccess.html")); | 1452 FilePath(), FilePath().AppendASCII("fileurl_universalaccess.html")); |
1453 | 1453 |
1454 string16 expected_title(ASCIIToUTF16("Disallowed")); | 1454 string16 expected_title(ASCIIToUTF16("Disallowed")); |
1455 ui_test_utils::TitleWatcher title_watcher( | 1455 ui_test_utils::TitleWatcher title_watcher( |
1456 browser()->GetActiveWebContents(), expected_title); | 1456 browser()->GetActiveWebContents(), expected_title); |
1457 title_watcher.AlsoWaitForTitle(ASCIIToUTF16("Allowed")); | 1457 title_watcher.AlsoWaitForTitle(ASCIIToUTF16("Allowed")); |
1458 ui_test_utils::NavigateToURL(browser(), url); | 1458 ui_test_utils::NavigateToURL(browser(), url); |
1459 ASSERT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 1459 ASSERT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
1460 } | 1460 } |
1461 | 1461 |
1462 #if !defined(OS_MACOSX) | |
1463 class KioskModeTest : public BrowserTest { | 1462 class KioskModeTest : public BrowserTest { |
1464 public: | 1463 public: |
1465 KioskModeTest() {} | 1464 KioskModeTest() {} |
1466 | 1465 |
1467 virtual void SetUpCommandLine(CommandLine* command_line) { | 1466 virtual void SetUpCommandLine(CommandLine* command_line) { |
1468 command_line->AppendSwitch(switches::kKioskMode); | 1467 command_line->AppendSwitch(switches::kKioskMode); |
1469 } | 1468 } |
1470 }; | 1469 }; |
1471 | 1470 |
1472 IN_PROC_BROWSER_TEST_F(KioskModeTest, EnableKioskModeTest) { | 1471 IN_PROC_BROWSER_TEST_F(KioskModeTest, EnableKioskModeTest) { |
1473 // Check if browser is in fullscreen mode. | 1472 // Check if browser is in fullscreen mode. |
1474 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 1473 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
1475 ASSERT_FALSE(browser()->window()->IsFullscreenBubbleVisible()); | 1474 ASSERT_FALSE(browser()->window()->IsFullscreenBubbleVisible()); |
1476 } | 1475 } |
1477 #endif // !defined(OS_MACOSX) | |
1478 | 1476 |
1479 #if defined(OS_WIN) | 1477 #if defined(OS_WIN) |
1480 // This test verifies that Chrome can be launched with a user-data-dir path | 1478 // This test verifies that Chrome can be launched with a user-data-dir path |
1481 // which contains non ASCII characters. | 1479 // which contains non ASCII characters. |
1482 class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest { | 1480 class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest { |
1483 public: | 1481 public: |
1484 LaunchBrowserWithNonAsciiUserDatadir() {} | 1482 LaunchBrowserWithNonAsciiUserDatadir() {} |
1485 | 1483 |
1486 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 1484 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
1487 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 1485 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 command_line->AppendSwitchASCII(switches::kApp, url.spec()); | 1566 command_line->AppendSwitchASCII(switches::kApp, url.spec()); |
1569 } | 1567 } |
1570 }; | 1568 }; |
1571 | 1569 |
1572 IN_PROC_BROWSER_TEST_F(AppModeTest, EnableAppModeTest) { | 1570 IN_PROC_BROWSER_TEST_F(AppModeTest, EnableAppModeTest) { |
1573 // Test that an application browser window loads correctly. | 1571 // Test that an application browser window loads correctly. |
1574 | 1572 |
1575 // Verify the browser is in application mode. | 1573 // Verify the browser is in application mode. |
1576 EXPECT_TRUE(browser()->IsApplication()); | 1574 EXPECT_TRUE(browser()->IsApplication()); |
1577 } | 1575 } |
OLD | NEW |