| Index: chrome/test/data/extensions/platform_apps/web_view/app_creates_webview/main.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/web_view/app_creates_webview/main.js b/chrome/test/data/extensions/platform_apps/web_view/app_creates_webview/main.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..781cce8362f8d779457f49840f60744598769018
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/platform_apps/web_view/app_creates_webview/main.js
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +var LOG = function(msg) {
|
| + window.console.log(msg);
|
| +};
|
| +
|
| +var failTest = function() {
|
| + chrome.test.sendMessage('WebViewTest.FAILURE');
|
| +};
|
| +
|
| +var startTest = function() {
|
| + chrome.test.sendMessage('WebViewTest.LAUNCHED');
|
| +};
|
| +
|
| +window.onAppCommand = function(command) {
|
| + LOG('onAppCommand: ' + command);
|
| + switch (command) {
|
| + case 'create-guest':
|
| + var webview = document.createElement('webview');
|
| + webview.src = 'data:text/html,<body>Guest</body>';
|
| + document.body.appendChild(webview);
|
| + chrome.test.sendMessage('WebViewTest.PASSED');
|
| + break;
|
| + default:
|
| + failTest();
|
| + break;
|
| + }
|
| +};
|
| +
|
| +window.onload = startTest;
|
|
|