| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // the correct section of the settings UI. | 128 // the correct section of the settings UI. |
| 129 IN_PROC_BROWSER_TEST_F(ContentSettingBubbleModelMediaStreamTest, ManageLink) { | 129 IN_PROC_BROWSER_TEST_F(ContentSettingBubbleModelMediaStreamTest, ManageLink) { |
| 130 // For each of the three options, we click the management link and check if | 130 // For each of the three options, we click the management link and check if |
| 131 // the active tab loads the correct internal url. | 131 // the active tab loads the correct internal url. |
| 132 | 132 |
| 133 // The microphone bubble links to microphone exceptions. | 133 // The microphone bubble links to microphone exceptions. |
| 134 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED); | 134 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED); |
| 135 EXPECT_EQ(GURL("chrome://settings/contentExceptions#media-stream-mic"), | 135 EXPECT_EQ(GURL("chrome://settings/contentExceptions#media-stream-mic"), |
| 136 GetActiveTab()->GetLastCommittedURL()); | 136 GetActiveTab()->GetLastCommittedURL()); |
| 137 | 137 |
| 138 // The camera bubble links to camera exceptions. |
| 139 ManageMediaStreamSettings(TabSpecificContentSettings::CAMERA_ACCESSED); |
| 140 EXPECT_EQ(GURL("chrome://settings/contentExceptions#media-stream-camera"), |
| 141 GetActiveTab()->GetLastCommittedURL()); |
| 142 |
| 138 // The bubble for both media devices links to the the first section of the | 143 // The bubble for both media devices links to the the first section of the |
| 139 // default media content settings, which is the microphone section. | 144 // default media content settings, which is the microphone section. |
| 140 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED | | 145 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 141 TabSpecificContentSettings::CAMERA_ACCESSED); | 146 TabSpecificContentSettings::CAMERA_ACCESSED); |
| 142 EXPECT_EQ(GURL("chrome://settings/content#media-stream-mic"), | 147 EXPECT_EQ(GURL("chrome://settings/content#media-stream-mic"), |
| 143 GetActiveTab()->GetLastCommittedURL()); | 148 GetActiveTab()->GetLastCommittedURL()); |
| 144 | |
| 145 // In ChromeOS, we do not sanitize chrome://settings-frame to | |
| 146 // chrome://settings for same-document navigations. See crbug.com/416157. For | |
| 147 // this reason, order the tests so no same-document navigation occurs. | |
| 148 | |
| 149 // The camera bubble links to camera exceptions. | |
| 150 ManageMediaStreamSettings(TabSpecificContentSettings::CAMERA_ACCESSED); | |
| 151 EXPECT_EQ(GURL("chrome://settings/contentExceptions#media-stream-camera"), | |
| 152 GetActiveTab()->GetLastCommittedURL()); | |
| 153 } | 149 } |
| OLD | NEW |