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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 | 902 |
903 ASSERT_EQ(2U, chrome::GetTotalBrowserCount()); | 903 ASSERT_EQ(2U, chrome::GetTotalBrowserCount()); |
904 | 904 |
905 content::WebContents* active_web_contents = | 905 content::WebContents* active_web_contents = |
906 chrome::FindLastActive()->tab_strip_model()->GetActiveWebContents(); | 906 chrome::FindLastActive()->tab_strip_model()->GetActiveWebContents(); |
907 ASSERT_NE(web_contents, active_web_contents); | 907 ASSERT_NE(web_contents, active_web_contents); |
908 | 908 |
909 const GURL& url = active_web_contents->GetURL(); | 909 const GURL& url = active_web_contents->GetURL(); |
910 ASSERT_EQ(std::string("http://www.example.com/"), url.spec()); | 910 ASSERT_EQ(std::string("http://www.example.com/"), url.spec()); |
911 } | 911 } |
| 912 |
| 913 // Test that if the plugin tries to load a URL that redirects that it will fail |
| 914 // to load. This is to avoid the source origin of the document changing during |
| 915 // the redirect, which can have security implications. crbug.com/653749 |
| 916 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, RedirectsFailInPlugin) { |
| 917 RunTestsInFile("redirects_fail_test.js", "test.pdf"); |
| 918 } |
OLD | NEW |