| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 std::string value; | 691 std::string value; |
| 692 ASSERT_TRUE( | 692 ASSERT_TRUE( |
| 693 content::ExecuteScriptAndExtractString(tab, "register();", &value)); | 693 content::ExecuteScriptAndExtractString(tab, "register();", &value)); |
| 694 EXPECT_EQ("SW controlled", value); | 694 EXPECT_EQ("SW controlled", value); |
| 695 | 695 |
| 696 ASSERT_TRUE(RunExtensionTest("service_worker/content_script_fetch")) | 696 ASSERT_TRUE(RunExtensionTest("service_worker/content_script_fetch")) |
| 697 << message_; | 697 << message_; |
| 698 } | 698 } |
| 699 | 699 |
| 700 // Flaky on ChromiumOS bots. http://crbug.com/612673 | 700 // Flaky on ChromiumOS bots. http://crbug.com/612673 |
| 701 #if defined(OS_CHROMEOS) | 701 // Flaky on Windows bots. http://crbug.com/612840 |
| 702 #if defined(OS_CHROMEOS) || defined(OS_WIN) |
| 702 #define MAYBE_OnPush DISABLED_OnPush | 703 #define MAYBE_OnPush DISABLED_OnPush |
| 703 #else | 704 #else |
| 704 #define MAYBE_OnPush OnPush | 705 #define MAYBE_OnPush OnPush |
| 705 #endif | 706 #endif |
| 706 IN_PROC_BROWSER_TEST_F(ServiceWorkerPushMessagingTest, MAYBE_OnPush) { | 707 IN_PROC_BROWSER_TEST_F(ServiceWorkerPushMessagingTest, MAYBE_OnPush) { |
| 707 const Extension* extension = LoadExtensionWithFlags( | 708 const Extension* extension = LoadExtensionWithFlags( |
| 708 test_data_dir_.AppendASCII("service_worker/push_messaging"), kFlagNone); | 709 test_data_dir_.AppendASCII("service_worker/push_messaging"), kFlagNone); |
| 709 ASSERT_TRUE(extension); | 710 ASSERT_TRUE(extension); |
| 710 GURL extension_url = extension->url(); | 711 GURL extension_url = extension->url(); |
| 711 | 712 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 734 push_message_listener.set_failure_message("FAIL"); | 735 push_message_listener.set_failure_message("FAIL"); |
| 735 gcm::IncomingMessage message; | 736 gcm::IncomingMessage message; |
| 736 message.sender_id = "1234567890"; | 737 message.sender_id = "1234567890"; |
| 737 message.raw_data = "testdata"; | 738 message.raw_data = "testdata"; |
| 738 message.decrypted = true; | 739 message.decrypted = true; |
| 739 push_service()->OnMessage(app_identifier.app_id(), message); | 740 push_service()->OnMessage(app_identifier.app_id(), message); |
| 740 EXPECT_TRUE(push_message_listener.WaitUntilSatisfied()); | 741 EXPECT_TRUE(push_message_listener.WaitUntilSatisfied()); |
| 741 } | 742 } |
| 742 | 743 |
| 743 } // namespace extensions | 744 } // namespace extensions |
| OLD | NEW |