Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/worker/worker_uitest.cc

Issue 3153036: Enable WorkerTest.QueuedSharedWorkerShutdown because it seems to work 100% now. (Closed)
Patch Set: Re-enabled test. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 ASSERT_TRUE(tab.get()); 574 ASSERT_TRUE(tab.get());
575 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), 575 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir),
576 FilePath(kWorkerClose)); 576 FilePath(kWorkerClose));
577 ASSERT_TRUE(tab->NavigateToURL(url)); 577 ASSERT_TRUE(tab->NavigateToURL(url));
578 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, 578 std::string value = WaitUntilCookieNonEmpty(tab.get(), url,
579 kTestCompleteCookie, action_max_timeout_ms()); 579 kTestCompleteCookie, action_max_timeout_ms());
580 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); 580 ASSERT_STREQ(kTestCompleteSuccess, value.c_str());
581 ASSERT_TRUE(WaitForProcessCountToBe(1, 0)); 581 ASSERT_TRUE(WaitForProcessCountToBe(1, 0));
582 } 582 }
583 583
584 // http://crbug.com/42641 584 TEST_F(WorkerTest, QueuedSharedWorkerShutdown) {
585 TEST_F(WorkerTest, FAILS_QueuedSharedWorkerShutdown) {
586 // Tests to make sure that queued shared workers are started up when 585 // Tests to make sure that queued shared workers are started up when
587 // shared workers shut down. 586 // shared workers shut down.
588 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; 587 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate;
589 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), 588 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir),
590 FilePath(kQuerySharedWorkerShutdownFile)); 589 FilePath(kQuerySharedWorkerShutdownFile));
591 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); 590 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab));
592 591
593 scoped_refptr<TabProxy> tab(GetActiveTab()); 592 scoped_refptr<TabProxy> tab(GetActiveTab());
594 ASSERT_TRUE(tab.get()); 593 ASSERT_TRUE(tab.get());
595 ASSERT_TRUE(tab->NavigateToURL(url)); 594 ASSERT_TRUE(tab->NavigateToURL(url));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), 653 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir),
655 FilePath(kSingleSharedWorkersFile)); 654 FilePath(kSingleSharedWorkersFile));
656 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); 655 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab));
657 ASSERT_TRUE(window->AppendTab(url2)); 656 ASSERT_TRUE(window->AppendTab(url2));
658 657
659 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, 658 std::string value = WaitUntilCookieNonEmpty(tab.get(), url,
660 kTestCompleteCookie, action_max_timeout_ms()); 659 kTestCompleteCookie, action_max_timeout_ms());
661 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); 660 ASSERT_STREQ(kTestCompleteSuccess, value.c_str());
662 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); 661 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1));
663 } 662 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698