| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/public/browser/service_worker_context.h" | 5 #include "content/public/browser/service_worker_context.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 EXPECT_FALSE(registration->active_version()); | 78 EXPECT_FALSE(registration->active_version()); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 class RejectInstallTestHelper : public EmbeddedWorkerTestHelper { | 82 class RejectInstallTestHelper : public EmbeddedWorkerTestHelper { |
| 83 public: | 83 public: |
| 84 RejectInstallTestHelper() : EmbeddedWorkerTestHelper(base::FilePath()) {} | 84 RejectInstallTestHelper() : EmbeddedWorkerTestHelper(base::FilePath()) {} |
| 85 | 85 |
| 86 void OnInstallEvent(int embedded_worker_id, | 86 void OnInstallEvent(int embedded_worker_id, |
| 87 int request_id) override { | 87 int request_id) override { |
| 88 SimulateSend( | 88 SimulateSend(new ServiceWorkerHostMsg_InstallEventFinished( |
| 89 new ServiceWorkerHostMsg_InstallEventFinished( | 89 embedded_worker_id, request_id, |
| 90 embedded_worker_id, request_id, | 90 blink::WebServiceWorkerEventResultRejected, true)); |
| 91 blink::WebServiceWorkerEventResultRejected)); | |
| 92 } | 91 } |
| 93 }; | 92 }; |
| 94 | 93 |
| 95 class RejectActivateTestHelper : public EmbeddedWorkerTestHelper { | 94 class RejectActivateTestHelper : public EmbeddedWorkerTestHelper { |
| 96 public: | 95 public: |
| 97 RejectActivateTestHelper() : EmbeddedWorkerTestHelper(base::FilePath()) {} | 96 RejectActivateTestHelper() : EmbeddedWorkerTestHelper(base::FilePath()) {} |
| 98 | 97 |
| 99 void OnActivateEvent(int embedded_worker_id, int request_id) override { | 98 void OnActivateEvent(int embedded_worker_id, int request_id) override { |
| 100 SimulateSend( | 99 SimulateSend( |
| 101 new ServiceWorkerHostMsg_ActivateEventFinished( | 100 new ServiceWorkerHostMsg_ActivateEventFinished( |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 EXPECT_EQ(pattern, notifications_[0].pattern); | 696 EXPECT_EQ(pattern, notifications_[0].pattern); |
| 698 EXPECT_EQ(registration_id, notifications_[0].registration_id); | 697 EXPECT_EQ(registration_id, notifications_[0].registration_id); |
| 699 EXPECT_EQ(STORAGE_RECOVERED, notifications_[1].type); | 698 EXPECT_EQ(STORAGE_RECOVERED, notifications_[1].type); |
| 700 EXPECT_EQ(REGISTRATION_STORED, notifications_[2].type); | 699 EXPECT_EQ(REGISTRATION_STORED, notifications_[2].type); |
| 701 EXPECT_EQ(pattern, notifications_[2].pattern); | 700 EXPECT_EQ(pattern, notifications_[2].pattern); |
| 702 EXPECT_EQ(registration_id, notifications_[2].registration_id); | 701 EXPECT_EQ(registration_id, notifications_[2].registration_id); |
| 703 } | 702 } |
| 704 | 703 |
| 705 | 704 |
| 706 } // namespace content | 705 } // namespace content |
| OLD | NEW |