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

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_manager_browsertest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" 5 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/permissions/permission_context_base.h" 10 #include "chrome/browser/permissions/permission_context_base.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 params[PermissionUtil::GetPermissionString(permission_type)] = 66 params[PermissionUtil::GetPermissionString(permission_type)] =
67 kPermissionsKillSwitchBlockedValue; 67 kPermissionsKillSwitchBlockedValue;
68 variations::AssociateVariationParams( 68 variations::AssociateVariationParams(
69 kPermissionsKillSwitchFieldStudy, kPermissionsKillSwitchTestGroup, 69 kPermissionsKillSwitchFieldStudy, kPermissionsKillSwitchTestGroup,
70 params); 70 params);
71 base::FieldTrialList::CreateFieldTrial(kPermissionsKillSwitchFieldStudy, 71 base::FieldTrialList::CreateFieldTrial(kPermissionsKillSwitchFieldStudy,
72 kPermissionsKillSwitchTestGroup); 72 kPermissionsKillSwitchTestGroup);
73 } 73 }
74 74
75 private: 75 private:
76 scoped_ptr<MockPermissionBubbleFactory> mock_permission_bubble_factory_; 76 std::unique_ptr<MockPermissionBubbleFactory> mock_permission_bubble_factory_;
77 }; 77 };
78 78
79 // Requests before the load event should be bundled into one bubble. 79 // Requests before the load event should be bundled into one bubble.
80 // http://crbug.com/512849 flaky 80 // http://crbug.com/512849 flaky
81 IN_PROC_BROWSER_TEST_F(PermissionBubbleManagerBrowserTest, 81 IN_PROC_BROWSER_TEST_F(PermissionBubbleManagerBrowserTest,
82 DISABLED_RequestsBeforeLoad) { 82 DISABLED_RequestsBeforeLoad) {
83 ASSERT_TRUE(embedded_test_server()->Start()); 83 ASSERT_TRUE(embedded_test_server()->Start());
84 84
85 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( 85 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(
86 browser(), 86 browser(),
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // Disable the trial. 248 // Disable the trial.
249 variations::testing::ClearAllVariationParams(); 249 variations::testing::ClearAllVariationParams();
250 250
251 EXPECT_TRUE(content::ExecuteScript(web_contents, "requestNotification();")); 251 EXPECT_TRUE(content::ExecuteScript(web_contents, "requestNotification();"));
252 WaitForPermissionBubble(); 252 WaitForPermissionBubble();
253 EXPECT_EQ(1, bubble_factory()->show_count()); 253 EXPECT_EQ(1, bubble_factory()->show_count());
254 EXPECT_EQ(1, bubble_factory()->total_request_count()); 254 EXPECT_EQ(1, bubble_factory()->total_request_count());
255 } 255 }
256 256
257 } // anonymous namespace 257 } // anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698