Index: content/browser/service_worker/service_worker_context_unittest.cc |
diff --git a/content/browser/service_worker/service_worker_context_unittest.cc b/content/browser/service_worker/service_worker_context_unittest.cc |
index 1a49d8bc99a4354c31a417d87e74ffcc721c700a..16b20edac99505c2dc575b6a1bbc22f55ca107b5 100644 |
--- a/content/browser/service_worker/service_worker_context_unittest.cc |
+++ b/content/browser/service_worker/service_worker_context_unittest.cc |
@@ -176,12 +176,13 @@ class RecordableEmbeddedWorkerInstanceClient |
const std::vector<Message>& events() const { return events_; } |
protected: |
- void StartWorker( |
- const EmbeddedWorkerStartParams& params, |
- mojom::ServiceWorkerEventDispatcherRequest request) override { |
+ void StartWorker(const EmbeddedWorkerStartParams& params, |
+ mojom::ServiceWorkerEventDispatcherRequest request, |
+ mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo |
+ instance_host) override { |
events_.push_back(Message::StartWorker); |
EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient::StartWorker( |
- params, std::move(request)); |
+ params, std::move(request), std::move(instance_host)); |
} |
void StopWorker(const StopWorkerCallback& callback) override { |
@@ -476,18 +477,21 @@ TEST_F(ServiceWorkerContextTest, UnregisterMultiple) { |
base::RunLoop().RunUntilIdle(); |
ASSERT_EQ(6u, notifications_.size()); |
- EXPECT_EQ(REGISTRATION_STORED, notifications_[0].type); |
- EXPECT_EQ(registration_id1, notifications_[0].registration_id); |
- EXPECT_EQ(origin1_p1, notifications_[0].pattern); |
- EXPECT_EQ(REGISTRATION_STORED, notifications_[1].type); |
- EXPECT_EQ(origin1_p2, notifications_[1].pattern); |
- EXPECT_EQ(registration_id2, notifications_[1].registration_id); |
- EXPECT_EQ(REGISTRATION_STORED, notifications_[2].type); |
- EXPECT_EQ(origin2_p1, notifications_[2].pattern); |
- EXPECT_EQ(registration_id3, notifications_[2].registration_id); |
+ // TODO(leonhsl) in this CL: Why the 4 REGISTRATION_STORED notifications are |
+ // in inverse order with the 4 RegisterServiceWorker calls. |
leonhsl(Using Gerrit)
2017/04/04 07:14:04
I'm still investigating,, it would be very helpful
shimazu
2017/04/06 05:01:36
What was the cause of this?
leonhsl(Using Gerrit)
2017/04/06 09:58:55
The root cause is that I was using base::MessageLo
shimazu
2017/04/10 05:10:10
Ah, thanks, I got it.
|
EXPECT_EQ(REGISTRATION_STORED, notifications_[3].type); |
- EXPECT_EQ(origin3_p1, notifications_[3].pattern); |
- EXPECT_EQ(registration_id4, notifications_[3].registration_id); |
+ EXPECT_EQ(registration_id1, notifications_[3].registration_id); |
+ EXPECT_EQ(origin1_p1, notifications_[3].pattern); |
+ EXPECT_EQ(REGISTRATION_STORED, notifications_[2].type); |
+ EXPECT_EQ(origin1_p2, notifications_[2].pattern); |
+ EXPECT_EQ(registration_id2, notifications_[2].registration_id); |
+ EXPECT_EQ(REGISTRATION_STORED, notifications_[1].type); |
+ EXPECT_EQ(origin2_p1, notifications_[1].pattern); |
+ EXPECT_EQ(registration_id3, notifications_[1].registration_id); |
+ EXPECT_EQ(REGISTRATION_STORED, notifications_[0].type); |
+ EXPECT_EQ(origin3_p1, notifications_[0].pattern); |
+ EXPECT_EQ(registration_id4, notifications_[0].registration_id); |
+ |
EXPECT_EQ(REGISTRATION_DELETED, notifications_[4].type); |
EXPECT_EQ(origin1_p2, notifications_[4].pattern); |
EXPECT_EQ(registration_id2, notifications_[4].registration_id); |