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

Unified Diff: extensions/test/data/app_view/apitest/main.js

Issue 820583002: Adds support for media permission request handling on <appview> tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn build Created 6 years 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: extensions/test/data/app_view/apitest/main.js
diff --git a/extensions/test/data/app_view/apitest/main.js b/extensions/test/data/app_view/apitest/main.js
index bbff36b66442c2bbcb279393874761ece88f64e4..4bc514dc1574c57a0afa9be211bd4dc28d9c3772 100644
--- a/extensions/test/data/app_view/apitest/main.js
+++ b/extensions/test/data/app_view/apitest/main.js
@@ -69,6 +69,23 @@ function testAppViewGoodDataShouldSucceed(appToEmbed) {
});
};
+function testAppViewMediaRequest(appToEmbed) {
+ var appview = new AppView();
+ window.console.log('appToEmbed ' + appToEmbed);
+ document.body.appendChild(appview);
+ window.console.log('Attempting to connect to app.');
+ appview.connect(appToEmbed, {}, function(success) {
+ // Make sure we don't fail.
+ if (!success) {
+ window.console.log('Failed to connect.');
+ embedder.test.fail();
+ return;
+ }
+ window.console.log('Connected.');
+ embedder.test.succeed();
+ });
+};
+
function testAppViewRefusedDataShouldFail(appToEmbed) {
var appview = new AppView();
LOG('appToEmbed ' + appToEmbed);
@@ -117,6 +134,7 @@ function testAppViewWithUndefinedDataShouldSucceed(appToEmbed) {
embedder.test.testList = {
'testAppViewGoodDataShouldSucceed': testAppViewGoodDataShouldSucceed,
+ 'testAppViewMediaRequest': testAppViewMediaRequest,
'testAppViewRefusedDataShouldFail': testAppViewRefusedDataShouldFail,
'testAppViewWithUndefinedDataShouldSucceed':
testAppViewWithUndefinedDataShouldSucceed

Powered by Google App Engine
This is Rietveld 408576698