| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 PermissionRequestGestureType::GESTURE), | 27 PermissionRequestGestureType::GESTURE), |
| 28 request2_("test2", | 28 request2_("test2", |
| 29 PermissionRequestType::DOWNLOAD, | 29 PermissionRequestType::DOWNLOAD, |
| 30 PermissionRequestGestureType::NO_GESTURE), | 30 PermissionRequestGestureType::NO_GESTURE), |
| 31 request_mic_("mic", | 31 request_mic_("mic", |
| 32 PermissionRequestType::PERMISSION_MEDIASTREAM_MIC, | 32 PermissionRequestType::PERMISSION_MEDIASTREAM_MIC, |
| 33 PermissionRequestGestureType::NO_GESTURE), | 33 PermissionRequestGestureType::NO_GESTURE), |
| 34 request_camera_("cam", | 34 request_camera_("cam", |
| 35 PermissionRequestType::PERMISSION_MEDIASTREAM_CAMERA, | 35 PermissionRequestType::PERMISSION_MEDIASTREAM_CAMERA, |
| 36 PermissionRequestGestureType::NO_GESTURE), | 36 PermissionRequestGestureType::NO_GESTURE), |
| 37 iframe_request_same_domain_("iframe", | 37 iframe_request_same_domain_( |
| 38 PermissionRequestType::UNKNOWN, | 38 "iframe", |
| 39 GURL("http://www.google.com/some/url")), | 39 PermissionRequestType::PERMISSION_NOTIFICATIONS, |
| 40 iframe_request_other_domain_("iframe", | 40 GURL("http://www.google.com/some/url")), |
| 41 PermissionRequestType::UNKNOWN, | 41 iframe_request_other_domain_( |
| 42 GURL("http://www.youtube.com")), | 42 "iframe", |
| 43 PermissionRequestType::PERMISSION_GEOLOCATION, |
| 44 GURL("http://www.youtube.com")), |
| 43 iframe_request_mic_other_domain_( | 45 iframe_request_mic_other_domain_( |
| 44 "iframe", | 46 "iframe", |
| 45 PermissionRequestType::PERMISSION_MEDIASTREAM_MIC, | 47 PermissionRequestType::PERMISSION_MEDIASTREAM_MIC, |
| 46 GURL("http://www.youtube.com")) {} | 48 GURL("http://www.youtube.com")) {} |
| 47 ~PermissionRequestManagerTest() override {} | 49 ~PermissionRequestManagerTest() override {} |
| 48 | 50 |
| 49 void SetUp() override { | 51 void SetUp() override { |
| 50 ChromeRenderViewHostTestHarness::SetUp(); | 52 ChromeRenderViewHostTestHarness::SetUp(); |
| 51 SetContents(CreateTestWebContents()); | 53 SetContents(CreateTestWebContents()); |
| 52 NavigateAndCommit(GURL("http://www.google.com")); | 54 NavigateAndCommit(GURL("http://www.google.com")); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 PermissionUmaUtil::kPermissionsPromptMergedBubbleDenied, | 638 PermissionUmaUtil::kPermissionsPromptMergedBubbleDenied, |
| 637 static_cast<base::HistogramBase::Sample>( | 639 static_cast<base::HistogramBase::Sample>( |
| 638 PermissionRequestType::PERMISSION_MEDIASTREAM_MIC), | 640 PermissionRequestType::PERMISSION_MEDIASTREAM_MIC), |
| 639 1); | 641 1); |
| 640 histograms.ExpectBucketCount( | 642 histograms.ExpectBucketCount( |
| 641 PermissionUmaUtil::kPermissionsPromptMergedBubbleDenied, | 643 PermissionUmaUtil::kPermissionsPromptMergedBubbleDenied, |
| 642 static_cast<base::HistogramBase::Sample>( | 644 static_cast<base::HistogramBase::Sample>( |
| 643 PermissionRequestType::PERMISSION_MEDIASTREAM_CAMERA), | 645 PermissionRequestType::PERMISSION_MEDIASTREAM_CAMERA), |
| 644 1); | 646 1); |
| 645 } | 647 } |
| OLD | NEW |