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

Unified Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm

Issue 2335623002: Use WebContents instead of Browser to construct PermissionPrompt (Closed)
Patch Set: Created 4 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/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm
index 1a594d65aafabf9b67b315ecbc4d8f60669b7e5b..e71fdf03868b39fafe02124b7a5350fed963ac44 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm
@@ -21,8 +21,10 @@
#include "chrome/browser/ui/cocoa/run_loop_testing.h"
#import "chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h"
#import "chrome/browser/ui/cocoa/website_settings/split_block_button.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
+#include "content/public/browser/web_contents.h"
#include "testing/gmock/include/gmock/gmock.h"
#import "testing/gtest_mac.h"
#include "ui/base/cocoa/cocoa_base_utils.h"
@@ -78,7 +80,11 @@ class PermissionBubbleControllerTest : public CocoaProfileTest,
void SetUp() override {
CocoaProfileTest::SetUp();
- bridge_.reset(new PermissionBubbleCocoa(browser()));
+ content::WebContents* web_contents = content::WebContents::Create(
+ content::WebContents::CreateParams(profile()));
+ TabStripModel* model = browser()->tab_strip_model();
+ model->AppendWebContents(web_contents, true);
raymes 2016/09/15 02:07:32 Please get someone else to take a look at this (ta
lshang 2016/09/15 09:45:06 NaN. As Trent suggested, we will just change the i
+ bridge_.reset(new PermissionBubbleCocoa(web_contents));
AddRequest(kPermissionA);
controller_ =
[[PermissionBubbleController alloc] initWithBrowser:browser()

Powered by Google App Engine
This is Rietveld 408576698