OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/permissions/permissions_browsertest.h" | 10 #include "chrome/browser/permissions/permissions_browsertest.h" |
11 #include "chrome/browser/ui/website_settings/mock_permission_prompt_factory.h" | 11 #include "chrome/browser/ui/permission_bubble/mock_permission_prompt_factory.h" |
12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
13 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
14 #include "components/variations/variations_switches.h" | 14 #include "components/variations/variations_switches.h" |
15 #include "content/public/browser/render_frame_host.h" | 15 #include "content/public/browser/render_frame_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
18 #include "content/public/test/browser_test_utils.h" | 18 #include "content/public/test/browser_test_utils.h" |
19 #include "content/public/test/ppapi_test_utils.h" | 19 #include "content/public/test/ppapi_test_utils.h" |
20 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 20 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 browser(), GURL("file://" + test_path.AsUTF8Unsafe() + test_url())); | 211 browser(), GURL("file://" + test_path.AsUTF8Unsafe() + test_url())); |
212 CommonFailsIfBlocked(); | 212 CommonFailsIfBlocked(); |
213 EXPECT_EQ(1, prompt_factory()->total_request_count()); | 213 EXPECT_EQ(1, prompt_factory()->total_request_count()); |
214 | 214 |
215 // Navigate to a second URL to verify it's blocked on all file: URLs. | 215 // Navigate to a second URL to verify it's blocked on all file: URLs. |
216 ui_test_utils::NavigateToURL( | 216 ui_test_utils::NavigateToURL( |
217 browser(), | 217 browser(), |
218 GURL("file://" + test_path.AsUTF8Unsafe() + "/permissions/flash2.html")); | 218 GURL("file://" + test_path.AsUTF8Unsafe() + "/permissions/flash2.html")); |
219 EXPECT_FALSE(FeatureUsageSucceeds()); | 219 EXPECT_FALSE(FeatureUsageSucceeds()); |
220 } | 220 } |
OLD | NEW |