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

Unified Diff: chrome/test/data/extensions/platform_apps/app_view/shim/main.js

Issue 618823002: GuestView: Move lifetime management out of content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 6 years, 3 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/app_view/shim/main.js
diff --git a/chrome/test/data/extensions/platform_apps/app_view/shim/main.js b/chrome/test/data/extensions/platform_apps/app_view/shim/main.js
index f305dca2857c1923753ec82453c91a51a6701c6d..fe3c2eb164b2fa95a4554af477bb756a1690115a 100644
--- a/chrome/test/data/extensions/platform_apps/app_view/shim/main.js
+++ b/chrome/test/data/extensions/platform_apps/app_view/shim/main.js
@@ -71,11 +71,13 @@ embedder.test.assertFalse = function(condition) {
function testAppViewWithUndefinedDataShouldSucceed(appToEmbed) {
var appview = new AppView();
LOG('appToEmbed ' + appToEmbed);
+ document.body.appendChild(appview);
// Step 1: Attempt to connect to a non-existant app.
LOG('attempting to connect to non-existant app.');
appview.connect('abc123', undefined, function(success) {
// Make sure we fail.
if (success) {
+ LOG('UNEXPECTED CONNECTION.');
embedder.test.fail();
return;
}
@@ -85,44 +87,49 @@ function testAppViewWithUndefinedDataShouldSucceed(appToEmbed) {
appview.connect(appToEmbed, undefined, function(success) {
// Make sure we don't fail.
if (!success) {
+ LOG('FAILED TO CONNECT.');
embedder.test.fail();
return;
}
+ LOG('CONNECTED.');
embedder.test.succeed();
});
});
- document.body.appendChild(appview);
};
function testAppViewRefusedDataShouldFail(appToEmbed) {
var appview = new AppView();
LOG('appToEmbed ' + appToEmbed);
+ document.body.appendChild(appview);
LOG('Attempting to connect to app with refused params.');
appview.connect(appToEmbed, { 'foo': 'bar' }, function(success) {
// Make sure we fail.
if (success) {
+ LOG('UNEXPECTED CONNECTION.');
embedder.test.fail();
return;
}
+ LOG('FAILED TO CONNECT.');
embedder.test.succeed();
});
- document.body.appendChild(appview);
};
function testAppViewGoodDataShouldSucceed(appToEmbed) {
var appview = new AppView();
LOG('appToEmbed ' + appToEmbed);
+ document.body.appendChild(appview);
LOG('Attempting to connect to app with good params.');
// Step 2: Attempt to connect to an app with good params.
appview.connect(appToEmbed, { 'foo': 'bleep' }, function(success) {
// Make sure we don't fail.
if (!success) {
+ LOG('FAILED TO CONNECT.');
embedder.test.fail();
return;
}
+ LOG('CONNECTED.');
embedder.test.succeed();
});
- document.body.appendChild(appview);
};
embedder.test.testList = {

Powered by Google App Engine
This is Rietveld 408576698