1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Give 2 seconds to inject JS, if no response hasn't injected
Devlin
2017/02/14 23:17:10
This is inherently flaky - there is no guarantee t
This is inherently flaky - there is no guarantee that js will have injected in 2
seconds.
Instead, we should cause a visible change to the page (e.g. setting a variable
on window, modifying the title, etc), wait for a deterministic point after which
we know the content script would have injected, and then check it.
nrpeter
2017/03/22 23:47:39
This case is already tested under a different test
On 2017/02/14 23:17:10, Devlin wrote:
> This is inherently flaky - there is no guarantee that js will have injected in
2
> seconds.
>
> Instead, we should cause a visible change to the page (e.g. setting a variable
> on window, modifying the title, etc), wait for a deterministic point after
which
> we know the content script would have injected, and then check it.
This case is already tested under a different test, removed it.
6 setTimeout(function() {
7 chrome.test.notifyPass();
8 }, 2000);
Devlin
2017/02/14 23:17:10
<random comment spot because I can't comment in in
<random comment spot because I can't comment in inject.html> looks like
inject.html is empty?
nrpeter
2017/03/22 23:47:39
Yes, I just needed a valid page to browse to so co
Issue 2499493004: Communicate ExtensionSettings policy to renderers
(Closed)
Created 4 years, 1 month ago by nrpeter
Modified 3 years, 8 months ago
Reviewers: dcheng, NickP, Devlin, zmin, pastarmovj, vabr (Chromium)
Base URL:
Comments: 334