| 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 17 matching lines...) Expand all Loading... |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 TEST_F(WorkerTest, SingleWorker) { | 30 TEST_F(WorkerTest, SingleWorker) { |
| 31 RunTest(L"single_worker.html"); | 31 RunTest(L"single_worker.html"); |
| 32 } | 32 } |
| 33 | 33 |
| 34 TEST_F(WorkerTest, MultipleWorkers) { | 34 TEST_F(WorkerTest, MultipleWorkers) { |
| 35 RunTest(L"multi_worker.html"); | 35 RunTest(L"multi_worker.html"); |
| 36 } | 36 } |
| 37 | 37 |
| 38 // WorkerFastLayoutTests works on the linux try servers, but fails on the | 38 // This fails on all platforms. Disable it for now. See http://crbug.com/22942 |
| 39 // build bots. | 39 TEST_F(WorkerTest, DISABLED_WorkerFastLayoutTests) { |
| 40 #if !defined(OS_LINUX) | |
| 41 TEST_F(WorkerTest, WorkerFastLayoutTests) { | |
| 42 static const char* kLayoutTestFiles[] = { | 40 static const char* kLayoutTestFiles[] = { |
| 43 "stress-js-execution.html", | 41 "stress-js-execution.html", |
| 44 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
| 45 // Workers don't properly initialize the V8 stack guard. | 43 // Workers don't properly initialize the V8 stack guard. |
| 46 // (http://code.google.com/p/chromium/issues/detail?id=21653). | 44 // (http://code.google.com/p/chromium/issues/detail?id=21653). |
| 47 "use-machine-stack.html", | 45 "use-machine-stack.html", |
| 48 #endif | 46 #endif |
| 49 "worker-call.html", | 47 "worker-call.html", |
| 50 // Disabled because cloning ports are too slow in Chromium to meet the | 48 // Disabled because cloning ports are too slow in Chromium to meet the |
| 51 // thresholds in this test. | 49 // thresholds in this test. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 81 |
| 84 // Worker tests also rely on common files in js/resources. | 82 // Worker tests also rely on common files in js/resources. |
| 85 FilePath js_dir = fast_test_dir.AppendASCII("js"); | 83 FilePath js_dir = fast_test_dir.AppendASCII("js"); |
| 86 FilePath resource_dir; | 84 FilePath resource_dir; |
| 87 resource_dir = resource_dir.AppendASCII("resources"); | 85 resource_dir = resource_dir.AppendASCII("resources"); |
| 88 AddResourceForLayoutTest(js_dir, resource_dir); | 86 AddResourceForLayoutTest(js_dir, resource_dir); |
| 89 | 87 |
| 90 for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) | 88 for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) |
| 91 RunLayoutTest(kLayoutTestFiles[i], false); | 89 RunLayoutTest(kLayoutTestFiles[i], false); |
| 92 } | 90 } |
| 93 #endif // !defined(OS_LINUX) | |
| 94 | 91 |
| 95 TEST_F(WorkerTest, WorkerHttpLayoutTests) { | 92 TEST_F(WorkerTest, WorkerHttpLayoutTests) { |
| 96 static const char* kLayoutTestFiles[] = { | 93 static const char* kLayoutTestFiles[] = { |
| 97 // flakey? BUG 16934 "text-encoding.html", | 94 // flakey? BUG 16934 "text-encoding.html", |
| 98 #if defined(OS_WIN) | 95 #if defined(OS_WIN) |
| 99 // Fails on the mac (and linux?): | 96 // Fails on the mac (and linux?): |
| 100 // http://code.google.com/p/chromium/issues/detail?id=22599 | 97 // http://code.google.com/p/chromium/issues/detail?id=22599 |
| 101 "worker-importScripts.html", | 98 "worker-importScripts.html", |
| 102 #endif | 99 #endif |
| 103 "worker-redirect.html", | 100 "worker-redirect.html", |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 UITest::GetBrowserProcessCount()); | 220 UITest::GetBrowserProcessCount()); |
| 224 | 221 |
| 225 // Now close the first tab and check that the queued workers were started. | 222 // Now close the first tab and check that the queued workers were started. |
| 226 tab->Close(true); | 223 tab->Close(true); |
| 227 tab->NavigateToURL(GetTestUrl(L"google", L"google.html")); | 224 tab->NavigateToURL(GetTestUrl(L"google", L"google.html")); |
| 228 | 225 |
| 229 EXPECT_EQ(total_workers + 1 + (UITest::in_process_renderer() ? 0 : tab_count), | 226 EXPECT_EQ(total_workers + 1 + (UITest::in_process_renderer() ? 0 : tab_count), |
| 230 UITest::GetBrowserProcessCount()); | 227 UITest::GetBrowserProcessCount()); |
| 231 } | 228 } |
| 232 #endif | 229 #endif |
| OLD | NEW |