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

Side by Side Diff: content/worker/test/worker_uitest.cc

Issue 9452041: Re-Disabling WorkerTest.LimitTotal on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
« 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/automation/automation_proxy.h" 10 #include "chrome/test/automation/automation_proxy.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 TEST_F(WorkerTest, LimitPerPage) { 482 TEST_F(WorkerTest, LimitPerPage) {
483 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; 483 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate;
484 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), 484 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir),
485 FilePath(kManySharedWorkersFile)); 485 FilePath(kManySharedWorkersFile));
486 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab + 1)); 486 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab + 1));
487 487
488 NavigateToURL(url); 488 NavigateToURL(url);
489 ASSERT_TRUE(WaitForProcessCountToBe(1, max_workers_per_tab)); 489 ASSERT_TRUE(WaitForProcessCountToBe(1, max_workers_per_tab));
490 } 490 }
491 491
492 TEST_F(WorkerTest, LimitTotal) { 492 // http://crbug.com/36800
493 #if defined(OS_WIN)
494 #define MAYBE_LimitTotal DISABLE_LimitTotal
495 #else
496 #define MAYBE_LimitTotal LimitTotal
497 #endif // defined(OS_WIN)
498 TEST_F(WorkerTest, MAYBE_LimitTotal) {
493 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; 499 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate;
494 int total_workers = WorkerServiceImpl::kMaxWorkersWhenSeparate; 500 int total_workers = WorkerServiceImpl::kMaxWorkersWhenSeparate;
495 501
496 // Adding 1 so that we cause some workers to be queued. 502 // Adding 1 so that we cause some workers to be queued.
497 int tab_count = (total_workers / max_workers_per_tab) + 1; 503 int tab_count = (total_workers / max_workers_per_tab) + 1;
498 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), 504 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir),
499 FilePath(kManySharedWorkersFile)); 505 FilePath(kManySharedWorkersFile));
500 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); 506 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab));
501 507
502 scoped_refptr<TabProxy> tab(GetActiveTab()); 508 scoped_refptr<TabProxy> tab(GetActiveTab());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir), 615 GURL url2 = ui_test_utils::GetTestUrl(FilePath(kTestDir),
610 FilePath(kSingleSharedWorkersFile)); 616 FilePath(kSingleSharedWorkersFile));
611 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab)); 617 url2 = GURL(url2.spec() + StringPrintf("?id=%d", max_workers_per_tab));
612 ASSERT_TRUE(window->AppendTab(url2)); 618 ASSERT_TRUE(window->AppendTab(url2));
613 619
614 std::string value = WaitUntilCookieNonEmpty(tab.get(), url, 620 std::string value = WaitUntilCookieNonEmpty(tab.get(), url,
615 kTestCompleteCookie, TestTimeouts::action_max_timeout_ms()); 621 kTestCompleteCookie, TestTimeouts::action_max_timeout_ms());
616 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); 622 ASSERT_STREQ(kTestCompleteSuccess, value.c_str());
617 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1)); 623 ASSERT_TRUE(WaitForProcessCountToBe(2, max_workers_per_tab+1));
618 } 624 }
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