Index: content/browser/worker_host/test/worker_browsertest.cc |
diff --git a/content/browser/worker_host/test/worker_browsertest.cc b/content/browser/worker_host/test/worker_browsertest.cc |
index c4c17121e681d0732431c05bf8f54e0ab8415b8d..a7dbf87843a5dd424d5113f3face717f1095647b 100644 |
--- a/content/browser/worker_host/test/worker_browsertest.cc |
+++ b/content/browser/worker_host/test/worker_browsertest.cc |
@@ -20,218 +20,14 @@ |
#include "content/shell/shell.h" |
#include "content/shell/shell_content_browser_client.h" |
#include "content/shell/shell_resource_dispatcher_host_delegate.h" |
+#include "content/test/content_browser_test.h" |
#include "content/test/content_browser_test_utils.h" |
-#include "content/test/layout_browsertest.h" |
#include "googleurl/src/gurl.h" |
#include "net/base/test_data_directory.h" |
#include "net/test/spawned_test_server/spawned_test_server.h" |
namespace content { |
-class WorkerLayoutTest : public InProcessBrowserLayoutTest { |
- public: |
- WorkerLayoutTest() : InProcessBrowserLayoutTest( |
- base::FilePath(), |
- base::FilePath().AppendASCII("fast").AppendASCII("workers")) { |
- } |
-}; |
- |
-// Crashy, http://crbug.com/35965. |
-// Flaky, http://crbug.com/36555. |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, DISABLED_WorkerClonePort) { |
- RunLayoutTest("worker-cloneport.html"); |
-} |
- |
-// http://crbug.com/101996 (started flaking with WebKit roll 98537:98582). |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerContextMultiPort) { |
- RunLayoutTest("worker-context-multi-port.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerMessagePort) { |
- RunLayoutTest("worker-messageport.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerMessagePortGC) { |
- RunLayoutTest("worker-messageport-gc.html"); |
-} |
- |
-// http://crbug.com/101996 (started flaking with WebKit roll 98537:98582). |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerMultiPort) { |
- RunLayoutTest("worker-multi-port.html"); |
-} |
- |
-// |
-// SharedWorkerFastLayoutTests |
-// |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastConstructor) { |
- RunLayoutTest("shared-worker-constructor.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastContextGC) { |
- RunLayoutTest("shared-worker-context-gc.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastEventListener) { |
- RunLayoutTest("shared-worker-event-listener.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastException) { |
- RunLayoutTest("shared-worker-exception.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastGC) { |
- RunLayoutTest("shared-worker-gc.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastInIframe) { |
- RunLayoutTest("shared-worker-in-iframe.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastLoadError) { |
- RunLayoutTest("shared-worker-load-error.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastLocation) { |
- RunLayoutTest("shared-worker-location.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastName) { |
- RunLayoutTest("shared-worker-name.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastNavigator) { |
- RunLayoutTest("shared-worker-navigator.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, |
- SharedWorkerFastReplaceGlobalConstructor) { |
- RunLayoutTest("shared-worker-replace-global-constructor.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastReplaceSelf) { |
- RunLayoutTest("shared-worker-replace-self.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastScriptError) { |
- RunLayoutTest("shared-worker-script-error.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastShared) { |
- RunLayoutTest("shared-worker-shared.html"); |
-} |
- |
-IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, SharedWorkerFastSimple) { |
- RunLayoutTest("shared-worker-simple.html"); |
-} |
- |
-class MessagePortTest : public InProcessBrowserLayoutTest { |
- public: |
- MessagePortTest() : InProcessBrowserLayoutTest( |
- base::FilePath(), |
- base::FilePath().AppendASCII("fast").AppendASCII("events")) { |
- } |
-}; |
- |
-// Flaky, http://crbug.com/34996. |
-IN_PROC_BROWSER_TEST_F(MessagePortTest, Tests) { |
- static const char* kLayoutTestFiles[] = { |
- "message-channel-gc.html", |
- "message-channel-gc-2.html", |
- "message-channel-gc-3.html", |
- "message-channel-gc-4.html", |
- "message-port.html", |
- "message-port-clone.html", |
- "message-port-constructor-for-deleted-document.html", |
- "message-port-deleted-document.html", |
- "message-port-deleted-frame.html", |
- "message-port-inactive-document.html", |
- "message-port-multi.html", |
- "message-port-no-wrapper.html", |
- // Only works with run-webkit-tests --leaks. |
- // "message-channel-listener-circular-ownership.html", |
- }; |
- |
- for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) |
- RunLayoutTest(kLayoutTestFiles[i]); |
-} |
- |
- |
-class WorkerHttpLayoutTest : public InProcessBrowserLayoutTest { |
- public: |
- // The resources for these tests hardcode 8000, so must use that here. If |
- // multiple tests which use it run in parallel, then the test will fail but |
- // it'll run again at the end in serial and pass. |
- WorkerHttpLayoutTest() : InProcessBrowserLayoutTest( |
- base::FilePath().AppendASCII("http").AppendASCII("tests"), |
- base::FilePath().AppendASCII("workers"), |
- 8000) { |
- } |
-}; |
- |
-// http://crbug.com/16934 |
-IN_PROC_BROWSER_TEST_F(WorkerHttpLayoutTest, DISABLED_Tests) { |
- static const char* kLayoutTestFiles[] = { |
- "shared-worker-importScripts.html", |
- "shared-worker-redirect.html", |
- "text-encoding.html", |
-#if defined(OS_WIN) |
- // Fails on the mac (and linux?): |
- // http://code.google.com/p/chromium/issues/detail?id=22599 |
- "worker-importScripts.html", |
-#endif |
- "worker-redirect.html", |
- }; |
- |
- for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) |
- RunHttpLayoutTest(kLayoutTestFiles[i]); |
-} |
- |
-class WorkerXHRHttpLayoutTest : public InProcessBrowserLayoutTest { |
- public: |
- WorkerXHRHttpLayoutTest() : InProcessBrowserLayoutTest( |
- base::FilePath().AppendASCII("http").AppendASCII("tests"), |
- base::FilePath().AppendASCII("xmlhttprequest").AppendASCII("workers"), |
- -1) { |
- } |
-}; |
- |
-// TestRunner appears to be broken on Windows. See http://crbug.com/177798 |
-// WorkerXHRHttpLayoutTest.Tests also crash under AddressSanitizer on Linux. |
-// See http://crbug.com/242447. |
-#if defined(OS_WIN) || defined(ADDRESS_SANITIZER) |
-#define MAYBE_Tests DISABLED_Tests |
-#else |
-#define MAYBE_Tests Tests |
-#endif |
-IN_PROC_BROWSER_TEST_F(WorkerXHRHttpLayoutTest, MAYBE_Tests) { |
- static const char* kLayoutTestFiles[] = { |
- // worker thread count never drops to zero. |
- // http://crbug.com/150565 |
- // "abort-exception-assert.html", |
-#if defined(OS_WIN) |
- // Fails on the mac (and linux?): |
- // http://code.google.com/p/chromium/issues/detail?id=22599 |
- "close.html", |
-#endif |
- // These tests (and the shared-worker versions below) are disabled due to |
- // limitations in lighttpd (doesn't handle all of the HTTP methods). |
- // "methods-async.html", |
- // "methods.html", |
- |
- "shared-worker-close.html", |
- // Disabled due to limitations in lighttpd (does not handle methods other |
- // than GET/PUT/POST). |
- // "shared-worker-methods-async.html", |
- // "shared-worker-methods.html", |
- "shared-worker-xhr-file-not-found.html", |
- |
- "xmlhttprequest-file-not-found.html" |
- }; |
- |
- for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) |
- RunHttpLayoutTest(kLayoutTestFiles[i]); |
-} |
- |
class WorkerTest : public ContentBrowserTest { |
public: |
WorkerTest() {} |