| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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 // http://crbug.com/42641 | 558 // http://crbug.com/42641 | 
| 559 TEST_F(WorkerTest, FLAKY_QueuedSharedWorkerShutdown) { | 559 TEST_F(WorkerTest, DISABLED_QueuedSharedWorkerShutdown) { | 
| 560   // 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 | 
| 561   // shared workers shut down. | 561   // shared workers shut down. | 
| 562   int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; | 562   int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; | 
| 563   GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 563   GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 
| 564       FilePath(kQuerySharedWorkerShutdownFile)); | 564       FilePath(kQuerySharedWorkerShutdownFile)); | 
| 565   url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); | 565   url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); | 
| 566 | 566 | 
| 567   scoped_refptr<TabProxy> tab(GetActiveTab()); | 567   scoped_refptr<TabProxy> tab(GetActiveTab()); | 
| 568   ASSERT_TRUE(tab.get()); | 568   ASSERT_TRUE(tab.get()); | 
| 569   ASSERT_TRUE(tab->NavigateToURL(url)); | 569   ASSERT_TRUE(tab->NavigateToURL(url)); | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 628   GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 628   GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), | 
| 629                                         FilePath(kSingleSharedWorkersFile)); | 629                                         FilePath(kSingleSharedWorkersFile)); | 
| 630   url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); | 630   url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); | 
| 631   ASSERT_TRUE(window->AppendTab(url2)); | 631   ASSERT_TRUE(window->AppendTab(url2)); | 
| 632 | 632 | 
| 633   std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 633   std::string value = WaitUntilCookieNonEmpty(tab.get(), url, | 
| 634       kTestCompleteCookie, action_max_timeout_ms()); | 634       kTestCompleteCookie, action_max_timeout_ms()); | 
| 635   ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 635   ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 
| 636   ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); | 636   ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); | 
| 637 } | 637 } | 
| OLD | NEW | 
|---|