Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: chrome/browser/download/save_page_browsertest.cc

Issue 1441553002: Generating CIDs in Blink during MHTML serialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-per-frame-page-serializer-only
Patch Set: Fixing blink-gc (aka oilpan) integration. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 "frames-nested2.htm: 6d23dc47-f283-4977-96ec-66bcf72301a4", 1069 "frames-nested2.htm: 6d23dc47-f283-4977-96ec-66bcf72301a4",
1070 "b.htm: 3a35f7fa-96a9-4487-9f18-4470263907fa", 1070 "b.htm: 3a35f7fa-96a9-4487-9f18-4470263907fa",
1071 }; 1071 };
1072 1072
1073 GURL url( 1073 GURL url(
1074 embedded_test_server()->GetURL("a.com", "/save_page/frames-nested.htm")); 1074 embedded_test_server()->GetURL("a.com", "/save_page/frames-nested.htm"));
1075 1075
1076 TestMultiFramePage(save_page_type, url, 3, expected_substrings); 1076 TestMultiFramePage(save_page_type, url, 3, expected_substrings);
1077 } 1077 }
1078 1078
1079 // Test for crbug.com/106364 and crbug.com/538188.
1080 // Test frames have the same uri ...
1081 // subframe1 and subframe2 - both have src=b.htm
1082 // subframe3 and subframe4 - about:blank (no src, only srcdoc attribute).
1083 // ... but different content (generated by main frame's javascript).
1084 IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, RuntimeChanges) {
1085 content::SavePageType save_page_type = GetParam();
1086
1087 std::vector<std::string> expected_substrings{
dcheng 2015/12/02 22:43:26 Btw, using initializer lists isn't actually allowe
Łukasz Anforowicz 2015/12/02 23:23:54 :-( Done. (replaced initializer lists with array
1088 "frames-runtime-changes.htm: 4388232f-8d45-4d2e-9807-721b381be153",
1089 "subframe1: 21595339-61fc-4854-b6df-0668328ea263",
1090 "subframe2: adf55719-15e7-45be-9eda-d12fe782a1bd",
1091 "subframe3: 50e294bf-3a5b-499d-8772-651ead26952f",
1092 "subframe4: e0ea9289-7467-4d32-ba5c-c604e8d84cb7",
1093 };
1094
1095 // TODO(lukasza): crbug.com/106364: Fix complete-html mode as well.
1096 if (save_page_type == content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML)
1097 return;
1098
1099 GURL url(embedded_test_server()->GetURL(
1100 "a.com", "/save_page/frames-runtime-changes.htm?do_runtime_changes=1"));
1101
1102 TestMultiFramePage(save_page_type, url, 5, expected_substrings);
1103 }
1104
1079 INSTANTIATE_TEST_CASE_P( 1105 INSTANTIATE_TEST_CASE_P(
1080 , 1106 SaveType,
1081 SavePageMultiFrameBrowserTest, 1107 SavePageMultiFrameBrowserTest,
1082 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, 1108 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML,
1083 content::SAVE_PAGE_TYPE_AS_MHTML)); 1109 content::SAVE_PAGE_TYPE_AS_MHTML));
1084 1110
1085 } // namespace 1111 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698