| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 std::string arr[] = { | 1107 std::string arr[] = { |
| 1108 "frames-runtime-changes.htm: 4388232f-8d45-4d2e-9807-721b381be153", | 1108 "frames-runtime-changes.htm: 4388232f-8d45-4d2e-9807-721b381be153", |
| 1109 "subframe1: 21595339-61fc-4854-b6df-0668328ea263", | 1109 "subframe1: 21595339-61fc-4854-b6df-0668328ea263", |
| 1110 "subframe2: adf55719-15e7-45be-9eda-d12fe782a1bd", | 1110 "subframe2: adf55719-15e7-45be-9eda-d12fe782a1bd", |
| 1111 "subframe3: 50e294bf-3a5b-499d-8772-651ead26952f", | 1111 "subframe3: 50e294bf-3a5b-499d-8772-651ead26952f", |
| 1112 "subframe4: e0ea9289-7467-4d32-ba5c-c604e8d84cb7", | 1112 "subframe4: e0ea9289-7467-4d32-ba5c-c604e8d84cb7", |
| 1113 }; | 1113 }; |
| 1114 std::vector<std::string> expected_substrings(std::begin(arr), std::end(arr)); | 1114 std::vector<std::string> expected_substrings(std::begin(arr), std::end(arr)); |
| 1115 | 1115 |
| 1116 if (save_page_type == content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML) { | 1116 if (save_page_type == content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML) { |
| 1117 // TODO(lukasza): crbug.com/106364: Expand complete-html test beyond just | 1117 // TODO(lukasza): crbug.com/106364: Expand complete-html test to cover all |
| 1118 // being a crash test. In particular, the |complete_html_arr| below should | 1118 // test frames. In particular, the |complete_html_arr| below should be the |
| 1119 // be the same as the |arr| above (and at this point the special-casing of | 1119 // same as the |arr| above (and at this point the special-casing of |
| 1120 // complete-html can be removed). | 1120 // complete-html can be removed). |
| 1121 // Draft CLs with fix proposals that should accomplish this: | 1121 // Draft CLs with fix proposals that should accomplish this: |
| 1122 // - crrev.com/1502563004 | 1122 // - crrev.com/1502563004 |
| 1123 // - crrev.com/1500103002 | 1123 // - crrev.com/1500103002 |
| 1124 std::string complete_html_arr[] = { | 1124 std::string complete_html_arr[] = { |
| 1125 "frames-runtime-changes.htm: 4388232f-8d45-4d2e-9807-721b381be153", | 1125 "frames-runtime-changes.htm: 4388232f-8d45-4d2e-9807-721b381be153", |
| 1126 "subframe1: 21595339-61fc-4854-b6df-0668328ea263", |
| 1127 "subframe2: adf55719-15e7-45be-9eda-d12fe782a1bd", |
| 1126 }; | 1128 }; |
| 1127 expected_substrings = std::vector<std::string>( | 1129 expected_substrings = std::vector<std::string>( |
| 1128 std::begin(complete_html_arr), std::end(complete_html_arr)); | 1130 std::begin(complete_html_arr), std::end(complete_html_arr)); |
| 1129 } | 1131 } |
| 1130 | 1132 |
| 1131 GURL url(embedded_test_server()->GetURL( | 1133 GURL url(embedded_test_server()->GetURL( |
| 1132 "a.com", "/save_page/frames-runtime-changes.htm?do_runtime_changes=1")); | 1134 "a.com", "/save_page/frames-runtime-changes.htm?do_runtime_changes=1")); |
| 1133 | 1135 |
| 1134 TestMultiFramePage(save_page_type, url, 5, expected_substrings); | 1136 TestMultiFramePage(save_page_type, url, 5, expected_substrings); |
| 1135 } | 1137 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 TestMultiFramePage(save_page_type, url, 6, expected_substrings); | 1191 TestMultiFramePage(save_page_type, url, 6, expected_substrings); |
| 1190 } | 1192 } |
| 1191 | 1193 |
| 1192 INSTANTIATE_TEST_CASE_P( | 1194 INSTANTIATE_TEST_CASE_P( |
| 1193 SaveType, | 1195 SaveType, |
| 1194 SavePageMultiFrameBrowserTest, | 1196 SavePageMultiFrameBrowserTest, |
| 1195 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, | 1197 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, |
| 1196 content::SAVE_PAGE_TYPE_AS_MHTML)); | 1198 content::SAVE_PAGE_TYPE_AS_MHTML)); |
| 1197 | 1199 |
| 1198 } // namespace | 1200 } // namespace |
| OLD | NEW |