Fix content shell drt crash when calling app banner test function.
The test function testRunner.resolveBeforeInstallPromptPromise function
should only be called after the
testRunner.dispatchBeforeInstallPromptEvent function has initialized
some test interfaces. However if it does happen to be called first (for
example by ClusterFuzz) it should not crash.
BUG=510190, 509863, 509107, 508455, 508285, 507616, 496890
Review URL: https://codereview.chromium.org/
1239913002
Cr-Commit-Position: refs/heads/master@{#339139}