Chromium Code Reviews| 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 // In ChromeOS, we do not sanitize chrome://settings-frame to | |
| 139 // chrome://settings for same-document navigations. See crbug.com/416157. | |
| 138 // The camera bubble links to camera exceptions. | 140 // The camera bubble links to camera exceptions. |
| 141 GURL camera_url = | |
| 142 #if defined(OS_CHROMEOS) | |
| 143 GURL("chrome://settings-frame/contentExceptions#media-stream-camera"); | |
|
Bernhard Bauer
2016/02/25 09:32:43
Why do we not do this for microphone?
Charlie Harrison
2016/02/25 13:24:17
I'm not 100% sure of why the bug happens, but the
Bernhard Bauer
2016/02/25 13:47:07
I think that would be good. You could also navigat
| |
| 144 #else | |
| 145 GURL("chrome://settings/contentExceptions#media-stream-camera"); | |
| 146 #endif | |
| 139 ManageMediaStreamSettings(TabSpecificContentSettings::CAMERA_ACCESSED); | 147 ManageMediaStreamSettings(TabSpecificContentSettings::CAMERA_ACCESSED); |
| 140 EXPECT_EQ(GURL("chrome://settings/contentExceptions#media-stream-camera"), | 148 EXPECT_EQ(camera_url, GetActiveTab()->GetLastCommittedURL()); |
| 141 GetActiveTab()->GetLastCommittedURL()); | |
| 142 | 149 |
| 143 // The bubble for both media devices links to the the first section of the | 150 // The bubble for both media devices links to the the first section of the |
| 144 // default media content settings, which is the microphone section. | 151 // default media content settings, which is the microphone section. |
| 145 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED | | 152 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 146 TabSpecificContentSettings::CAMERA_ACCESSED); | 153 TabSpecificContentSettings::CAMERA_ACCESSED); |
| 147 EXPECT_EQ(GURL("chrome://settings/content#media-stream-mic"), | 154 EXPECT_EQ(GURL("chrome://settings/content#media-stream-mic"), |
| 148 GetActiveTab()->GetLastCommittedURL()); | 155 GetActiveTab()->GetLastCommittedURL()); |
| 149 } | 156 } |
| OLD | NEW |