Bug 936426 fix intermittent error, reduce testing to what we actually need here, r=markh

This commit is contained in:
Shane Caraveo 2015-05-01 08:26:29 -07:00
Родитель ec1a68ea7b
Коммит 630903df50
1 изменённых файлов: 7 добавлений и 13 удалений

Просмотреть файл

@ -89,18 +89,15 @@ function waitForProviderLoad(cb) {
waitForCondition(function() { waitForCondition(function() {
let sbrowser = document.getElementById("social-sidebar-browser"); let sbrowser = document.getElementById("social-sidebar-browser");
let provider = SocialSidebar.provider; let provider = SocialSidebar.provider;
let postActivation = provider && gBrowser.contentDocument.location.href == provider.origin + "/browser/browser/base/content/test/social/social_postActivation.html"; let postActivation = provider && gBrowser.contentDocument &&
gBrowser.contentDocument.location.href == provider.origin + "/browser/browser/base/content/test/social/social_postActivation.html";
return provider && return postActivation && sbrowser.docShellIsActive;
provider.profile &&
provider.profile.displayName &&
postActivation &&
sbrowser.docShellIsActive;
}, function() { }, function() {
// executeSoon to let the browser UI observers run first // executeSoon to let the browser UI observers run first
executeSoon(cb); executeSoon(cb);
}, },
"waitForProviderLoad: provider profile was not set"); "waitForProviderLoad: provider was not loaded");
} }
@ -178,22 +175,19 @@ let gProviders = [
{ {
name: "provider 1", name: "provider 1",
origin: "https://example.com", origin: "https://example.com",
sidebarURL: "https://example.com/browser/browser/base/content/test/social/social_sidebar.html?provider1", sidebarURL: "https://example.com/browser/browser/base/content/test/social/social_sidebar_empty.html?provider1",
workerURL: "https://example.com/browser/browser/base/content/test/social/social_worker.js#no-profile,no-recommend",
iconURL: "chrome://branding/content/icon48.png" iconURL: "chrome://branding/content/icon48.png"
}, },
{ {
name: "provider 2", name: "provider 2",
origin: "https://test1.example.com", origin: "https://test1.example.com",
sidebarURL: "https://test1.example.com/browser/browser/base/content/test/social/social_sidebar.html?provider2", sidebarURL: "https://test1.example.com/browser/browser/base/content/test/social/social_sidebar_empty.html?provider2",
workerURL: "https://test1.example.com/browser/browser/base/content/test/social/social_worker.js#no-profile,no-recommend",
iconURL: "chrome://branding/content/icon64.png" iconURL: "chrome://branding/content/icon64.png"
}, },
{ {
name: "provider 3", name: "provider 3",
origin: "https://test2.example.com", origin: "https://test2.example.com",
sidebarURL: "https://test2.example.com/browser/browser/base/content/test/social/social_sidebar.html?provider2", sidebarURL: "https://test2.example.com/browser/browser/base/content/test/social/social_sidebar_empty.html?provider2",
workerURL: "https://test2.example.com/browser/browser/base/content/test/social/social_worker.js#no-profile,no-recommend",
iconURL: "chrome://branding/content/about-logo.png" iconURL: "chrome://branding/content/about-logo.png"
} }
]; ];