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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc

Issue 1661423002: Solidify Entry discarding logic (NavigationHandle keeps its ID) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix check that's invalid when base url has invalid url. Added TODO Created 4 years, 9 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
143 // The bubble for both media devices links to the the first section of the 138 // The bubble for both media devices links to the the first section of the
144 // default media content settings, which is the microphone section. 139 // default media content settings, which is the microphone section.
145 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED | 140 ManageMediaStreamSettings(TabSpecificContentSettings::MICROPHONE_ACCESSED |
146 TabSpecificContentSettings::CAMERA_ACCESSED); 141 TabSpecificContentSettings::CAMERA_ACCESSED);
147 EXPECT_EQ(GURL("chrome://settings/content#media-stream-mic"), 142 EXPECT_EQ(GURL("chrome://settings/content#media-stream-mic"),
148 GetActiveTab()->GetLastCommittedURL()); 143 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());
149 } 153 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698