Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2810)

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/background/background.js

Issue 458323002: Change GuestViewInternalCreateGuestFunction to create the guest view using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseeeeeee Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b32413ba8462bb23871b82b1968afddf099a1bc6
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/web_view/background/background.js
@@ -0,0 +1,25 @@
+// 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;
+
+var WEBVIEW_SRC = "data:text/html,<body>One</body>";
+
+chrome.test.runTests([
+ // Tests that embedding <webview> inside a background page loads.
+ function inDOM() {
+ var webview = document.querySelector('webview');
+ webview.addEventListener('contentload', pass());
+ webview.setAttribute('src', WEBVIEW_SRC);
+ },
+
+ // Tests that creating and attaching a WebView element inside a background
+ // page loads.
+ function newWebView() {
+ var webview = new WebView();
+ webview.addEventListener('contentload', pass());
+ webview.src = WEBVIEW_SRC;
+ document.body.appendChild(webview);
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698