diff options
-rw-r--r-- | content/shell/common/webkit_test_helpers.cc | 29 | ||||
-rw-r--r-- | content/shell/common/webkit_test_helpers.h | 3 | ||||
-rw-r--r-- | content/shell/shell_content_browser_client.cc | 6 |
3 files changed, 5 insertions, 33 deletions
diff --git a/content/shell/common/webkit_test_helpers.cc b/content/shell/common/webkit_test_helpers.cc index 36e3da4..320eb4b 100644 --- a/content/shell/common/webkit_test_helpers.cc +++ b/content/shell/common/webkit_test_helpers.cc @@ -113,34 +113,7 @@ void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { base::FilePath GetWebKitRootDirFilePath() { base::FilePath base_path; PathService::Get(base::DIR_SOURCE_ROOT, &base_path); - if (base::PathExists( - base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")))) { - // We're in a WebKit-in-chrome checkout. - return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); - } else if (base::PathExists( - base_path.Append(FILE_PATH_LITERAL("chromium")))) { - // We're in a WebKit-only checkout on Windows. - return base_path.Append(FILE_PATH_LITERAL("../..")); - } else if (base::PathExists( - base_path.Append(FILE_PATH_LITERAL("webkit/support")))) { - // We're in a WebKit-only/xcodebuild checkout on Mac - return base_path.Append(FILE_PATH_LITERAL("../../..")); - } - // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the - // WebKit root. That, or we have no idea where we are. - return base_path; -} - -base::FilePath GetChromiumRootDirFilePath() { - base::FilePath webkit_path = GetWebKitRootDirFilePath(); - if (base::PathExists(webkit_path.Append( - FILE_PATH_LITERAL("Source/WebKit/chromium/webkit/support")))) { - // We're in a WebKit-only checkout. - return webkit_path.Append(FILE_PATH_LITERAL("Source/WebKit/chromium")); - } else { - // We're in a Chromium checkout, and WebKit is in third_party/WebKit. - return webkit_path.Append(FILE_PATH_LITERAL("../..")); - } + return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")); } } // namespace content diff --git a/content/shell/common/webkit_test_helpers.h b/content/shell/common/webkit_test_helpers.h index a171f2e..60cdce6 100644 --- a/content/shell/common/webkit_test_helpers.h +++ b/content/shell/common/webkit_test_helpers.h @@ -32,9 +32,6 @@ void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs); // Returns the root of the Blink checkout. base::FilePath GetWebKitRootDirFilePath(); -// Returns the root of the chromium checkout. -base::FilePath GetChromiumRootDirFilePath(); - } // namespace content #endif // CONTENT_SHELL_COMMON_WEBKIT_TEST_HELPERS_H_ diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc index af24c16..a08dac2 100644 --- a/content/shell/shell_content_browser_client.cc +++ b/content/shell/shell_content_browser_client.cc @@ -59,8 +59,10 @@ ShellContentBrowserClient::ShellContentBrowserClient() if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) return; webkit_source_dir_ = GetWebKitRootDirFilePath(); - base::FilePath dictionary_file_path = base::MakeAbsoluteFilePath( - GetChromiumRootDirFilePath().Append( + base::FilePath source_root_path; + PathService::Get(base::DIR_SOURCE_ROOT, &source_root_path); + base::FilePath dictionary_file_path = + base::MakeAbsoluteFilePath(source_root_path.Append( FILE_PATH_LITERAL("third_party/hyphen/hyph_en_US.dic"))); hyphen_dictionary_file_ = base::CreatePlatformFile(dictionary_file_path, base::PLATFORM_FILE_READ | |