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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 106713002: Move LaunchContainer enum to extension_constants.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
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 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 base::Value::CreateBooleanValue(false), NULL); 2045 base::Value::CreateBooleanValue(false), NULL);
2046 UpdateProviderPolicy(policies); 2046 UpdateProviderPolicy(policies);
2047 2047
2048 const extensions::Extension* extension = 2048 const extensions::Extension* extension =
2049 LoadUnpackedExtension(kUnpackedFullscreenAppName, true); 2049 LoadUnpackedExtension(kUnpackedFullscreenAppName, true);
2050 ASSERT_TRUE(extension); 2050 ASSERT_TRUE(extension);
2051 2051
2052 // Launch an app that tries to open a fullscreen window. 2052 // Launch an app that tries to open a fullscreen window.
2053 TestAddShellWindowObserver add_window_observer( 2053 TestAddShellWindowObserver add_window_observer(
2054 apps::ShellWindowRegistry::Get(browser()->profile())); 2054 apps::ShellWindowRegistry::Get(browser()->profile()));
2055 OpenApplication(AppLaunchParams(browser()->profile(), extension, 2055 OpenApplication(AppLaunchParams(browser()->profile(),
2056 extensions::LAUNCH_NONE, NEW_WINDOW)); 2056 extension,
2057 extensions::LAUNCH_CONTAINER_NONE,
2058 NEW_WINDOW));
2057 apps::ShellWindow* window = add_window_observer.WaitForShellWindow(); 2059 apps::ShellWindow* window = add_window_observer.WaitForShellWindow();
2058 ASSERT_TRUE(window); 2060 ASSERT_TRUE(window);
2059 2061
2060 // Verify that the window is not in fullscreen mode. 2062 // Verify that the window is not in fullscreen mode.
2061 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); 2063 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen());
2062 2064
2063 // Verify that the window cannot be toggled into fullscreen mode via apps 2065 // Verify that the window cannot be toggled into fullscreen mode via apps
2064 // APIs. 2066 // APIs.
2065 EXPECT_TRUE(content::ExecuteScript( 2067 EXPECT_TRUE(content::ExecuteScript(
2066 window->web_contents(), 2068 window->web_contents(),
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 chrome_variations::VariationsService::GetVariationsServerURL( 2863 chrome_variations::VariationsService::GetVariationsServerURL(
2862 g_browser_process->local_state()); 2864 g_browser_process->local_state());
2863 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); 2865 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true));
2864 std::string value; 2866 std::string value;
2865 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); 2867 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value));
2866 EXPECT_EQ("restricted", value); 2868 EXPECT_EQ("restricted", value);
2867 } 2869 }
2868 #endif 2870 #endif
2869 2871
2870 } // namespace policy 2872 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698