diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 21:52:05 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-23 21:52:05 +0000 |
commit | 3109d4d0a3c01986637716ac23a2395ad97e8b5b (patch) | |
tree | 57889b5866e9d39f224abf5b8050169b20c2a963 | |
parent | 55274dd00164c1e7337fdefa16679d490f60f5d0 (diff) | |
download | chromium_src-3109d4d0a3c01986637716ac23a2395ad97e8b5b.zip chromium_src-3109d4d0a3c01986637716ac23a2395ad97e8b5b.tar.gz chromium_src-3109d4d0a3c01986637716ac23a2395ad97e8b5b.tar.bz2 |
ui/views: Fix some tests to use UI_TEST_PAK.
They were reverted in https://src.chromium.org/viewvc/chrome?view=rev&revision=270360,
because they broke interactive_ui_tests.
By calling ui::RegisterPathProvider() in the right order we were able to fix this and
get back to using UI_TEST_PAK, which is cleaner.
BUG=None
TEST=interactive_ui_tests
R=tony@chromium.org
Review URL: https://codereview.chromium.org/338533003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279186 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/views/corewm/desktop_capture_controller_unittest.cc | 9 | ||||
-rw-r--r-- | ui/views/widget/widget_interactive_uitest.cc | 18 |
2 files changed, 12 insertions, 15 deletions
diff --git a/ui/views/corewm/desktop_capture_controller_unittest.cc b/ui/views/corewm/desktop_capture_controller_unittest.cc index 8807aafd..575c151 100644 --- a/ui/views/corewm/desktop_capture_controller_unittest.cc +++ b/ui/views/corewm/desktop_capture_controller_unittest.cc @@ -34,11 +34,10 @@ class DesktopCaptureControllerTest : public ViewsTestBase { virtual void SetUp() OVERRIDE { gfx::GLSurface::InitializeOneOffForTests(); - base::FilePath pak_dir; - PathService::Get(base::DIR_MODULE, &pak_dir); - base::FilePath pak_file; - pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); - ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); + ui::RegisterPathProvider(); + base::FilePath ui_test_pak_path; + ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); + ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); ViewsTestBase::SetUp(); } diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc index 45026a9..cf1eeb7 100644 --- a/ui/views/widget/widget_interactive_uitest.cc +++ b/ui/views/widget/widget_interactive_uitest.cc @@ -162,11 +162,10 @@ class WidgetTestInteractive : public WidgetTest { virtual void SetUp() OVERRIDE { gfx::GLSurface::InitializeOneOffForTests(); - base::FilePath pak_dir; - PathService::Get(base::DIR_MODULE, &pak_dir); - base::FilePath pak_file; - pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); - ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); + ui::RegisterPathProvider(); + base::FilePath ui_test_pak_path; + ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); + ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); WidgetTest::SetUp(); } @@ -815,11 +814,10 @@ class WidgetCaptureTest : public ViewsTestBase { virtual void SetUp() OVERRIDE { gfx::GLSurface::InitializeOneOffForTests(); - base::FilePath pak_dir; - PathService::Get(base::DIR_MODULE, &pak_dir); - base::FilePath pak_file; - pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); - ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); + ui::RegisterPathProvider(); + base::FilePath ui_test_pak_path; + ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); + ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); ViewsTestBase::SetUp(); } |