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 = { |