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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
903 | 903 |
904 ASSERT_EQ(2U, chrome::GetTotalBrowserCount()); | 904 ASSERT_EQ(2U, chrome::GetTotalBrowserCount()); |
905 | 905 |
906 content::WebContents* active_web_contents = | 906 content::WebContents* active_web_contents = |
907 chrome::FindLastActive()->tab_strip_model()->GetActiveWebContents(); | 907 chrome::FindLastActive()->tab_strip_model()->GetActiveWebContents(); |
908 ASSERT_NE(web_contents, active_web_contents); | 908 ASSERT_NE(web_contents, active_web_contents); |
909 | 909 |
910 const GURL& url = active_web_contents->GetURL(); | 910 const GURL& url = active_web_contents->GetURL(); |
911 ASSERT_EQ(std::string("http://www.example.com/"), url.spec()); | 911 ASSERT_EQ(std::string("http://www.example.com/"), url.spec()); |
912 } | 912 } |
913 | |
914 // Test that if the plugin tries to load a URL that redirects that it will fail | |
Lei Zhang
2016/11/08 01:28:10
... _then_ it will fail?
raymes
2016/11/08 06:00:01
Done.
| |
915 // to load. This is to avoid the source origin of the document changing during | |
916 // the redirect, which can have security implications. crbug.com/653749 | |
Lei Zhang
2016/11/08 01:28:10
If you add https:// in the URL, then cs.chromium.o
raymes
2016/11/08 06:00:01
Done.
| |
917 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, RedirectsFailInPlugin) { | |
918 RunTestsInFile("redirects_fail_test.js", "test.pdf"); | |
919 } | |
OLD | NEW |