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