OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
blundell
2015/02/06 08:25:31
Could you file a bug against cjhopman to move this
tfarina
2015/02/09 18:44:13
Done. https://crbug.com/456886
| |
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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 new user_prefs::TestingPrefServiceSyncable(); | 152 new user_prefs::TestingPrefServiceSyncable(); |
153 DistilledPagePrefs::RegisterProfilePrefs(pref_service->registry()); | 153 DistilledPagePrefs::RegisterProfilePrefs(pref_service->registry()); |
154 | 154 |
155 return scoped_ptr<DomDistillerService>(new DomDistillerService( | 155 return scoped_ptr<DomDistillerService>(new DomDistillerService( |
156 dom_distiller_store.Pass(), | 156 dom_distiller_store.Pass(), |
157 distiller_factory.Pass(), | 157 distiller_factory.Pass(), |
158 distiller_page_factory.Pass(), | 158 distiller_page_factory.Pass(), |
159 scoped_ptr<DistilledPagePrefs>(new DistilledPagePrefs(pref_service)))); | 159 scoped_ptr<DistilledPagePrefs>(new DistilledPagePrefs(pref_service)))); |
160 } | 160 } |
161 | 161 |
162 void AddComponentsResources() { | 162 void AddComponentsResources() { |
blundell
2015/02/06 08:25:31
s/AddComponentsResources/AddComponentsTestResource
tfarina
2015/02/09 18:44:13
Done.
| |
163 base::FilePath pak_file; | 163 base::FilePath pak_file; |
164 base::FilePath pak_dir; | 164 base::FilePath pak_dir; |
165 PathService::Get(base::DIR_MODULE, &pak_dir); | 165 PathService::Get(base::DIR_MODULE, &pak_dir); |
166 pak_file = pak_dir.Append(FILE_PATH_LITERAL("components_resources.pak")); | 166 pak_file = |
167 pak_dir.Append(FILE_PATH_LITERAL("components_tests_resources.pak")); | |
167 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 168 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
168 pak_file, ui::SCALE_FACTOR_NONE); | 169 pak_file, ui::SCALE_FACTOR_NONE); |
169 } | 170 } |
170 | 171 |
171 bool WriteProtobufWithSize( | 172 bool WriteProtobufWithSize( |
172 const google::protobuf::MessageLite& message, | 173 const google::protobuf::MessageLite& message, |
173 google::protobuf::io::ZeroCopyOutputStream* output_stream) { | 174 google::protobuf::io::ZeroCopyOutputStream* output_stream) { |
174 google::protobuf::io::CodedOutputStream coded_output(output_stream); | 175 google::protobuf::io::CodedOutputStream coded_output(output_stream); |
175 | 176 |
176 // Write the size. | 177 // Write the size. |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 std::string output_data_; | 410 std::string output_data_; |
410 scoped_ptr<google::protobuf::io::StringOutputStream> protobuf_output_stream_; | 411 scoped_ptr<google::protobuf::io::StringOutputStream> protobuf_output_stream_; |
411 }; | 412 }; |
412 | 413 |
413 IN_PROC_BROWSER_TEST_F(ContentExtractor, MANUAL_ExtractUrl) { | 414 IN_PROC_BROWSER_TEST_F(ContentExtractor, MANUAL_ExtractUrl) { |
414 Start(); | 415 Start(); |
415 base::RunLoop().Run(); | 416 base::RunLoop().Run(); |
416 } | 417 } |
417 | 418 |
418 } // namespace dom_distiller | 419 } // namespace dom_distiller |
OLD | NEW |