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

Side by Side Diff: content/browser/worker_host/test/worker_browsertest.cc

Issue 10835011: Revert 148582 - Try renabling the the disabled worker tests, now that they run in content_browserte… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/bind.h" 5 #include "base/bind.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 24 matching lines...) Expand all
35 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 35 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
36 InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture(); 36 InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture();
37 AddResourceForLayoutTest( 37 AddResourceForLayoutTest(
38 FilePath().AppendASCII("fast").AppendASCII("js"), 38 FilePath().AppendASCII("fast").AppendASCII("js"),
39 FilePath().AppendASCII("resources")); 39 FilePath().AppendASCII("resources"));
40 } 40 }
41 }; 41 };
42 42
43 // Crashy, http://crbug.com/35965. 43 // Crashy, http://crbug.com/35965.
44 // Flaky, http://crbug.com/36555. 44 // Flaky, http://crbug.com/36555.
45 IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerClonePort) { 45 IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, DISABLED_WorkerClonePort) {
46 RunLayoutTest("worker-cloneport.html"); 46 RunLayoutTest("worker-cloneport.html");
47 } 47 }
48 48
49 // http://crbug.com/101996 (started flaking with WebKit roll 98537:98582). 49 // http://crbug.com/101996 (started flaking with WebKit roll 98537:98582).
50 IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerContextMultiPort) { 50 IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerContextMultiPort) {
51 RunLayoutTest("worker-context-multi-port.html"); 51 RunLayoutTest("worker-context-multi-port.html");
52 } 52 }
53 53
54 IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerMessagePort) { 54 IN_PROC_BROWSER_TEST_F(WorkerLayoutTest, WorkerMessagePort) {
55 RunLayoutTest("worker-messageport.html"); 55 RunLayoutTest("worker-messageport.html");
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // workers shut down. 454 // workers shut down.
455 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; 455 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate;
456 std::string query = StringPrintf("?count=%d", max_workers_per_tab); 456 std::string query = StringPrintf("?count=%d", max_workers_per_tab);
457 RunTest("queued_shared_worker_shutdown.html", query); 457 RunTest("queued_shared_worker_shutdown.html", query);
458 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab)); 458 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab));
459 } 459 }
460 460
461 // Flaky, http://crbug.com/69881. 461 // Flaky, http://crbug.com/69881.
462 // Sometimes triggers 462 // Sometimes triggers
463 // Check failed: message_ports_[message_port_id].queued_messages.empty(). 463 // Check failed: message_ports_[message_port_id].queued_messages.empty().
464 IN_PROC_BROWSER_TEST_F(WorkerTest, MultipleTabsQueuedSharedWorker) { 464 IN_PROC_BROWSER_TEST_F(WorkerTest, DISABLED_MultipleTabsQueuedSharedWorker) {
465 // Tests to make sure that only one instance of queued shared workers are 465 // Tests to make sure that only one instance of queued shared workers are
466 // started up even when those instances are on multiple tabs. 466 // started up even when those instances are on multiple tabs.
467 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; 467 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate;
468 std::string query = StringPrintf("?count=%d", max_workers_per_tab + 1); 468 std::string query = StringPrintf("?count=%d", max_workers_per_tab + 1);
469 GURL url = GetTestURL("many_shared_workers.html", query); 469 GURL url = GetTestURL("many_shared_workers.html", query);
470 content::NavigateToURL(shell(), url); 470 content::NavigateToURL(shell(), url);
471 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab)); 471 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab));
472 472
473 // Create same set of workers in new tab (leaves one worker queued from this 473 // Create same set of workers in new tab (leaves one worker queued from this
474 // tab). 474 // tab).
475 url = GetTestURL("many_shared_workers.html", query); 475 url = GetTestURL("many_shared_workers.html", query);
476 content::NavigateToURL(CreateBrowser(), url); 476 content::NavigateToURL(CreateBrowser(), url);
477 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab)); 477 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab));
478 478
479 // Now shutdown one of the shared workers - this will fire both queued 479 // Now shutdown one of the shared workers - this will fire both queued
480 // workers, but only one instance should be started. 480 // workers, but only one instance should be started.
481 url = GetTestURL("shutdown_shared_worker.html", "?id=0"); 481 url = GetTestURL("shutdown_shared_worker.html", "?id=0");
482 content::NavigateToURL(CreateBrowser(), url); 482 content::NavigateToURL(CreateBrowser(), url);
483 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab)); 483 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab));
484 } 484 }
485 485
486 // Flaky: http://crbug.com/48148 486 // Flaky: http://crbug.com/48148
487 IN_PROC_BROWSER_TEST_F(WorkerTest, QueuedSharedWorkerStartedFromOtherTab) { 487 IN_PROC_BROWSER_TEST_F(WorkerTest, DISABLED_QueuedSharedWorkerStartedFromOtherTa b) {
488 // Tests to make sure that queued shared workers are started up when 488 // Tests to make sure that queued shared workers are started up when
489 // an instance is launched from another tab. 489 // an instance is launched from another tab.
490 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; 490 int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate;
491 std::string query = StringPrintf("?count=%d", max_workers_per_tab + 1); 491 std::string query = StringPrintf("?count=%d", max_workers_per_tab + 1);
492 GURL url = GetTestURL("many_shared_workers.html", query); 492 GURL url = GetTestURL("many_shared_workers.html", query);
493 content::NavigateToURL(shell(), url); 493 content::NavigateToURL(shell(), url);
494 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab)); 494 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab));
495 495
496 // First window has hit its limit. Now launch second window which creates 496 // First window has hit its limit. Now launch second window which creates
497 // the same worker that was queued in the first window, to ensure it gets 497 // the same worker that was queued in the first window, to ensure it gets
498 // connected to the first window too. 498 // connected to the first window too.
499 query = StringPrintf("?id=%d", max_workers_per_tab); 499 query = StringPrintf("?id=%d", max_workers_per_tab);
500 url = GetTestURL("single_shared_worker.html", query); 500 url = GetTestURL("single_shared_worker.html", query);
501 content::NavigateToURL(CreateBrowser(), url); 501 content::NavigateToURL(CreateBrowser(), url);
502 502
503 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab + 1)); 503 ASSERT_TRUE(WaitForWorkerProcessCount(max_workers_per_tab + 1));
504 } 504 }
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