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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 base::Value::CreateBooleanValue(false), NULL); | 2047 base::Value::CreateBooleanValue(false), NULL); |
2048 UpdateProviderPolicy(policies); | 2048 UpdateProviderPolicy(policies); |
2049 | 2049 |
2050 const extensions::Extension* extension = | 2050 const extensions::Extension* extension = |
2051 LoadUnpackedExtension(kUnpackedFullscreenAppName, true); | 2051 LoadUnpackedExtension(kUnpackedFullscreenAppName, true); |
2052 ASSERT_TRUE(extension); | 2052 ASSERT_TRUE(extension); |
2053 | 2053 |
2054 // Launch an app that tries to open a fullscreen window. | 2054 // Launch an app that tries to open a fullscreen window. |
2055 TestAddShellWindowObserver add_window_observer( | 2055 TestAddShellWindowObserver add_window_observer( |
2056 apps::ShellWindowRegistry::Get(browser()->profile())); | 2056 apps::ShellWindowRegistry::Get(browser()->profile())); |
2057 OpenApplication(AppLaunchParams(browser()->profile(), extension, | 2057 OpenApplication(AppLaunchParams(browser()->profile(), |
2058 extensions::LAUNCH_NONE, NEW_WINDOW)); | 2058 extension, |
| 2059 extensions::LAUNCH_CONTAINER_NONE, |
| 2060 NEW_WINDOW)); |
2059 apps::ShellWindow* window = add_window_observer.WaitForShellWindow(); | 2061 apps::ShellWindow* window = add_window_observer.WaitForShellWindow(); |
2060 ASSERT_TRUE(window); | 2062 ASSERT_TRUE(window); |
2061 | 2063 |
2062 // Verify that the window is not in fullscreen mode. | 2064 // Verify that the window is not in fullscreen mode. |
2063 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); | 2065 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); |
2064 | 2066 |
2065 // Verify that the window cannot be toggled into fullscreen mode via apps | 2067 // Verify that the window cannot be toggled into fullscreen mode via apps |
2066 // APIs. | 2068 // APIs. |
2067 EXPECT_TRUE(content::ExecuteScript( | 2069 EXPECT_TRUE(content::ExecuteScript( |
2068 window->web_contents(), | 2070 window->web_contents(), |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2863 chrome_variations::VariationsService::GetVariationsServerURL( | 2865 chrome_variations::VariationsService::GetVariationsServerURL( |
2864 g_browser_process->local_state()); | 2866 g_browser_process->local_state()); |
2865 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); | 2867 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); |
2866 std::string value; | 2868 std::string value; |
2867 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); | 2869 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); |
2868 EXPECT_EQ("restricted", value); | 2870 EXPECT_EQ("restricted", value); |
2869 } | 2871 } |
2870 #endif | 2872 #endif |
2871 | 2873 |
2872 } // namespace policy | 2874 } // namespace policy |
OLD | NEW |