DescriptionFix two Chrome Apps browser tests with PlzNavigate.
PolicyTest.FullscreenAllowedApp: after r349290, the ScriptContext is delayed until navigation commits. So the test has to wait for navigation first before executing the JS in the app, or else it fails because the chrome app bindings aren't registered yet.
AppWindowAPITest.TestCreate: the badWindow part of this test isn't compatible with PlzNavigate. Or more specifically, the condition isn't possible with it. Without PlzNavigate, creating an app window with an invalid URL would first create that frame with the provisional load URL of the chrome app. So the chrome apps ScriptContext would be setup correctly and view.chrome.app.window.initializeAppWindow would be called with an undefined window. However with PlzNavigate, the frame isn't created until after the navigation commits. At that point, we know that it failed and the URL of the frame becomes the error page url, and as such the chrome apps ScriptContext isn't used since the (error page) url isn't an extension. This can't even be fixed by adding a null check in app_window_custom_bindings.js because the security origin of the background page and the error page is different so Blink disallows the scripting call.
BUG=504347
Committed: https://crrev.com/2637dd1897b41b795196119e96606501a6c983a5
Cr-Commit-Position: refs/heads/master@{#420631}
Patch Set 1 #
Messages
Total messages: 13 (8 generated)
|