Skip to content

Commit

Permalink
Revert "Merge pull request #7945 from brave/pr7935_ksmith-bap-ui-cras…
Browse files Browse the repository at this point in the history
…h_1.21.x"

This reverts commit 64f63d7, reversing
changes made to 96e3378.
  • Loading branch information
bsclifton committed Feb 26, 2021
1 parent dafaea2 commit 706d689
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
5 changes: 0 additions & 5 deletions browser/ui/brave_actions/brave_action_view_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ bool BraveActionViewController::TriggerPopupWithUrl(
PopupShowAction show_action,
const GURL& popup_url,
bool grant_tab_permissions) {
// If this extension is currently showing a popup, hide it. This behavior is
// a bit different than ExtensionActionViewController, which will hide any
// popup, regardless of extension. Consider duplicating the original behavior.
HidePopup();

std::unique_ptr<extensions::ExtensionViewHost> host =
extensions::ExtensionViewHostFactory::CreatePopupHost(popup_url,
browser_);
Expand Down
17 changes: 0 additions & 17 deletions components/brave_rewards/browser/test/rewards_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/time/time_override.h"
#include "bat/ledger/internal/uphold/uphold_util.h"
#include "brave/browser/brave_rewards/rewards_service_factory.h"
#include "brave/browser/extensions/api/brave_action_api.h"
#include "brave/common/brave_paths.h"
#include "brave/components/brave_rewards/browser/rewards_service_impl.h"
#include "brave/components/brave_rewards/browser/test/common/rewards_browsertest_context_helper.h"
Expand Down Expand Up @@ -506,20 +505,4 @@ IN_PROC_BROWSER_TEST_F(RewardsBrowserTest, BAPCutoffAfter) {
}
}

IN_PROC_BROWSER_TEST_F(RewardsBrowserTest, BAPPopup) {
// Open the rewards popup.
content::WebContents* popup_contents = context_helper_->OpenRewardsPopup();
ASSERT_TRUE(popup_contents);

// Attempt to open the BAP deprecation popup at the same time. The rewards
// panel popup should close. If both popups are shown at the same time, this
// test will crash on exit.
std::string error;
bool popup_shown = extensions::BraveActionAPI::ShowActionUI(
browser(), brave_rewards_extension_id,
std::make_unique<std::string>("brave_rewards_panel.html#bap-deprecation"),
&error);
EXPECT_TRUE(popup_shown);
}

} // namespace rewards_browsertest

0 comments on commit 706d689

Please sign in to comment.