| OLD | NEW |
| 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/permissions/permission_request_manager.h" | 5 #include "chrome/browser/permissions/permission_request_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 "base/test/scoped_feature_list.h" | 9 #include "base/test/scoped_feature_list.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 void SetUpOnMainThread() override { | 80 void SetUpOnMainThread() override { |
| 81 PermissionRequestManager* manager = GetPermissionRequestManager(); | 81 PermissionRequestManager* manager = GetPermissionRequestManager(); |
| 82 mock_permission_prompt_factory_.reset( | 82 mock_permission_prompt_factory_.reset( |
| 83 new MockPermissionPromptFactory(manager)); | 83 new MockPermissionPromptFactory(manager)); |
| 84 manager->DisplayPendingRequests(); | 84 manager->DisplayPendingRequests(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void TearDownOnMainThread() override { | 87 void TearDownOnMainThread() override { |
| 88 mock_permission_prompt_factory_.reset(); | 88 mock_permission_prompt_factory_.reset(); |
| 89 InProcessBrowserTest::TearDownOnMainThread(); | |
| 90 } | 89 } |
| 91 | 90 |
| 92 PermissionRequestManager* GetPermissionRequestManager() { | 91 PermissionRequestManager* GetPermissionRequestManager() { |
| 93 return PermissionRequestManager::FromWebContents( | 92 return PermissionRequestManager::FromWebContents( |
| 94 browser()->tab_strip_model()->GetActiveWebContents()); | 93 browser()->tab_strip_model()->GetActiveWebContents()); |
| 95 } | 94 } |
| 96 | 95 |
| 97 MockPermissionPromptFactory* bubble_factory() { | 96 MockPermissionPromptFactory* bubble_factory() { |
| 98 return mock_permission_prompt_factory_.get(); | 97 return mock_permission_prompt_factory_.get(); |
| 99 } | 98 } |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 #define MAYBE_InvokeDialog_protected_media InvokeDialog_protected_media | 514 #define MAYBE_InvokeDialog_protected_media InvokeDialog_protected_media |
| 516 #else | 515 #else |
| 517 #define MAYBE_InvokeDialog_protected_media DISABLED_InvokeDialog_protected_media | 516 #define MAYBE_InvokeDialog_protected_media DISABLED_InvokeDialog_protected_media |
| 518 #endif | 517 #endif |
| 519 IN_PROC_BROWSER_TEST_F(PermissionDialogTest, | 518 IN_PROC_BROWSER_TEST_F(PermissionDialogTest, |
| 520 MAYBE_InvokeDialog_protected_media) { | 519 MAYBE_InvokeDialog_protected_media) { |
| 521 RunDialog(); | 520 RunDialog(); |
| 522 } | 521 } |
| 523 | 522 |
| 524 } // anonymous namespace | 523 } // anonymous namespace |
| OLD | NEW |