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

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

Issue 1554233004: Plumb audio muting state to guest web-contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 11 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/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;

Powered by Google App Engine
This is Rietveld 408576698