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

Unified Diff: content/worker/worker_uitest.cc

Issue 6727001: Run the Worker tests for resolveLocalFileSystemURL that were added (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
« chrome/test/ui/ui_layout_test.cc ('K') | « chrome/test/ui/ui_layout_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/worker_uitest.cc
diff --git a/content/worker/worker_uitest.cc b/content/worker/worker_uitest.cc
index 56d8c4759d5ca8bc096bc19e602bf8a4b9a7c4d6..0e7c8d91212444f2c27608f45865108aa6b295f5 100644
--- a/content/worker/worker_uitest.cc
+++ b/content/worker/worker_uitest.cc
@@ -713,6 +713,37 @@ class WorkerFileSystemTest : public WorkerTest {
GURL about_url(chrome::kAboutBlankURL);
EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(about_url));
}
+
+ void RunWorkerFileSystemLayoutHttpTests(const char* tests[], int num_tests) {
+ FilePath worker_test_dir = FilePath().AppendASCII("http")
+ .AppendASCII("tests");
+
+ FilePath filesystem_test_dir = FilePath().AppendASCII("filesystem")
+ .AppendASCII("workers");
+ InitializeForLayoutTest(worker_test_dir, filesystem_test_dir, kHttpPort);
+
+ AddResourceForLayoutTest(worker_test_dir.AppendASCII("filesystem"),
+ FilePath().AppendASCII("resources"));
+
+ AddResourceForLayoutTest(worker_test_dir.AppendASCII("filesystem"),
+ FilePath().AppendASCII("script-tests"));
+
+ AddResourceForLayoutTest(worker_test_dir.AppendASCII("filesystem"),
+ FilePath().AppendASCII("workers")
+ .AppendASCII("script-tests"));
+
+ StartHttpServer(new_http_root_dir_);
+ for (int i = 0; i < num_tests; ++i)
+ RunLayoutTest(tests[i], 8000);
michaeln 2011/03/22 21:32:50 should 8000 by UILayoutTest::kHttpPort?
adamk 2011/03/22 21:41:00 I don't think so, because 8000 seems to be NRWT's
+ StopHttpServer();
+
+ // Navigate to a blank page so that any workers are cleaned up.
+ // This helps leaks trackers do a better job of reporting.
+ scoped_refptr<TabProxy> tab(GetActiveTab());
+ ASSERT_TRUE(tab.get());
+ GURL about_url(chrome::kAboutBlankURL);
+ EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(about_url));
+ }
};
TEST_F(WorkerFileSystemTest, Temporary) {
@@ -743,6 +774,14 @@ TEST_F(WorkerFileSystemTest, FileEntryToURISync) {
RunWorkerFileSystemLayoutTest("file-entry-to-uri-sync.html");
}
+TEST_F(WorkerFileSystemTest, ResolveURLHttpTests) {
+ static const char* kLayoutTests[] = {
+ "resolve-url.html",
+ "resolve-url-sync.html"
+ };
+ RunWorkerFileSystemLayoutHttpTests(kLayoutTests, arraysize(kLayoutTests));
+}
+
#if defined(OS_LINUX)
// These tests fail on Linux due to an assert in WebKit's RNG.
// See http://webkit.org/b/55728.
« chrome/test/ui/ui_layout_test.cc ('K') | « chrome/test/ui/ui_layout_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698