| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 static int CountRenderProcessHosts() { | 735 static int CountRenderProcessHosts() { |
| 736 int result = 0; | 736 int result = 0; |
| 737 for (RenderProcessHost::iterator iter(RenderProcessHost::AllHostsIterator()); | 737 for (RenderProcessHost::iterator iter(RenderProcessHost::AllHostsIterator()); |
| 738 !iter.IsAtEnd(); | 738 !iter.IsAtEnd(); |
| 739 iter.Advance()) { | 739 iter.Advance()) { |
| 740 result++; | 740 result++; |
| 741 } | 741 } |
| 742 return result; | 742 return result; |
| 743 } | 743 } |
| 744 | 744 |
| 745 // Crashes on Android: http://crbug.com/387045 | 745 // Crashes on Android and flakes on CrOS: http://crbug.com/387045 |
| 746 #if defined(OS_ANDROID) | 746 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 747 #define MAYBE_Registration DISABLED_Registration | 747 #define MAYBE_Registration DISABLED_Registration |
| 748 #else | 748 #else |
| 749 #define MAYBE_Registration Registration | 749 #define MAYBE_Registration Registration |
| 750 #endif | 750 #endif |
| 751 IN_PROC_BROWSER_TEST_F(ServiceWorkerBlackBoxBrowserTest, MAYBE_Registration) { | 751 IN_PROC_BROWSER_TEST_F(ServiceWorkerBlackBoxBrowserTest, MAYBE_Registration) { |
| 752 // Close the only window to be sure we're not re-using its RenderProcessHost. | 752 // Close the only window to be sure we're not re-using its RenderProcessHost. |
| 753 shell()->Close(); | 753 shell()->Close(); |
| 754 EXPECT_EQ(0, CountRenderProcessHosts()); | 754 EXPECT_EQ(0, CountRenderProcessHosts()); |
| 755 | 755 |
| 756 const std::string kWorkerUrl = "/service_worker/fetch_event.js"; | 756 const std::string kWorkerUrl = "/service_worker/fetch_event.js"; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, | 821 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, |
| 822 this, | 822 this, |
| 823 embedded_test_server()->GetURL("/service_worker/empty.html"), | 823 embedded_test_server()->GetURL("/service_worker/empty.html"), |
| 824 &status, | 824 &status, |
| 825 &script_url)); | 825 &script_url)); |
| 826 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); | 826 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 } // namespace content | 830 } // namespace content |
| OLD | NEW |