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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 TestMultiFramePage(save_page_type, url, 3, expected_substrings, | 1003 TestMultiFramePage(save_page_type, url, 3, expected_substrings, |
1004 skip_verification_of_original_page); | 1004 skip_verification_of_original_page); |
1005 } | 1005 } |
1006 | 1006 |
1007 // Test for crbug.com/553478. | 1007 // Test for crbug.com/553478. |
1008 IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, ObjectElements) { | 1008 IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, ObjectElements) { |
1009 content::SavePageType save_page_type = GetParam(); | 1009 content::SavePageType save_page_type = GetParam(); |
1010 | 1010 |
1011 // 4 = main frame + iframe + object w/ html doc + object w/ pdf doc | 1011 // 4 = main frame + iframe + object w/ html doc + object w/ pdf doc |
1012 // (svg and png objects do not get a separate frame) | 1012 // (svg and png objects do not get a separate frame) |
1013 int expected_number_of_frames = 4; | 1013 int expected_number_of_frames = 6; |
1014 | 1014 |
1015 std::vector<std::string> expected_substrings{ | 1015 std::vector<std::string> expected_substrings{ |
1016 "frames-objects.htm: 8da13db4-a512-4d9b-b1c5-dc1c134234b9", | 1016 "frames-objects.htm: 8da13db4-a512-4d9b-b1c5-dc1c134234b9", |
1017 "a.htm: 1b8aae2b-e164-462f-bd5b-98aa366205f2", | 1017 "a.htm: 1b8aae2b-e164-462f-bd5b-98aa366205f2", |
1018 "b.htm: 3a35f7fa-96a9-4487-9f18-4470263907fa", | 1018 "b.htm: 3a35f7fa-96a9-4487-9f18-4470263907fa", |
| 1019 "frames-nested.htm: 4388232f-8d45-4d2e-9807-721b381be153", |
| 1020 "frames-nested2.htm: 6d23dc47-f283-4977-96ec-66bcf72301a4", |
1019 }; | 1021 }; |
1020 | 1022 |
1021 GURL url( | 1023 GURL url( |
1022 embedded_test_server()->GetURL("a.com", "/save_page/frames-objects.htm")); | 1024 embedded_test_server()->GetURL("a.com", "/save_page/frames-objects.htm")); |
1023 | 1025 |
1024 // TODO(lukasza): crbug.com/553478: Enable <object> testing of MHTML. | 1026 // TODO(lukasza): crbug.com/553478: Enable <object> testing of MHTML. |
1025 if (save_page_type == content::SAVE_PAGE_TYPE_AS_MHTML) | 1027 if (save_page_type == content::SAVE_PAGE_TYPE_AS_MHTML) |
1026 return; | 1028 return; |
1027 | 1029 |
1028 TestMultiFramePage(save_page_type, url, expected_number_of_frames, | 1030 TestMultiFramePage(save_page_type, url, expected_number_of_frames, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 TestMultiFramePage(save_page_type, url, 3, expected_substrings); | 1063 TestMultiFramePage(save_page_type, url, 3, expected_substrings); |
1062 } | 1064 } |
1063 | 1065 |
1064 INSTANTIATE_TEST_CASE_P( | 1066 INSTANTIATE_TEST_CASE_P( |
1065 , | 1067 , |
1066 SavePageMultiFrameBrowserTest, | 1068 SavePageMultiFrameBrowserTest, |
1067 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, | 1069 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, |
1068 content::SAVE_PAGE_TYPE_AS_MHTML)); | 1070 content::SAVE_PAGE_TYPE_AS_MHTML)); |
1069 | 1071 |
1070 } // namespace | 1072 } // namespace |
OLD | NEW |