| 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/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "chrome/app/chrome_dll_resource.h" | 6 #include "chrome/app/chrome_dll_resource.h" |
| 7 #include "chrome/browser/worker_host/worker_service.h" | 7 #include "chrome/browser/worker_host/worker_service.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/test/automation/browser_proxy.h" | 9 #include "chrome/test/automation/browser_proxy.h" |
| 10 #include "chrome/test/automation/tab_proxy.h" | 10 #include "chrome/test/automation/tab_proxy.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 FilePath resource_dir; | 346 FilePath resource_dir; |
| 347 resource_dir = resource_dir.AppendASCII("resources"); | 347 resource_dir = resource_dir.AppendASCII("resources"); |
| 348 AddResourceForLayoutTest(js_dir, resource_dir); | 348 AddResourceForLayoutTest(js_dir, resource_dir); |
| 349 | 349 |
| 350 for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) | 350 for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) |
| 351 RunLayoutTest(kLayoutTestFiles[i], false); | 351 RunLayoutTest(kLayoutTestFiles[i], false); |
| 352 } | 352 } |
| 353 | 353 |
| 354 #if defined(OS_LINUX) | 354 #if defined(OS_LINUX) |
| 355 // http://crbug.com/30307 | 355 // http://crbug.com/30307 |
| 356 #define LimitPerPage FLAKY_LimitPerPage | 356 #define LimitPerPage DISABLED_LimitPerPage |
| 357 #endif | 357 #endif |
| 358 | 358 |
| 359 TEST_F(WorkerTest, LimitPerPage) { | 359 TEST_F(WorkerTest, LimitPerPage) { |
| 360 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; | 360 int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; |
| 361 GURL url = GetTestUrl(L"workers", L"many_workers.html"); | 361 GURL url = GetTestUrl(L"workers", L"many_workers.html"); |
| 362 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab + 1)); | 362 url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab + 1)); |
| 363 | 363 |
| 364 scoped_refptr<TabProxy> tab(GetActiveTab()); | 364 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 365 ASSERT_TRUE(tab.get()); | 365 ASSERT_TRUE(tab.get()); |
| 366 ASSERT_TRUE(tab->NavigateToURL(url)); | 366 ASSERT_TRUE(tab->NavigateToURL(url)); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 392 | 392 |
| 393 // Check that we didn't create more than the max number of workers. | 393 // Check that we didn't create more than the max number of workers. |
| 394 ASSERT_TRUE(WaitForProcessCountToBe(tab_count, total_workers)); | 394 ASSERT_TRUE(WaitForProcessCountToBe(tab_count, total_workers)); |
| 395 | 395 |
| 396 // Now close a page and check that the queued workers were started. | 396 // Now close a page and check that the queued workers were started. |
| 397 tab->NavigateToURL(GetTestUrl(L"google", L"google.html")); | 397 tab->NavigateToURL(GetTestUrl(L"google", L"google.html")); |
| 398 | 398 |
| 399 ASSERT_TRUE(WaitForProcessCountToBe(tab_count, total_workers)); | 399 ASSERT_TRUE(WaitForProcessCountToBe(tab_count, total_workers)); |
| 400 #endif | 400 #endif |
| 401 } | 401 } |
| OLD | NEW |