| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
| 8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/worker_host/worker_service.h" | 10 #include "chrome/browser/worker_host/worker_service.h" |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 ASSERT_TRUE(tab.get()); | 605 ASSERT_TRUE(tab.get()); |
| 606 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 606 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), |
| 607 FilePath(kWorkerClose)); | 607 FilePath(kWorkerClose)); |
| 608 ASSERT_TRUE(tab->NavigateToURL(url)); | 608 ASSERT_TRUE(tab->NavigateToURL(url)); |
| 609 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 609 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, |
| 610 kTestCompleteCookie, TestTimeouts::action_max_timeout_ms()); | 610 kTestCompleteCookie, TestTimeouts::action_max_timeout_ms()); |
| 611 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 611 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); |
| 612 ASSERT_TRUE(WaitForProcessCountToBe(1, 0)); | 612 ASSERT_TRUE(WaitForProcessCountToBe(1, 0)); |
| 613 } | 613 } |
| 614 | 614 |
| 615 TEST_F(WorkerTest, QueuedSharedWorkerShutdown) { | 615 // Flaky, http://crbug.com/. |
| 616 TEST_F(WorkerTest, FLAKY_QueuedSharedWorkerShutdown) { |
| 616 // Tests to make sure that queued shared workers are started up when | 617 // Tests to make sure that queued shared workers are started up when |
| 617 // shared workers shut down. | 618 // shared workers shut down. |
| 618 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; | 619 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; |
| 619 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 620 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), |
| 620 FilePath(kQuerySharedWorkerShutdownFile)); | 621 FilePath(kQuerySharedWorkerShutdownFile)); |
| 621 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); | 622 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); |
| 622 | 623 |
| 623 scoped_refptr<TabProxy> tab(GetActiveTab()); | 624 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 624 ASSERT_TRUE(tab.get()); | 625 ASSERT_TRUE(tab.get()); |
| 625 ASSERT_TRUE(tab->NavigateToURL(url)); | 626 ASSERT_TRUE(tab->NavigateToURL(url)); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); | 712 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); |
| 712 } | 713 } |
| 713 | 714 |
| 714 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { | 715 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { |
| 715 RunWorkerFileSystemLayoutTest("async-operations.html"); | 716 RunWorkerFileSystemLayoutTest("async-operations.html"); |
| 716 } | 717 } |
| 717 | 718 |
| 718 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { | 719 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { |
| 719 RunWorkerFileSystemLayoutTest("sync-operations.html"); | 720 RunWorkerFileSystemLayoutTest("sync-operations.html"); |
| 720 } | 721 } |
| OLD | NEW |