| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/worker_host/worker_service.h" | 5 #include "chrome/browser/worker_host/worker_service.h" |
| 6 #include "chrome/test/automation/browser_proxy.h" | 6 #include "chrome/test/automation/browser_proxy.h" |
| 7 #include "chrome/test/automation/tab_proxy.h" | 7 #include "chrome/test/automation/tab_proxy.h" |
| 8 #include "chrome/test/ui/ui_layout_test.h" | 8 #include "chrome/test/ui/ui_layout_test.h" |
| 9 | 9 |
| 10 static const char kTestCompleteCookie[] = "status"; | 10 static const char kTestCompleteCookie[] = "status"; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 TEST_F(WorkerTest, MultipleWorkers) { | 40 TEST_F(WorkerTest, MultipleWorkers) { |
| 41 RunTest(L"multi_worker.html"); | 41 RunTest(L"multi_worker.html"); |
| 42 } | 42 } |
| 43 | 43 |
| 44 // WorkerFastLayoutTests works on the linux try servers, but fails on the | 44 // WorkerFastLayoutTests works on the linux try servers, but fails on the |
| 45 // build bots and fails on mac valgrind. | 45 // build bots and fails on mac valgrind. |
| 46 #if !defined(OS_WIN) | 46 #if !defined(OS_WIN) |
| 47 #define WorkerFastLayoutTests DISABLED_WorkerFastLayoutTests | 47 #define WorkerFastLayoutTests DISABLED_WorkerFastLayoutTests |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 // WorkerFastLayoutTests failed on all platforms since r27553. | 50 TEST_F(WorkerTest, WorkerFastLayoutTests) { |
| 51 // http://crbug.com/23391 | |
| 52 TEST_F(WorkerTest, DISABLED_WorkerFastLayoutTests) { | |
| 53 static const char* kLayoutTestFiles[] = { | 51 static const char* kLayoutTestFiles[] = { |
| 54 "stress-js-execution.html", | 52 "stress-js-execution.html", |
| 55 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 56 // Workers don't properly initialize the V8 stack guard. | 54 // Workers don't properly initialize the V8 stack guard. |
| 57 // (http://code.google.com/p/chromium/issues/detail?id=21653). | 55 // (http://code.google.com/p/chromium/issues/detail?id=21653). |
| 58 "use-machine-stack.html", | 56 "use-machine-stack.html", |
| 59 #endif | 57 #endif |
| 60 "worker-call.html", | 58 "worker-call.html", |
| 61 // Disabled because cloning ports are too slow in Chromium to meet the | 59 // Disabled because cloning ports are too slow in Chromium to meet the |
| 62 // thresholds in this test. | 60 // thresholds in this test. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 73 // which is not currently implemented. | 71 // which is not currently implemented. |
| 74 // "worker-lifecycle.html", | 72 // "worker-lifecycle.html", |
| 75 "worker-location.html", | 73 "worker-location.html", |
| 76 "worker-messageport.html", | 74 "worker-messageport.html", |
| 77 // Disabled after r27089 (WebKit merge), http://crbug.com/22947 | 75 // Disabled after r27089 (WebKit merge), http://crbug.com/22947 |
| 78 // "worker-messageport-gc.html", | 76 // "worker-messageport-gc.html", |
| 79 "worker-multi-port.html", | 77 "worker-multi-port.html", |
| 80 "worker-navigator.html", | 78 "worker-navigator.html", |
| 81 "worker-replace-global-constructor.html", | 79 "worker-replace-global-constructor.html", |
| 82 "worker-replace-self.html", | 80 "worker-replace-self.html", |
| 83 "worker-script-error.html", | 81 // Disabled afer r27553 (WebKit merge), http://crbug.com/23391 |
| 82 // "worker-script-error.html", |
| 84 "worker-terminate.html", | 83 "worker-terminate.html", |
| 85 "worker-timeout.html" | 84 "worker-timeout.html" |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 FilePath fast_test_dir; | 87 FilePath fast_test_dir; |
| 89 fast_test_dir = fast_test_dir.AppendASCII("LayoutTests"); | 88 fast_test_dir = fast_test_dir.AppendASCII("LayoutTests"); |
| 90 fast_test_dir = fast_test_dir.AppendASCII("fast"); | 89 fast_test_dir = fast_test_dir.AppendASCII("fast"); |
| 91 | 90 |
| 92 FilePath worker_test_dir; | 91 FilePath worker_test_dir; |
| 93 worker_test_dir = worker_test_dir.AppendASCII("workers"); | 92 worker_test_dir = worker_test_dir.AppendASCII("workers"); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Check that we didn't create more than the max number of workers. | 238 // Check that we didn't create more than the max number of workers. |
| 240 EXPECT_EQ(total_workers + number_of_processes, | 239 EXPECT_EQ(total_workers + number_of_processes, |
| 241 UITest::GetBrowserProcessCount()); | 240 UITest::GetBrowserProcessCount()); |
| 242 | 241 |
| 243 // Now close a page and check that the queued workers were started. | 242 // Now close a page and check that the queued workers were started. |
| 244 tab->NavigateToURL(GetTestUrl(L"google", L"google.html")); | 243 tab->NavigateToURL(GetTestUrl(L"google", L"google.html")); |
| 245 | 244 |
| 246 EXPECT_EQ(total_workers + number_of_processes, | 245 EXPECT_EQ(total_workers + number_of_processes, |
| 247 UITest::GetBrowserProcessCount()); | 246 UITest::GetBrowserProcessCount()); |
| 248 } | 247 } |
| OLD | NEW |