Skip to content

Commit

Permalink
Merge pull request #1317 from brave/hangouts-disable
Browse files Browse the repository at this point in the history
Only run tests for hangouts when it is enabled
  • Loading branch information
bbondy authored Jan 14, 2019
2 parents 2bef5ea + d30141a commit f5a7698
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browser/brave_content_browser_client_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
Expand Down Expand Up @@ -301,6 +302,7 @@ IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest,
<< "No changes on the real URL";
}

#if BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION)
IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest,
HangoutsEnabledByDefault) {
ASSERT_TRUE(browser()->profile()->GetPrefs()->GetBoolean(kHangoutsEnabled));
Expand All @@ -321,6 +323,7 @@ IN_PROC_BROWSER_TEST_F(BraveContentBrowserClientTest,
extensions::ExtensionRegistry::Get(browser()->profile());
ASSERT_FALSE(registry->enabled_extensions().Contains(hangouts_extension_id));
}
#endif

class BraveContentBrowserClientReferrerTest
: public BraveContentBrowserClientTest {
Expand Down
2 changes: 2 additions & 0 deletions browser/extensions/brave_component_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class BraveComponentLoader : public ComponentLoader {
const std::string& manifest);
void AddExtension(const std::string& id,
const std::string& name, const std::string& public_key);
// ForceAddHangoutServicesExtension ignores whether or not a preference for
// hangouts is set. If the buildflag is not set, it won't add though.
void ForceAddHangoutServicesExtension();

static bool IsPdfjsDisabled();
Expand Down

0 comments on commit f5a7698

Please sign in to comment.