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

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

Issue 1722006: Mark WorkerTest.MultipleTabsQueuedSharedWorker as flaky. (Closed)
Patch Set: Created 10 years, 8 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/test/automation/browser_proxy.h" 10 #include "chrome/test/automation/browser_proxy.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 scoped_refptr<TabProxy> tab(GetActiveTab()); 572 scoped_refptr<TabProxy> tab(GetActiveTab());
573 ASSERT_TRUE(tab.get()); 573 ASSERT_TRUE(tab.get());
574 ASSERT_TRUE(tab->NavigateToURL(url)); 574 ASSERT_TRUE(tab->NavigateToURL(url));
575 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, 575 std::string value = WaitUntilCookieNonEmpty(tab.get(), url,
576 kTestCompleteCookie, action_max_timeout_ms()); 576 kTestCompleteCookie, action_max_timeout_ms());
577 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); 577 ASSERT_STREQ(kTestCompleteSuccess, value.c_str());
578 ASSERT_TRUE(WaitForProcessCountToBe(1, max_workers_per_tab)); 578 ASSERT_TRUE(WaitForProcessCountToBe(1, max_workers_per_tab));
579 } 579 }
580 580
581 TEST_F(WorkerTest, MultipleTabsQueuedSharedWorker) { 581 // Flaky, http://crbug.com/35221.
582 TEST_F(WorkerTest, FLAKY_MultipleTabsQueuedSharedWorker) {
582 // Tests to make sure that only one instance of queued shared workers are 583 // Tests to make sure that only one instance of queued shared workers are
583 // started up even when those instances are on multiple tabs. 584 // started up even when those instances are on multiple tabs.
584 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; 585 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate;
585 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), 586 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir),
586 FilePath(kManySharedWorkersFile)); 587 FilePath(kManySharedWorkersFile));
587 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab+1)); 588 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab+1));
588 589
589 scoped_refptr<TabProxy> tab(GetActiveTab()); 590 scoped_refptr<TabProxy> tab(GetActiveTab());
590 ASSERT_TRUE(tab.get()); 591 ASSERT_TRUE(tab.get());
591 ASSERT_TRUE(tab->NavigateToURL(url)); 592 ASSERT_TRUE(tab->NavigateToURL(url));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), 633 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir),
633 FilePath(kSingleSharedWorkersFile)); 634 FilePath(kSingleSharedWorkersFile));
634 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); 635 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab));
635 ASSERT_TRUE(window->AppendTab(url2)); 636 ASSERT_TRUE(window->AppendTab(url2));
636 637
637 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, 638 std::string value = WaitUntilCookieNonEmpty(tab.get(), url,
638 kTestCompleteCookie, action_max_timeout_ms()); 639 kTestCompleteCookie, action_max_timeout_ms());
639 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); 640 ASSERT_STREQ(kTestCompleteSuccess, value.c_str());
640 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); 641 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1));
641 } 642 }
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