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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2543 extensions::AppWindowRegistry::Get(browser()->profile())); | 2543 extensions::AppWindowRegistry::Get(browser()->profile())); |
2544 OpenApplication(AppLaunchParams( | 2544 OpenApplication(AppLaunchParams( |
2545 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_NONE, | 2545 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_NONE, |
2546 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_TEST)); | 2546 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_TEST)); |
2547 extensions::AppWindow* window = add_window_observer.WaitForAppWindow(); | 2547 extensions::AppWindow* window = add_window_observer.WaitForAppWindow(); |
2548 ASSERT_TRUE(window); | 2548 ASSERT_TRUE(window); |
2549 | 2549 |
2550 // Verify that the window is not in fullscreen mode. | 2550 // Verify that the window is not in fullscreen mode. |
2551 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); | 2551 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); |
2552 | 2552 |
| 2553 // For PlzNavigate case, we have to wait for the navigation to commit since |
| 2554 // the JS object registration is delayed (see |
| 2555 // AppWindowCreateFunction::RunAsync). |
| 2556 content::WaitForLoadStop(window->web_contents()); |
| 2557 |
2553 // Verify that the window cannot be toggled into fullscreen mode via apps | 2558 // Verify that the window cannot be toggled into fullscreen mode via apps |
2554 // APIs. | 2559 // APIs. |
2555 EXPECT_TRUE(content::ExecuteScript( | 2560 EXPECT_TRUE(content::ExecuteScript( |
2556 window->web_contents(), | 2561 window->web_contents(), |
2557 "chrome.app.window.current().fullscreen();")); | 2562 "chrome.app.window.current().fullscreen();")); |
2558 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); | 2563 EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); |
2559 | 2564 |
2560 // Verify that the window cannot be toggled into fullscreen mode from within | 2565 // Verify that the window cannot be toggled into fullscreen mode from within |
2561 // Chrome (e.g., using keyboard accelerators). | 2566 // Chrome (e.g., using keyboard accelerators). |
2562 window->Fullscreen(); | 2567 window->Fullscreen(); |
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4369 | 4374 |
4370 SetEmptyPolicy(); | 4375 SetEmptyPolicy(); |
4371 // Policy not set. | 4376 // Policy not set. |
4372 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4377 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
4373 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4378 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
4374 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4379 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
4375 } | 4380 } |
4376 #endif // defined(OS_CHROMEOS) | 4381 #endif // defined(OS_CHROMEOS) |
4377 | 4382 |
4378 } // namespace policy | 4383 } // namespace policy |
OLD | NEW |