Index: third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp |
diff --git a/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp b/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp |
index 6dc019faf1f46d191d072bd906a786711cf86051..c192ed121b74581d52f2d2f2b1df9cd576251c56 100644 |
--- a/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp |
+++ b/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp |
@@ -30,7 +30,9 @@ |
#include "base/message_loop/message_loop.h" |
#include "base/path_service.h" |
#include "platform/SharedBuffer.h" |
+#include "public/platform/FilePathConversion.h" |
#include "public/platform/Platform.h" |
+#include "public/platform/WebString.h" |
#include "public/platform/WebTaskRunner.h" |
#include "public/platform/WebThread.h" |
#include "public/platform/WebTraceLocation.h" |
@@ -65,11 +67,9 @@ String blinkRootDir() |
PassRefPtr<SharedBuffer> readFromFile(const String& path) |
{ |
- StringUTF8Adaptor utf8(path); |
- base::FilePath file_path = base::FilePath::FromUTF8Unsafe( |
- std::string(utf8.data(), utf8.length())); |
+ base::FilePath filePath = blink::WebStringToFilePath(path); |
std::string buffer; |
- base::ReadFileToString(file_path, &buffer); |
+ base::ReadFileToString(filePath, &buffer); |
return SharedBuffer::create(buffer.data(), buffer.size()); |
} |