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 "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
7 #include "chrome/app/chrome_dll_resource.h" | 7 #include "chrome/app/chrome_dll_resource.h" |
8 #include "chrome/browser/worker_host/worker_service.h" | 8 #include "chrome/browser/worker_host/worker_service.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "chrome/test/automation/browser_proxy.h" | 10 #include "chrome/test/automation/browser_proxy.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 222 } |
223 | 223 |
224 TEST_F(WorkerTest, WorkerConstructor) { | 224 TEST_F(WorkerTest, WorkerConstructor) { |
225 RunWorkerFastLayoutTest("worker-constructor.html"); | 225 RunWorkerFastLayoutTest("worker-constructor.html"); |
226 } | 226 } |
227 | 227 |
228 TEST_F(WorkerTest, WorkerContextGc) { | 228 TEST_F(WorkerTest, WorkerContextGc) { |
229 RunWorkerFastLayoutTest("worker-context-gc.html"); | 229 RunWorkerFastLayoutTest("worker-context-gc.html"); |
230 } | 230 } |
231 | 231 |
232 // All kinds of crashes on Linux http://crbug.com/22898» | 232 // All kinds of crashes on Linux http://crbug.com/22898 |
233 #if defined(OS_LINUX)» | 233 #if defined(OS_LINUX) |
234 #define WorkerContextMultiPort DISABLED_WorkerContextMultiPort» | 234 #define WorkerContextMultiPort DISABLED_WorkerContextMultiPort |
235 #endif | 235 #endif |
236 | 236 |
237 TEST_F(WorkerTest, WorkerContextMultiPort) { | 237 TEST_F(WorkerTest, WorkerContextMultiPort) { |
238 RunWorkerFastLayoutTest("worker-context-multi-port.html"); | 238 RunWorkerFastLayoutTest("worker-context-multi-port.html"); |
239 } | 239 } |
240 | 240 |
241 TEST_F(WorkerTest, WorkerEventListener) { | 241 TEST_F(WorkerTest, WorkerEventListener) { |
242 RunWorkerFastLayoutTest("worker-event-listener.html"); | 242 RunWorkerFastLayoutTest("worker-event-listener.html"); |
243 } | 243 } |
244 | 244 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 ASSERT_TRUE(tab.get()); | 548 ASSERT_TRUE(tab.get()); |
549 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 549 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), |
550 FilePath(kWorkerClose)); | 550 FilePath(kWorkerClose)); |
551 ASSERT_TRUE(tab->NavigateToURL(url)); | 551 ASSERT_TRUE(tab->NavigateToURL(url)); |
552 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 552 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, |
553 kTestCompleteCookie, action_max_timeout_ms()); | 553 kTestCompleteCookie, action_max_timeout_ms()); |
554 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 554 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); |
555 ASSERT_TRUE(WaitForProcessCountToBe(1, 0)); | 555 ASSERT_TRUE(WaitForProcessCountToBe(1, 0)); |
556 } | 556 } |
557 | 557 |
558 TEST_F(WorkerTest, QueuedSharedWorkerShutdown) { | 558 // http://crbug.com/42641 |
| 559 TEST_F(WorkerTest, DISABLED_QueuedSharedWorkerShutdown) { |
559 // Tests to make sure that queued shared workers are started up when | 560 // Tests to make sure that queued shared workers are started up when |
560 // shared workers shut down. | 561 // shared workers shut down. |
561 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; | 562 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; |
562 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 563 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), |
563 FilePath(kQuerySharedWorkerShutdownFile)); | 564 FilePath(kQuerySharedWorkerShutdownFile)); |
564 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); | 565 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); |
565 | 566 |
566 scoped_refptr<TabProxy> tab(GetActiveTab()); | 567 scoped_refptr<TabProxy> tab(GetActiveTab()); |
567 ASSERT_TRUE(tab.get()); | 568 ASSERT_TRUE(tab.get()); |
568 ASSERT_TRUE(tab->NavigateToURL(url)); | 569 ASSERT_TRUE(tab->NavigateToURL(url)); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 628 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), |
628 FilePath(kSingleSharedWorkersFile)); | 629 FilePath(kSingleSharedWorkersFile)); |
629 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); | 630 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); |
630 ASSERT_TRUE(window->AppendTab(url2)); | 631 ASSERT_TRUE(window->AppendTab(url2)); |
631 | 632 |
632 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 633 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, |
633 kTestCompleteCookie, action_max_timeout_ms()); | 634 kTestCompleteCookie, action_max_timeout_ms()); |
634 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 635 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); |
635 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); | 636 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); |
636 } | 637 } |
OLD | NEW |