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

Unified Diff: chrome/test/ui/ui_layout_test.cc

Issue 232001: Resubmitting fix for 22174 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/test/ui/ui_layout_test.h ('k') | chrome/worker/worker_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_layout_test.cc
===================================================================
--- chrome/test/ui/ui_layout_test.cc (revision 26930)
+++ chrome/test/ui/ui_layout_test.cc (working copy)
@@ -142,6 +142,25 @@
ASSERT_TRUE(file_util::ReadFileToString(path, &layout_test_controller_));
}
+void UILayoutTest::AddResourceForLayoutTest(const FilePath& parent_dir,
+ const FilePath& resource_dir) {
+ FilePath root_dir;
+ PathService::Get(base::DIR_SOURCE_ROOT, &root_dir);
+
+ FilePath src_dir = root_dir.AppendASCII("chrome");
+ src_dir = src_dir.AppendASCII("test");
+ src_dir = src_dir.AppendASCII("data");
+ src_dir = src_dir.AppendASCII("layout_tests");
+ src_dir = src_dir.Append(parent_dir);
+ src_dir = src_dir.Append(resource_dir);
+ ASSERT_TRUE(file_util::DirectoryExists(src_dir));
+
+ FilePath dest_parent_dir = temp_test_dir_.Append(parent_dir);
+ ASSERT_TRUE(file_util::CreateDirectory(dest_parent_dir));
+ FilePath dest_dir = dest_parent_dir.Append(resource_dir);
+ ASSERT_TRUE(file_util::CopyDirectory(src_dir, dest_dir, true));
+}
+
void UILayoutTest::RunLayoutTest(const std::string& test_case_file_name,
bool is_http_test) {
SCOPED_TRACE(test_case_file_name.c_str());
« no previous file with comments | « chrome/test/ui/ui_layout_test.h ('k') | chrome/worker/worker_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698