| Index: content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
|
| diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc b/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
|
| index 2bc542bc8f3e11f3731503bd5d1ad8c0b4bfe72b..461533e6304229baf702bf72ffad578508968462 100644
|
| --- a/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
|
| +++ b/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
|
| @@ -105,6 +105,11 @@ class ScreenOrientationDispatcherTest : public testing::Test {
|
| dispatcher_->OnMessageReceived(message);
|
| }
|
|
|
| + int routing_id() const {
|
| + // We return a fake routing_id() in the context of this test.
|
| + return 0;
|
| + }
|
| +
|
| IPC::TestSink sink_;
|
| scoped_ptr<ScreenOrientationDispatcher> dispatcher_;
|
| };
|
| @@ -156,7 +161,8 @@ TEST_F(ScreenOrientationDispatcherTest, LockRequest_Error) {
|
| new MockLockOrientationCallback(&callback_results));
|
|
|
| int request_id = GetFirstLockRequestIdFromSink();
|
| - OnMessageReceived(ScreenOrientationMsg_LockError(request_id, *it));
|
| + OnMessageReceived(
|
| + ScreenOrientationMsg_LockError(routing_id(), request_id, *it));
|
|
|
| EXPECT_FALSE(callback_results.succeeded_);
|
| EXPECT_TRUE(callback_results.failed_);
|
| @@ -187,7 +193,8 @@ TEST_F(ScreenOrientationDispatcherTest, LockRequest_Success) {
|
| new MockLockOrientationCallback(&callback_results));
|
|
|
| int request_id = GetFirstLockRequestIdFromSink();
|
| - OnMessageReceived(ScreenOrientationMsg_LockSuccess(request_id,
|
| + OnMessageReceived(ScreenOrientationMsg_LockSuccess(routing_id(),
|
| + request_id,
|
| orientations[i].angle,
|
| orientations[i].type));
|
|
|
| @@ -209,6 +216,7 @@ TEST_F(ScreenOrientationDispatcherTest, SuccessForUnknownRequest) {
|
|
|
| int request_id = GetFirstLockRequestIdFromSink();
|
| OnMessageReceived(ScreenOrientationMsg_LockSuccess(
|
| + routing_id(),
|
| request_id + 1,
|
| 90,
|
| blink::WebScreenOrientationLandscapePrimary));
|
| @@ -226,6 +234,7 @@ TEST_F(ScreenOrientationDispatcherTest, ErrorForUnknownRequest) {
|
|
|
| int request_id = GetFirstLockRequestIdFromSink();
|
| OnMessageReceived(ScreenOrientationMsg_LockError(
|
| + routing_id(),
|
| request_id + 1,
|
| blink::WebLockOrientationCallback::ErrorTypeCanceled));
|
|
|
| @@ -253,6 +262,7 @@ TEST_F(ScreenOrientationDispatcherTest, RaceScenario) {
|
| // callback_results1 must be rejected, tested in CancelPending_DoubleLock.
|
|
|
| OnMessageReceived(ScreenOrientationMsg_LockSuccess(
|
| + routing_id(),
|
| request_id1,
|
| 0,
|
| blink::WebScreenOrientationPortraitPrimary));
|
|
|