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

Unified Diff: base/scoped_native_library_unittest.cc

Issue 2048523002: Fix base::GetNativeLibraryName() for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_lib_clean
Patch Set: rebase Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: base/scoped_native_library_unittest.cc
diff --git a/base/scoped_native_library_unittest.cc b/base/scoped_native_library_unittest.cc
index 204aadb983e07cfe51ae8dd0f07d93690d31d84b..763b45f6c36ad45c4a255ef5e38fb9ffe5fe8f55 100644
--- a/base/scoped_native_library_unittest.cc
+++ b/base/scoped_native_library_unittest.cc
@@ -9,6 +9,7 @@
#if defined(OS_WIN)
#include "base/files/file_path.h"
+#include "base/strings/utf_string_conversions.h"
#endif
namespace base {
@@ -27,8 +28,8 @@ TEST(ScopedNativeLibrary, Basic) {
const char kFunctionName[] = "DirectDrawCreate";
NativeLibrary native_library;
{
- FilePath path(GetNativeLibraryName(L"ddraw"));
- native_library = LoadNativeLibrary(path, NULL);
+ FilePath path(FilePath::FromUTF8Unsafe(GetNativeLibraryName("ddraw")));
+ native_library = LoadNativeLibrary(path, nullptr);
ScopedNativeLibrary library(native_library);
EXPECT_TRUE(library.is_valid());
EXPECT_EQ(native_library, library.get());
@@ -39,8 +40,8 @@ TEST(ScopedNativeLibrary, Basic) {
GetFunctionPointerFromNativeLibrary(native_library, kFunctionName),
test_function);
}
- EXPECT_EQ(NULL,
- GetFunctionPointerFromNativeLibrary(native_library, kFunctionName));
+ EXPECT_FALSE(
+ GetFunctionPointerFromNativeLibrary(native_library, kFunctionName));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698