| 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_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.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/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 622 |
| 623 scoped_refptr<TabProxy> tab(GetActiveTab()); | 623 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 624 ASSERT_TRUE(tab.get()); | 624 ASSERT_TRUE(tab.get()); |
| 625 ASSERT_TRUE(tab->NavigateToURL(url)); | 625 ASSERT_TRUE(tab->NavigateToURL(url)); |
| 626 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 626 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, |
| 627 kTestCompleteCookie, action_max_timeout_ms()); | 627 kTestCompleteCookie, action_max_timeout_ms()); |
| 628 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 628 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); |
| 629 ASSERT_TRUE(WaitForProcessCountToBe(1, max_workers_per_tab)); | 629 ASSERT_TRUE(WaitForProcessCountToBe(1, max_workers_per_tab)); |
| 630 } | 630 } |
| 631 | 631 |
| 632 // Flaky, http://crbug.com/35221. | 632 TEST_F(WorkerTest, MultipleTabsQueuedSharedWorker) { |
| 633 TEST_F(WorkerTest, FLAKY_MultipleTabsQueuedSharedWorker) { | |
| 634 // Tests to make sure that only one instance of queued shared workers are | 633 // Tests to make sure that only one instance of queued shared workers are |
| 635 // started up even when those instances are on multiple tabs. | 634 // started up even when those instances are on multiple tabs. |
| 636 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; | 635 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; |
| 637 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 636 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), |
| 638 FilePath(kManySharedWorkersFile)); | 637 FilePath(kManySharedWorkersFile)); |
| 639 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab+1)); | 638 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab+1)); |
| 640 | 639 |
| 641 scoped_refptr<TabProxy> tab(GetActiveTab()); | 640 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 642 ASSERT_TRUE(tab.get()); | 641 ASSERT_TRUE(tab.get()); |
| 643 ASSERT_TRUE(tab->NavigateToURL(url)); | 642 ASSERT_TRUE(tab->NavigateToURL(url)); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); | 710 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); |
| 712 } | 711 } |
| 713 | 712 |
| 714 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { | 713 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { |
| 715 RunWorkerFileSystemLayoutTest("async-operations.html"); | 714 RunWorkerFileSystemLayoutTest("async-operations.html"); |
| 716 } | 715 } |
| 717 | 716 |
| 718 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { | 717 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { |
| 719 RunWorkerFileSystemLayoutTest("sync-operations.html"); | 718 RunWorkerFileSystemLayoutTest("sync-operations.html"); |
| 720 } | 719 } |
| OLD | NEW |