| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "base/shared_memory.h" | 7 #include "base/shared_memory.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/renderer_host/test_render_view_host.h" | 9 #include "chrome/browser/renderer_host/test_render_view_host.h" |
| 10 #include "chrome/common/render_messages.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 // RenderWidgetHostProcess ----------------------------------------------------- | 15 // RenderWidgetHostProcess ----------------------------------------------------- |
| 15 | 16 |
| 16 class RenderWidgetHostProcess : public MockRenderProcessHost { | 17 class RenderWidgetHostProcess : public MockRenderProcessHost { |
| 17 public: | 18 public: |
| 18 RenderWidgetHostProcess(Profile* profile) | 19 RenderWidgetHostProcess(Profile* profile) |
| 19 : MockRenderProcessHost(profile), | 20 : MockRenderProcessHost(profile), |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 EXPECT_FALSE(host_->is_hidden_); | 291 EXPECT_FALSE(host_->is_hidden_); |
| 291 | 292 |
| 292 // It should have sent out a restored message with a request to paint. | 293 // It should have sent out a restored message with a request to paint. |
| 293 const IPC::Message* restored = process_->sink().GetUniqueMessageMatching( | 294 const IPC::Message* restored = process_->sink().GetUniqueMessageMatching( |
| 294 ViewMsg_WasRestored::ID); | 295 ViewMsg_WasRestored::ID); |
| 295 ASSERT_TRUE(restored); | 296 ASSERT_TRUE(restored); |
| 296 bool needs_repaint; | 297 bool needs_repaint; |
| 297 ViewMsg_WasRestored::Read(restored, &needs_repaint); | 298 ViewMsg_WasRestored::Read(restored, &needs_repaint); |
| 298 EXPECT_TRUE(needs_repaint); | 299 EXPECT_TRUE(needs_repaint); |
| 299 } | 300 } |
| OLD | NEW |