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

Unified Diff: chrome/worker/worker_uitest.cc

Issue 159429: Enable layout tests: worker-constructor.html and worker-script-error.html.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/workers/use-machine-stack-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/worker/worker_uitest.cc
===================================================================
--- chrome/worker/worker_uitest.cc (revision 21664)
+++ chrome/worker/worker_uitest.cc (working copy)
@@ -55,6 +55,7 @@
FilePath new_http_root_dir_;
FilePath new_layout_test_dir_;
FilePath rebase_result_dir_;
+ FilePath rebase_result_win_dir_;
std::string layout_test_controller_;
};
@@ -117,17 +118,16 @@
// If not found, try to use the original copy of WebKit layout tests for
// workers. For testing only in local machine only.
- // webkit/data/layout_tests/LayoutTests/.../workers
+ // third_party/LayoutTests/.../workers
if (!file_util::DirectoryExists(layout_test_dir_)) {
- layout_test_dir_ = src_dir.AppendASCII("webkit");
- layout_test_dir_ = layout_test_dir_.AppendASCII("data");
- layout_test_dir_ = layout_test_dir_.AppendASCII("layout_tests");
+ layout_test_dir_ = src_dir.AppendASCII("third_party");
layout_test_dir_ = layout_test_dir_.Append(test_parent_dir);
layout_test_dir_ = layout_test_dir_.Append(test_case_dir);
ASSERT_TRUE(file_util::DirectoryExists(layout_test_dir_));
}
- // Gets the file path to rebased expected result directory for workers.
+ // Gets the file path to rebased expected result directory for workers for
+ // current platform.
// webkit/data/layout_tests/platform/chromium_***/LayoutTests/.../workers
rebase_result_dir_ = src_dir.AppendASCII("webkit");
rebase_result_dir_ = rebase_result_dir_.AppendASCII("data");
@@ -137,6 +137,19 @@
rebase_result_dir_ = rebase_result_dir_.Append(test_parent_dir);
rebase_result_dir_ = rebase_result_dir_.Append(test_case_dir);
+ // Gets the file path to rebased expected result directory for workers under
+ // win32 platform. This is used by other non-win32 platform to use the same
+ // rebased expected results.
+#if !defined(OS_WIN)
+ rebase_result_win_dir_ = src_dir.AppendASCII("webkit");
+ rebase_result_win_dir_ = rebase_result_win_dir_.AppendASCII("data");
+ rebase_result_win_dir_ = rebase_result_win_dir_.AppendASCII("layout_tests");
+ rebase_result_win_dir_ = rebase_result_win_dir_.AppendASCII("platform");
+ rebase_result_win_dir_ = rebase_result_win_dir_.AppendASCII("chromium-win");
+ rebase_result_win_dir_ = rebase_result_win_dir_.Append(test_parent_dir);
+ rebase_result_win_dir_ = rebase_result_win_dir_.Append(test_case_dir);
+#endif
+
// Creates the temporary directory.
ASSERT_TRUE(file_util::CreateNewTempDirectory(
FILE_PATH_LITERAL("chrome_worker_test_"), &temp_test_dir_));
@@ -244,10 +257,15 @@
std::string expected_result_value;
if (!ReadExpectedResult(rebase_result_dir_,
test_case_file_name,
- &expected_result_value))
- ReadExpectedResult(layout_test_dir_,
- test_case_file_name,
- &expected_result_value);
+ &expected_result_value)) {
+ if (rebase_result_win_dir_.empty() ||
+ !ReadExpectedResult(rebase_result_win_dir_,
+ test_case_file_name,
+ &expected_result_value))
levin 2009/07/28 00:59:05 indent off.
+ ReadExpectedResult(layout_test_dir_,
+ test_case_file_name,
+ &expected_result_value);
+ }
ASSERT_TRUE(!expected_result_value.empty());
// Normalizes the expected result.
@@ -283,7 +301,7 @@
"stress-js-execution.html",
"use-machine-stack.html",
"worker-close.html",
- //"worker-constructor.html",
+ "worker-constructor.html",
"worker-context-gc.html",
"worker-event-listener.html",
"worker-gc.html",
@@ -291,6 +309,7 @@
"worker-navigator.html",
"worker-replace-global-constructor.html",
"worker-replace-self.html",
+ "worker-script-error.html",
"worker-terminate.html",
"worker-timeout.html"
};
« no previous file with comments | « no previous file | webkit/data/layout_tests/platform/chromium-mac/LayoutTests/fast/workers/use-machine-stack-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698