1 // Copyright 2014 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 var LOG = function(msg) {
6 window.console.log(msg);
9 var failTest = function() {
10 chrome.test.sendMessage('WebViewTest.FAILURE');
13 var startTest = function() {
14 document.querySelector('#webview-tag-container').innerHTML =
15 '<webview style="width: 10px; height: 10px; margin: 0; padding: 0;"' +
18 var webview = document.querySelector('webview');
19 var onLoadStop = function(e) {
20 chrome.test.sendMessage('LAUNCHED');
23 webview.addEventListener('loadstop', onLoadStop);
24 webview.src = 'data:text/html,<body>Guest</body>';
27 window.onAppCommand = function(command) {
28 LOG('onAppCommand: ' + command);
31 document.querySelector('webview').style.display = 'none';
34 document.body.style.display = 'none';
42 window.onload = startTest;