Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1198)

Unified Diff: content/renderer/presentation/presentation_dispatcher_unittest.cc

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)
Patch Set: merge and refactor Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/presentation/presentation_dispatcher_unittest.cc
diff --git a/content/renderer/presentation/presentation_dispatcher_unittest.cc b/content/renderer/presentation/presentation_dispatcher_unittest.cc
index 3ec39bad8cd51ee6b66bc56ec12a3a9884f99231..8ef966d774bc90bbb97a7c9eabfd6bf80f52cc4e 100644
--- a/content/renderer/presentation/presentation_dispatcher_unittest.cc
+++ b/content/renderer/presentation/presentation_dispatcher_unittest.cc
@@ -10,6 +10,9 @@
#include "content/renderer/presentation/presentation_dispatcher.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationAvailabilityObserver.h"
+#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h"
+#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionCallbacks.h"
+#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationController.h"
#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationError.h"
#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationSessionInfo.h"
#include "third_party/WebKit/public/web/WebArrayBuffer.h"
@@ -19,7 +22,7 @@ using ::testing::Invoke;
using blink::WebArrayBuffer;
using blink::WebPresentationAvailabilityCallbacks;
using blink::WebPresentationAvailabilityObserver;
-using blink::WebPresentationConnectionCallback;
+using blink::WebPresentationConnectionCallbacks;
using blink::WebPresentationError;
using blink::WebPresentationSessionInfo;
using blink::WebString;
@@ -117,7 +120,7 @@ class MockPresentationService : public PresentationService {
};
class TestWebPresentationConnectionCallback
- : public WebPresentationConnectionCallback {
+ : public WebPresentationConnectionCallbacks {
public:
TestWebPresentationConnectionCallback(WebURL url, WebString id)
: url_(url), id_(id), callback_called_(false) {}
@@ -131,6 +134,8 @@ class TestWebPresentationConnectionCallback
EXPECT_EQ(info.id, id_);
}
+ blink::WebPresentationConnection* getConnection() override { return nullptr; }
+
private:
const WebURL url_;
const WebString id_;
@@ -138,7 +143,7 @@ class TestWebPresentationConnectionCallback
};
class TestWebPresentationConnectionErrorCallback
- : public WebPresentationConnectionCallback {
+ : public WebPresentationConnectionCallbacks {
public:
TestWebPresentationConnectionErrorCallback(
WebPresentationError::ErrorType error_type,
@@ -154,6 +159,8 @@ class TestWebPresentationConnectionErrorCallback
EXPECT_EQ(error.message, message_);
}
+ blink::WebPresentationConnection* getConnection() override { return nullptr; }
+
private:
const WebPresentationError::ErrorType error_type_;
const WebString message_;
@@ -319,7 +326,7 @@ TEST_F(PresentationDispatcherTest, TestSendString) {
EXPECT_EQ(message.utf8(), message_request->message.value());
callback.Run(true);
}));
- dispatcher_.sendString(url1_, presentation_id_, message);
+ dispatcher_.sendString(url1_, presentation_id_, message, nullptr);
run_loop.RunUntilIdle();
}
@@ -340,7 +347,7 @@ TEST_F(PresentationDispatcherTest, TestSendArrayBuffer) {
callback.Run(true);
}));
dispatcher_.sendArrayBuffer(url1_, presentation_id_, array_buffer_data(),
- array_buffer_.byteLength());
+ array_buffer_.byteLength(), nullptr);
run_loop.RunUntilIdle();
}
@@ -361,7 +368,7 @@ TEST_F(PresentationDispatcherTest, TestSendBlobData) {
callback.Run(true);
}));
dispatcher_.sendBlobData(url1_, presentation_id_, array_buffer_data(),
- array_buffer_.byteLength());
+ array_buffer_.byteLength(), nullptr);
run_loop.RunUntilIdle();
}

Powered by Google App Engine
This is Rietveld 408576698