| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "content/public/test/test_browser_thread_bundle.h" | 9 #include "content/public/test/test_browser_thread_bundle.h" |
| 10 #include "content/renderer/presentation/presentation_dispatcher.h" | 10 #include "content/renderer/presentation/presentation_dispatcher.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nAvailabilityObserver.h" | 12 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nAvailabilityObserver.h" |
| 13 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nError.h" | 13 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nError.h" |
| 14 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nSessionInfo.h" | 14 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nSessionInfo.h" |
| 15 #include "third_party/WebKit/public/web/WebArrayBuffer.h" | 15 #include "third_party/WebKit/public/web/WebArrayBuffer.h" |
| 16 | 16 |
| 17 using ::testing::_; | 17 using ::testing::_; |
| 18 using ::testing::Invoke; | 18 using ::testing::Invoke; |
| 19 using blink::WebArrayBuffer; | 19 using blink::WebArrayBuffer; |
| 20 using blink::WebPresentationAvailabilityCallbacks; | 20 using blink::WebPresentationAvailabilityCallbacks; |
| 21 using blink::WebPresentationAvailabilityObserver; | 21 using blink::WebPresentationAvailabilityObserver; |
| 22 using blink::WebPresentationConnectionCallback; | 22 using blink::WebPresentationConnectionCallback; |
| 23 using blink::WebPresentationError; | 23 using blink::WebPresentationError; |
| 24 using blink::WebPresentationSessionInfo; | 24 using blink::WebPresentationSessionInfo; |
| 25 using blink::WebString; | 25 using blink::WebString; |
| 26 using blink::WebURL; | 26 using blink::WebURL; |
| 27 using blink::WebVector; | 27 using blink::WebVector; |
| 28 using blink::mojom::PresentationError; | 28 using content::mojom::PresentationError; |
| 29 using blink::mojom::PresentationErrorPtr; | 29 using content::mojom::PresentationErrorPtr; |
| 30 using blink::mojom::PresentationErrorType; | 30 using content::mojom::PresentationErrorType; |
| 31 using blink::mojom::PresentationService; | 31 using content::mojom::PresentationService; |
| 32 using blink::mojom::PresentationServiceClientPtr; | 32 using content::mojom::PresentationServiceClientPtr; |
| 33 using blink::mojom::PresentationSessionInfo; | 33 using content::mojom::PresentationSessionInfo; |
| 34 using blink::mojom::PresentationSessionInfoPtr; | 34 using content::mojom::PresentationSessionInfoPtr; |
| 35 using blink::mojom::ConnectionMessage; | 35 using content::mojom::ConnectionMessage; |
| 36 using blink::mojom::ConnectionMessagePtr; | 36 using content::mojom::ConnectionMessagePtr; |
| 37 | 37 |
| 38 // TODO(crbug.com/576808): Add test cases for the following: | 38 // TODO(crbug.com/576808): Add test cases for the following: |
| 39 // - State changes | 39 // - State changes |
| 40 // - Messages received | 40 // - Messages received |
| 41 // - Discarding queued messages when the frame navigates | 41 // - Discarding queued messages when the frame navigates |
| 42 // - Screen availability not supported | 42 // - Screen availability not supported |
| 43 // - Default presentation starting | 43 // - Default presentation starting |
| 44 | 44 |
| 45 namespace content { | 45 namespace content { |
| 46 | 46 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 400 } |
| 401 | 401 |
| 402 TEST_F(PresentationDispatcherTest, TestSetDefaultPresentationUrls) { | 402 TEST_F(PresentationDispatcherTest, TestSetDefaultPresentationUrls) { |
| 403 base::RunLoop run_loop; | 403 base::RunLoop run_loop; |
| 404 EXPECT_CALL(presentation_service_, SetDefaultPresentationUrls(gurls_)); | 404 EXPECT_CALL(presentation_service_, SetDefaultPresentationUrls(gurls_)); |
| 405 dispatcher_.setDefaultPresentationUrls(urls_); | 405 dispatcher_.setDefaultPresentationUrls(urls_); |
| 406 run_loop.RunUntilIdle(); | 406 run_loop.RunUntilIdle(); |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace content | 409 } // namespace content |
| OLD | NEW |