| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 static int CountRenderProcessHosts() { | 1437 static int CountRenderProcessHosts() { |
| 1438 int result = 0; | 1438 int result = 0; |
| 1439 for (RenderProcessHost::iterator iter(RenderProcessHost::AllHostsIterator()); | 1439 for (RenderProcessHost::iterator iter(RenderProcessHost::AllHostsIterator()); |
| 1440 !iter.IsAtEnd(); | 1440 !iter.IsAtEnd(); |
| 1441 iter.Advance()) { | 1441 iter.Advance()) { |
| 1442 result++; | 1442 result++; |
| 1443 } | 1443 } |
| 1444 return result; | 1444 return result; |
| 1445 } | 1445 } |
| 1446 | 1446 |
| 1447 // Flaky timeouts on CrOS: http://crbug.com/387045 | 1447 IN_PROC_BROWSER_TEST_F(ServiceWorkerBlackBoxBrowserTest, Registration) { |
| 1448 #if defined(OS_CHROMEOS) | |
| 1449 #define MAYBE_Registration DISABLED_Registration | |
| 1450 #else | |
| 1451 #define MAYBE_Registration Registration | |
| 1452 #endif | |
| 1453 IN_PROC_BROWSER_TEST_F(ServiceWorkerBlackBoxBrowserTest, MAYBE_Registration) { | |
| 1454 // Close the only window to be sure we're not re-using its RenderProcessHost. | 1448 // Close the only window to be sure we're not re-using its RenderProcessHost. |
| 1455 shell()->Close(); | 1449 shell()->Close(); |
| 1456 EXPECT_EQ(0, CountRenderProcessHosts()); | 1450 EXPECT_EQ(0, CountRenderProcessHosts()); |
| 1457 | 1451 |
| 1458 const char kWorkerUrl[] = "/service_worker/fetch_event.js"; | 1452 const char kWorkerUrl[] = "/service_worker/fetch_event.js"; |
| 1459 const char kScope[] = "/service_worker/"; | 1453 const char kScope[] = "/service_worker/"; |
| 1460 | 1454 |
| 1461 // Unregistering nothing should return false. | 1455 // Unregistering nothing should return false. |
| 1462 { | 1456 { |
| 1463 base::RunLoop run_loop; | 1457 base::RunLoop run_loop; |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 private: | 1889 private: |
| 1896 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerV8CacheStrategiesAggressiveTest); | 1890 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerV8CacheStrategiesAggressiveTest); |
| 1897 }; | 1891 }; |
| 1898 | 1892 |
| 1899 IN_PROC_BROWSER_TEST_F(ServiceWorkerV8CacheStrategiesAggressiveTest, | 1893 IN_PROC_BROWSER_TEST_F(ServiceWorkerV8CacheStrategiesAggressiveTest, |
| 1900 V8CacheOnCacheStorage) { | 1894 V8CacheOnCacheStorage) { |
| 1901 CheckStrategyIsAggressive(); | 1895 CheckStrategyIsAggressive(); |
| 1902 } | 1896 } |
| 1903 | 1897 |
| 1904 } // namespace content | 1898 } // namespace content |
| OLD | NEW |