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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "chrome/browser/translate/chrome_translate_client.h" | 62 #include "chrome/browser/translate/chrome_translate_client.h" |
63 #include "chrome/browser/translate/cld_data_harness.h" | 63 #include "chrome/browser/translate/cld_data_harness.h" |
64 #include "chrome/browser/translate/cld_data_harness_factory.h" | 64 #include "chrome/browser/translate/cld_data_harness_factory.h" |
65 #include "chrome/browser/translate/translate_service.h" | 65 #include "chrome/browser/translate/translate_service.h" |
66 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 66 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
67 #include "chrome/browser/ui/browser.h" | 67 #include "chrome/browser/ui/browser.h" |
68 #include "chrome/browser/ui/browser_commands.h" | 68 #include "chrome/browser/ui/browser_commands.h" |
69 #include "chrome/browser/ui/browser_list.h" | 69 #include "chrome/browser/ui/browser_list.h" |
70 #include "chrome/browser/ui/browser_tabstrip.h" | 70 #include "chrome/browser/ui/browser_tabstrip.h" |
71 #include "chrome/browser/ui/browser_window.h" | 71 #include "chrome/browser/ui/browser_window.h" |
72 #include "chrome/browser/ui/extensions/app_launch_params.h" | |
73 #include "chrome/browser/ui/extensions/application_launch.h" | |
74 #include "chrome/browser/ui/host_desktop.h" | 72 #include "chrome/browser/ui/host_desktop.h" |
75 #include "chrome/browser/ui/location_bar/location_bar.h" | 73 #include "chrome/browser/ui/location_bar/location_bar.h" |
76 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 74 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
77 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 75 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
78 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 76 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
79 #include "chrome/common/chrome_paths.h" | 77 #include "chrome/common/chrome_paths.h" |
80 #include "chrome/common/chrome_switches.h" | 78 #include "chrome/common/chrome_switches.h" |
81 #include "chrome/common/extensions/extension_constants.h" | 79 #include "chrome/common/extensions/extension_constants.h" |
82 #include "chrome/common/extensions/features/feature_channel.h" | 80 #include "chrome/common/extensions/features/feature_channel.h" |
83 #include "chrome/common/pref_names.h" | 81 #include "chrome/common/pref_names.h" |
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2430 NULL); | 2428 NULL); |
2431 UpdateProviderPolicy(policies); | 2429 UpdateProviderPolicy(policies); |
2432 | 2430 |
2433 const extensions::Extension* extension = | 2431 const extensions::Extension* extension = |
2434 LoadUnpackedExtension(kUnpackedFullscreenAppName, true); | 2432 LoadUnpackedExtension(kUnpackedFullscreenAppName, true); |
2435 ASSERT_TRUE(extension); | 2433 ASSERT_TRUE(extension); |
2436 | 2434 |
2437 // Launch an app that tries to open a fullscreen window. | 2435 // Launch an app that tries to open a fullscreen window. |
2438 TestAddAppWindowObserver add_window_observer( | 2436 TestAddAppWindowObserver add_window_observer( |
2439 extensions::AppWindowRegistry::Get(browser()->profile())); | 2437 extensions::AppWindowRegistry::Get(browser()->profile())); |
2440 OpenApplication(AppLaunchParams(browser()->profile(), extension, | 2438 OpenApplication(AppLaunchParams(browser()->profile(), |
2441 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, | 2439 extension, |
2442 extensions::SOURCE_UNTRACKED)); | 2440 extensions::LAUNCH_CONTAINER_NONE, |
| 2441 NEW_WINDOW)); |
2443 extensions::AppWindow* window = add_window_observer.WaitForAppWindow(); | 2442 extensions::AppWindow* window = add_window_observer.WaitForAppWindow(); |
2444 ASSERT_TRUE(window); | 2443 ASSERT_TRUE(window); |
2445 | 2444 |
2446 // Verify that the window is not in fullscreen mode. | 2445 // Verify that the window is not in fullscreen mode. |
2447 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); | 2446 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); |
2448 | 2447 |
2449 // Verify that the window cannot be toggled into fullscreen mode via apps | 2448 // Verify that the window cannot be toggled into fullscreen mode via apps |
2450 // APIs. | 2449 // APIs. |
2451 EXPECT_TRUE(content::ExecuteScript( | 2450 EXPECT_TRUE(content::ExecuteScript( |
2452 window->web_contents(), | 2451 window->web_contents(), |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3428 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3427 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3429 browser2->tab_strip_model()->GetActiveWebContents(), | 3428 browser2->tab_strip_model()->GetActiveWebContents(), |
3430 "domAutomationController.send(window.showModalDialog !== undefined);", | 3429 "domAutomationController.send(window.showModalDialog !== undefined);", |
3431 &result)); | 3430 &result)); |
3432 EXPECT_TRUE(result); | 3431 EXPECT_TRUE(result); |
3433 } | 3432 } |
3434 | 3433 |
3435 #endif // !defined(CHROME_OS) | 3434 #endif // !defined(CHROME_OS) |
3436 | 3435 |
3437 } // namespace policy | 3436 } // namespace policy |
OLD | NEW |