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

Issue 2366843002: Fix two Chrome Apps browser tests with PlzNavigate. (Closed)

Created:
4 years, 3 months ago by jam
Modified:
4 years, 3 months ago
CC:
asvitkine+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, David Black, dhollowa+watch_chromium.org, donnd+watch_chromium.org, dougw+watch_chromium.org, extensions-reviews_chromium.org, Jered, jfweitz+watch_chromium.org, kmadhusu+watch_chromium.org, melevin+watch_chromium.org, samarth+watch_chromium.org, skanuj+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -8 lines) Patch
M chrome/browser/policy/policy_browsertest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/window_api/test.js View 1 chunk +0 lines, -8 lines 0 comments Download

Messages

Total messages: 13 (8 generated)
jam
(Devlin is OOO so you get the patch)
4 years, 3 months ago (2016-09-23 02:24:02 UTC) #5
Ken Rockot(use gerrit already)
lgtm
4 years, 3 months ago (2016-09-23 16:32:07 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2366843002/20001
4 years, 3 months ago (2016-09-23 16:33:54 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 3 months ago (2016-09-23 16:39:39 UTC) #11
commit-bot: I haz the power
4 years, 3 months ago (2016-09-23 16:42:46 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/2637dd1897b41b795196119e96606501a6c983a5
Cr-Commit-Position: refs/heads/master@{#420631}

Powered by Google App Engine
This is Rietveld 408576698