Commit eec38b99 authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

Adding tests for SelectFileDialog on Windows

Bug: 884075
Change-Id: I85829ee1e898296013c4ead98d4b9b39121a49d6
Reviewed-on: https://chromium-review.googlesource.com/c/1265121Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599264}
parent db9d5df6
......@@ -120,4 +120,8 @@ test("shell_dialogs_unittests") {
if (is_mac) {
deps += [ ":shell_dialogs_unittests_bundle" ]
}
if (is_win) {
deps += [ "//ui/strings:ui_strings_grit" ]
}
}
......@@ -4,17 +4,18 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/path_service.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "build/build_config.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#if defined(OS_MACOSX)
#include "base/files/file_path.h"
#include "base/mac/bundle_locations.h"
#include "base/path_service.h"
#include "base/test/mock_chrome_application_mac.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
#endif
namespace {
......@@ -47,17 +48,19 @@ void ShellDialogsTestSuite::Initialize() {
path = path.Append(
FILE_PATH_LITERAL("shell_dialogs_unittests_bundle.framework"));
base::mac::SetOverrideFrameworkBundlePath(path);
#endif
// Setup resource bundle.
ui::MaterialDesignController::Initialize();
ui::RegisterPathProvider();
ui::ResourceBundle::InitSharedInstanceWithLocale(
"en-US", nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
#endif
}
void ShellDialogsTestSuite::Shutdown() {
#if defined(OS_MACOSX)
ui::ResourceBundle::CleanupSharedInstance();
#if defined(OS_MACOSX)
base::mac::SetOverrideFrameworkBundle(NULL);
#endif
base::TestSuite::Shutdown();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment