| 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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 "frames-nested2.htm: 6d23dc47-f283-4977-96ec-66bcf72301a4", | 1065 "frames-nested2.htm: 6d23dc47-f283-4977-96ec-66bcf72301a4", |
| 1066 "b.htm: 3a35f7fa-96a9-4487-9f18-4470263907fa", | 1066 "b.htm: 3a35f7fa-96a9-4487-9f18-4470263907fa", |
| 1067 }; | 1067 }; |
| 1068 | 1068 |
| 1069 GURL url( | 1069 GURL url( |
| 1070 embedded_test_server()->GetURL("a.com", "/save_page/frames-nested.htm")); | 1070 embedded_test_server()->GetURL("a.com", "/save_page/frames-nested.htm")); |
| 1071 | 1071 |
| 1072 TestMultiFramePage(save_page_type, url, 3, expected_substrings); | 1072 TestMultiFramePage(save_page_type, url, 3, expected_substrings); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, RuntimeChanges) { |
| 1076 content::SavePageType save_page_type = GetParam(); |
| 1077 |
| 1078 std::vector<std::string> expected_substrings{ |
| 1079 "frames-runtime-changes.htm: 396f17f2-2c48-4793-a570-bc856e66e75d", |
| 1080 // TODO(lukasza): Need to avoid uri-based deduping (which currently |
| 1081 // happens in a map from uris into local paths. |
| 1082 // "subframe1: 21595339-61fc-4854-b6df-0668328ea263", |
| 1083 // "subframe2: adf55719-15e7-45be-9eda-d12fe782a1bd", |
| 1084 // TODO(lukasza): Need to also fix inline / srcdoc frames. |
| 1085 // "subframe3: 50e294bf-3a5b-499d-8772-651ead26952f", |
| 1086 // "subframe4: e0ea9289-7467-4d32-ba5c-c604e8d84cb7", |
| 1087 }; |
| 1088 |
| 1089 GURL url(embedded_test_server()->GetURL( |
| 1090 "a.com", "/save_page/frames-runtime-changes.htm?do_runtime_changes=1")); |
| 1091 |
| 1092 TestMultiFramePage(save_page_type, url, 5, expected_substrings); |
| 1093 } |
| 1094 |
| 1075 INSTANTIATE_TEST_CASE_P( | 1095 INSTANTIATE_TEST_CASE_P( |
| 1076 SaveType, | 1096 SaveType, |
| 1077 SavePageMultiFrameBrowserTest, | 1097 SavePageMultiFrameBrowserTest, |
| 1078 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, | 1098 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, |
| 1079 content::SAVE_PAGE_TYPE_AS_MHTML)); | 1099 content::SAVE_PAGE_TYPE_AS_MHTML)); |
| 1080 | 1100 |
| 1081 } // namespace | 1101 } // namespace |
| OLD | NEW |