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

Unified Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 289873007: Update pdf browser tests to use test data from new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | « .gitignore ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/pdf/pdf_browsertest.cc
===================================================================
--- chrome/browser/ui/pdf/pdf_browsertest.cc (revision 271076)
+++ chrome/browser/ui/pdf/pdf_browsertest.cc (working copy)
@@ -51,7 +51,8 @@
load_stop_notification_count_(0) {
base::FilePath src_dir;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &src_dir));
- pdf_test_server_.ServeFilesFromDirectory(src_dir.AppendASCII("pdf/test"));
+ pdf_test_server_.ServeFilesFromDirectory(src_dir.AppendASCII(
+ "chrome/test/data/pdf_private"));
}
protected:
@@ -64,12 +65,6 @@
return load_stop_notification_count_;
}
- base::FilePath GetPDFTestDir() {
- return base::FilePath(base::FilePath::kCurrentDirectory).AppendASCII("..").
- AppendASCII("..").AppendASCII("..").AppendASCII("pdf").
- AppendASCII("test");
- }
-
void Load() {
// Make sure to set the window size before rendering, as otherwise rendering
// to a smaller window and then expanding leads to slight anti-aliasing
@@ -82,7 +77,7 @@
browser()->window()->SetBounds(bounds);
GURL url(ui_test_utils::GetTestUrl(
- GetPDFTestDir(),
+ base::FilePath(FILE_PATH_LITERAL("pdf_private")),
base::FilePath(FILE_PATH_LITERAL("pdf_browsertest.pdf"))));
ui_test_utils::NavigateToURL(browser(), url);
}
@@ -133,7 +128,7 @@
base::MessageLoopForUI::current()->Quit();
ASSERT_EQ(success, true);
base::FilePath reference = ui_test_utils::GetTestFilePath(
- GetPDFTestDir(),
+ base::FilePath(FILE_PATH_LITERAL("pdf_private")),
base::FilePath().AppendASCII(expected_filename_));
base::File::Info info;
ASSERT_TRUE(base::GetFileInfo(reference, &info));
@@ -319,7 +314,8 @@
std::string base_url = std::string("/");
base::FileEnumerator file_enumerator(
- ui_test_utils::GetTestFilePath(GetPDFTestDir(), base::FilePath()),
+ ui_test_utils::GetTestFilePath(
+ base::FilePath(FILE_PATH_LITERAL("pdf_private")), base::FilePath()),
false,
base::FileEnumerator::FILES,
FILE_PATH_LITERAL("*.pdf"));
« no previous file with comments | « .gitignore ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698