1 // Copyright 2015 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.
5 function testDisplayNone() {
6 var webview = document.createElement('webview');
7 webview.onloadstop = function() {
8 document.body.style.display = 'none';
9 // Give it some time (100ms) before making document.body visible again.
10 window.setTimeout(function() {
11 document.body.style.display = '';
12 webview.onloadstop = function() {
13 chrome.send('testResult', [true]);
18 webview.onloadabort = function() {
19 chrome.send('testResult', [false]);
21 webview.src = 'about:blank';
22 document.body.appendChild(webview);