Index: chrome/browser/policy/policy_browsertest.cc |
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc |
index 3f48807728804af2afebf533bd3f35a21f64a875..ad31d28324cd8bbfc5563bd07d91efc5568ca936 100644 |
--- a/chrome/browser/policy/policy_browsertest.cc |
+++ b/chrome/browser/policy/policy_browsertest.cc |
@@ -2550,6 +2550,11 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedApp) { |
// Verify that the window is not in fullscreen mode. |
EXPECT_FALSE(window->GetBaseWindow()->IsFullscreen()); |
+ // For PlzNavigate case, we have to wait for the navigation to commit since |
+ // the JS object registration is delayed (see |
+ // AppWindowCreateFunction::RunAsync). |
+ content::WaitForLoadStop(window->web_contents()); |
+ |
// Verify that the window cannot be toggled into fullscreen mode via apps |
// APIs. |
EXPECT_TRUE(content::ExecuteScript( |