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 startTest = function() {
6 var iframe = document.querySelector('iframe');
7 var iframeWindow = iframe.contentWindow;
8 iframe.addEventListener('load', function(e) {
9 iframeWindow.document.querySelector('#webview-tag-container').innerHTML =
10 '<webview></webview>';
11 var webview = iframeWindow.document.querySelector('webview');
12 webview.addEventListener('loadstop', function(e) {
13 if (!webview.contentWindow) {
14 chrome.test.sendMessage('FAILURE');
17 chrome.test.sendMessage('LAUNCHED');
19 webview.src = 'data:text/html,<body>Guest</body>';
21 iframe.src = 'webview.html';
24 window.onload = startTest;