fix: ensure document.visibilityState aligns with the visibility of the TopLevelWindow (#19988)

* fix: ensure document.visibilityState aligns with the visibility of the
TopLevelWindow

* chore: disable the specs on linux on CI
This commit is contained in:
Samuel Attard 2019-09-05 10:56:06 -07:00 committed by GitHub
parent cd096289e9
commit 137622931b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 269 additions and 4 deletions

View file

@ -366,6 +366,9 @@ WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options)
// Whether to enable DevTools.
options.Get("devTools", &enable_devtools_);
bool initially_shown = true;
options.Get(options::kShow, &initially_shown);
// Obtain the session.
std::string partition;
mate::Handle<api::Session> session;
@ -420,6 +423,7 @@ WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options)
#endif
} else {
content::WebContents::CreateParams params(session->browser_context());
params.initially_hidden = !initially_shown;
web_contents = content::WebContents::Create(params);
}