| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "headless/public/util/expedited_dispatcher.h" | 5 #include "headless/public/util/expedited_dispatcher.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/message_loop/message_loop.h" |
| 12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 13 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 14 #include "headless/public/util/navigation_request.h" | 15 #include "headless/public/util/navigation_request.h" |
| 15 #include "headless/public/util/testing/fake_managed_dispatch_url_request_job.h" | 16 #include "headless/public/util/testing/fake_managed_dispatch_url_request_job.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 19 |
| 19 using testing::ElementsAre; | 20 using testing::ElementsAre; |
| 20 | 21 |
| 21 namespace headless { | 22 namespace headless { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 job4->DispatchHeadersComplete(); | 127 job4->DispatchHeadersComplete(); |
| 127 | 128 |
| 128 EXPECT_TRUE(notifications.empty()); | 129 EXPECT_TRUE(notifications.empty()); |
| 129 | 130 |
| 130 base::RunLoop().RunUntilIdle(); | 131 base::RunLoop().RunUntilIdle(); |
| 131 EXPECT_THAT(notifications, | 132 EXPECT_THAT(notifications, |
| 132 ElementsAre("id: 1 OK", "id: 2 OK", "id: 3 OK", "id: 4 OK")); | 133 ElementsAre("id: 1 OK", "id: 2 OK", "id: 3 OK", "id: 4 OK")); |
| 133 } | 134 } |
| 134 | 135 |
| 135 } // namespace headless | 136 } // namespace headless |
| OLD | NEW |