OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 PassRefPtr<SharedBuffer> serialize(const char *title, const char *mime, MHT
MLArchive::EncodingPolicy encodingPolicy) | 161 PassRefPtr<SharedBuffer> serialize(const char *title, const char *mime, MHT
MLArchive::EncodingPolicy encodingPolicy) |
162 { | 162 { |
163 return generateMHTMLData(m_resources, encodingPolicy, title, mime); | 163 return generateMHTMLData(m_resources, encodingPolicy, title, mime); |
164 } | 164 } |
165 | 165 |
166 private: | 166 private: |
167 PassRefPtr<SharedBuffer> readFile(const char* fileName) | 167 PassRefPtr<SharedBuffer> readFile(const char* fileName) |
168 { | 168 { |
169 String filePath = m_filePath + fileName; | 169 String filePath = m_filePath + fileName; |
170 return Platform::current()->unitTestSupport()->readFromFile(filePath); | 170 return testing::readFromFile(filePath); |
171 } | 171 } |
172 | 172 |
173 String m_filePath; | 173 String m_filePath; |
174 Vector<SerializedResource> m_resources; | 174 Vector<SerializedResource> m_resources; |
175 FrameTestHelpers::WebViewHelper m_helper; | 175 FrameTestHelpers::WebViewHelper m_helper; |
176 }; | 176 }; |
177 | 177 |
178 // Checks that the domain is set to the actual MHTML file, not the URL it was | 178 // Checks that the domain is set to the actual MHTML file, not the URL it was |
179 // generated from. | 179 // generated from. |
180 TEST_F(MHTMLTest, CheckDomain) | 180 TEST_F(MHTMLTest, CheckDomain) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 ASSERT_TRUE(expectedEncoding); | 226 ASSERT_TRUE(expectedEncoding); |
227 EXPECT_NE(line.find(expectedEncoding), std::string::npos); | 227 EXPECT_NE(line.find(expectedEncoding), std::string::npos); |
228 expectedEncoding = 0; | 228 expectedEncoding = 0; |
229 sectionCheckedCount++; | 229 sectionCheckedCount++; |
230 } | 230 } |
231 } | 231 } |
232 EXPECT_EQ(12, sectionCheckedCount); | 232 EXPECT_EQ(12, sectionCheckedCount); |
233 } | 233 } |
234 | 234 |
235 } // namespace blink | 235 } // namespace blink |
OLD | NEW |