OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/stringprintf.h" | 5 #include "base/stringprintf.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/automation/automation_util.h" | 7 #include "chrome/browser/automation/automation_util.h" |
8 #include "chrome/browser/extensions/extension_test_message_listener.h" | 8 #include "chrome/browser/extensions/extension_test_message_listener.h" |
9 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 9 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
10 #include "chrome/browser/prerender/prerender_link_manager.h" | 10 #include "chrome/browser/prerender/prerender_link_manager.h" |
11 #include "chrome/browser/prerender/prerender_link_manager_factory.h" | 11 #include "chrome/browser/prerender/prerender_link_manager_factory.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
15 #include "chrome/test/base/ui_test_utils.h" | |
16 #include "chrome/test/base/test_launcher_utils.h" | 15 #include "chrome/test/base/test_launcher_utils.h" |
17 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
18 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
19 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
20 #include "content/public/browser/web_contents_delegate.h" | 19 #include "content/public/browser/web_contents_delegate.h" |
21 #include "content/public/test/browser_test_utils.h" | 20 #include "content/public/test/browser_test_utils.h" |
22 #include "content/public/test/fake_speech_recognition_manager.h" | 21 #include "content/public/test/fake_speech_recognition_manager.h" |
23 #include "ui/compositor/compositor_setup.h" | 22 #include "ui/compositor/compositor_setup.h" |
24 #include "ui/gl/gl_switches.h" | 23 #include "ui/gl/gl_switches.h" |
25 | 24 |
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 EXPECT_TRUE(content::ExecuteScript(guest_web_contents, | 1041 EXPECT_TRUE(content::ExecuteScript(guest_web_contents, |
1043 "startDownload('download-link-2')")); | 1042 "startDownload('download-link-2')")); |
1044 mock_delegate->WaitForCanDownload(true); // Expect to allow. | 1043 mock_delegate->WaitForCanDownload(true); // Expect to allow. |
1045 mock_delegate->Reset(); | 1044 mock_delegate->Reset(); |
1046 | 1045 |
1047 // 3. Guest requests a download that its embedder ignores, this implies deny. | 1046 // 3. Guest requests a download that its embedder ignores, this implies deny. |
1048 EXPECT_TRUE(content::ExecuteScript(guest_web_contents, | 1047 EXPECT_TRUE(content::ExecuteScript(guest_web_contents, |
1049 "startDownload('download-link-3')")); | 1048 "startDownload('download-link-3')")); |
1050 mock_delegate->WaitForCanDownload(false); // Expect to not allow. | 1049 mock_delegate->WaitForCanDownload(false); // Expect to not allow. |
1051 } | 1050 } |
OLD | NEW |