Index: chrome/test/data/extensions/platform_apps/web_view/background/background.js |
diff --git a/chrome/test/data/extensions/platform_apps/web_view/background/background.js b/chrome/test/data/extensions/platform_apps/web_view/background/background.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5f878c3abc095c30da8ee263ab06609879b578d9 |
--- /dev/null |
+++ b/chrome/test/data/extensions/platform_apps/web_view/background/background.js |
@@ -0,0 +1,22 @@ |
+// Copyright 2014 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 pass = chrome.test.callbackPass; |
+ |
+chrome.test.runTests([ |
+ // Tests that embedding <webview> inside a background page loads. |
+ function inDOM() { |
+ var webview = document.querySelector('webview'); |
+ webview.addEventListener('contentload', pass()); |
+ }, |
+ |
+ // Tests that creating and attaching a WebView element inside a background |
+ // page loads. |
+ function newWebView() { |
+ var webview = new WebView(); |
+ webview.src = "data:text/html,<body>One</body>"; |
+ webview.addEventListener('contentload', pass()); |
+ document.body.appendChild(webview); |
+ } |
+]); |