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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 | 998 |
999 // TODO(lukasza/paulmeyer): crbug.com/457440: Can enable verification | 999 // TODO(lukasza/paulmeyer): crbug.com/457440: Can enable verification |
1000 // of the original page once find-in-page works for OOP frames. | 1000 // of the original page once find-in-page works for OOP frames. |
1001 bool skip_verification_of_original_page = true; | 1001 bool skip_verification_of_original_page = true; |
1002 | 1002 |
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, DISABLED_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 = 4; |
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 }; | 1019 }; |
1020 | 1020 |
1021 GURL url( | 1021 GURL url( |
1022 embedded_test_server()->GetURL("a.com", "/save_page/frames-objects.htm")); | 1022 embedded_test_server()->GetURL("a.com", "/save_page/frames-objects.htm")); |
1023 | 1023 |
| 1024 // TODO(lukasza): crbug.com/553478: Enable <object> testing of MHTML. |
| 1025 if (save_page_type == content::SAVE_PAGE_TYPE_AS_MHTML) |
| 1026 return; |
| 1027 |
1024 TestMultiFramePage(save_page_type, url, expected_number_of_frames, | 1028 TestMultiFramePage(save_page_type, url, expected_number_of_frames, |
1025 expected_substrings); | 1029 expected_substrings); |
1026 } | 1030 } |
1027 | 1031 |
1028 IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, AboutBlank) { | 1032 IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, AboutBlank) { |
1029 content::SavePageType save_page_type = GetParam(); | 1033 content::SavePageType save_page_type = GetParam(); |
1030 | 1034 |
1031 std::vector<std::string> expected_substrings{ | 1035 std::vector<std::string> expected_substrings{ |
1032 "main: acb0609d-eb10-4c26-83e2-ad8afb7b0ff3", | 1036 "main: acb0609d-eb10-4c26-83e2-ad8afb7b0ff3", |
1033 "sub1: b124df3a-d39f-47a1-ae04-5bb5d0bf549e", | 1037 "sub1: b124df3a-d39f-47a1-ae04-5bb5d0bf549e", |
(...skipping 23 matching lines...) Expand all Loading... |
1057 TestMultiFramePage(save_page_type, url, 3, expected_substrings); | 1061 TestMultiFramePage(save_page_type, url, 3, expected_substrings); |
1058 } | 1062 } |
1059 | 1063 |
1060 INSTANTIATE_TEST_CASE_P( | 1064 INSTANTIATE_TEST_CASE_P( |
1061 , | 1065 , |
1062 SavePageMultiFrameBrowserTest, | 1066 SavePageMultiFrameBrowserTest, |
1063 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, | 1067 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, |
1064 content::SAVE_PAGE_TYPE_AS_MHTML)); | 1068 content::SAVE_PAGE_TYPE_AS_MHTML)); |
1065 | 1069 |
1066 } // namespace | 1070 } // namespace |
OLD | NEW |