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