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

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

Issue 757433004: Add SOURCE_TEST. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed remaining instances of SOURCE_BROWSER_TEST. Created 6 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
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 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 2432
2433 const extensions::Extension* extension = 2433 const extensions::Extension* extension =
2434 LoadUnpackedExtension(kUnpackedFullscreenAppName, true); 2434 LoadUnpackedExtension(kUnpackedFullscreenAppName, true);
2435 ASSERT_TRUE(extension); 2435 ASSERT_TRUE(extension);
2436 2436
2437 // Launch an app that tries to open a fullscreen window. 2437 // Launch an app that tries to open a fullscreen window.
2438 TestAddAppWindowObserver add_window_observer( 2438 TestAddAppWindowObserver add_window_observer(
2439 extensions::AppWindowRegistry::Get(browser()->profile())); 2439 extensions::AppWindowRegistry::Get(browser()->profile()));
2440 OpenApplication(AppLaunchParams(browser()->profile(), extension, 2440 OpenApplication(AppLaunchParams(browser()->profile(), extension,
2441 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, 2441 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW,
2442 extensions::SOURCE_UNTRACKED)); 2442 extensions::SOURCE_TEST));
2443 extensions::AppWindow* window = add_window_observer.WaitForAppWindow(); 2443 extensions::AppWindow* window = add_window_observer.WaitForAppWindow();
2444 ASSERT_TRUE(window); 2444 ASSERT_TRUE(window);
2445 2445
2446 // Verify that the window is not in fullscreen mode. 2446 // Verify that the window is not in fullscreen mode.
2447 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); 2447 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen());
2448 2448
2449 // Verify that the window cannot be toggled into fullscreen mode via apps 2449 // Verify that the window cannot be toggled into fullscreen mode via apps
2450 // APIs. 2450 // APIs.
2451 EXPECT_TRUE(content::ExecuteScript( 2451 EXPECT_TRUE(content::ExecuteScript(
2452 window->web_contents(), 2452 window->web_contents(),
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 3428 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
3429 browser2->tab_strip_model()->GetActiveWebContents(), 3429 browser2->tab_strip_model()->GetActiveWebContents(),
3430 "domAutomationController.send(window.showModalDialog !== undefined);", 3430 "domAutomationController.send(window.showModalDialog !== undefined);",
3431 &result)); 3431 &result));
3432 EXPECT_TRUE(result); 3432 EXPECT_TRUE(result);
3433 } 3433 }
3434 3434
3435 #endif // !defined(CHROME_OS) 3435 #endif // !defined(CHROME_OS)
3436 3436
3437 } // namespace policy 3437 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698