| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/test/test_blink_web_unit_test_support.h" | 5 #include "content/test/test_blink_web_unit_test_support.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { | 174 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { |
| 175 return &mime_registry_; | 175 return &mime_registry_; |
| 176 } | 176 } |
| 177 | 177 |
| 178 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { | 178 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { |
| 179 return url_loader_factory_->CreateURLLoader( | 179 return url_loader_factory_->CreateURLLoader( |
| 180 BlinkPlatformImpl::createURLLoader()); | 180 BlinkPlatformImpl::createURLLoader()); |
| 181 } | 181 } |
| 182 | 182 |
| 183 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { | 183 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { |
| 184 return blink::WebString::fromUTF8("DumpRenderTree/0.0.0.0"); | 184 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); |
| 185 } | 185 } |
| 186 | 186 |
| 187 blink::WebData TestBlinkWebUnitTestSupport::loadResource(const char* name) { | 187 blink::WebData TestBlinkWebUnitTestSupport::loadResource(const char* name) { |
| 188 if (!strcmp(name, "deleteButton")) { | 188 if (!strcmp(name, "deleteButton")) { |
| 189 // Create a red 30x30 square. | 189 // Create a red 30x30 square. |
| 190 const char red_square[] = | 190 const char red_square[] = |
| 191 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52" | 191 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52" |
| 192 "\x00\x00\x00\x1e\x00\x00\x00\x1e\x04\x03\x00\x00\x00\xc9\x1e\xb3" | 192 "\x00\x00\x00\x1e\x00\x00\x00\x1e\x04\x03\x00\x00\x00\xc9\x1e\xb3" |
| 193 "\x91\x00\x00\x00\x30\x50\x4c\x54\x45\x00\x00\x00\x80\x00\x00\x00" | 193 "\x91\x00\x00\x00\x30\x50\x4c\x54\x45\x00\x00\x00\x80\x00\x00\x00" |
| 194 "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80" | 194 "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 base::MessageLoop::current()->Quit(); | 369 base::MessageLoop::current()->Quit(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void TestBlinkWebUnitTestSupport::getPluginList( | 372 void TestBlinkWebUnitTestSupport::getPluginList( |
| 373 bool refresh, blink::WebPluginListBuilder* builder) { | 373 bool refresh, blink::WebPluginListBuilder* builder) { |
| 374 builder->addPlugin("pdf", "pdf", "pdf-files"); | 374 builder->addPlugin("pdf", "pdf", "pdf-files"); |
| 375 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 375 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
| 376 } | 376 } |
| 377 | 377 |
| 378 } // namespace content | 378 } // namespace content |
| OLD | NEW |