| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 void TearDown() override { | 452 void TearDown() override { |
| 453 view_.reset(); | 453 view_.reset(); |
| 454 host_.reset(); | 454 host_.reset(); |
| 455 delegate_.reset(); | 455 delegate_.reset(); |
| 456 process_ = NULL; | 456 process_ = NULL; |
| 457 browser_context_.reset(); | 457 browser_context_.reset(); |
| 458 | 458 |
| 459 #if defined(USE_AURA) | 459 #if defined(USE_AURA) |
| 460 aura::Env::DeleteInstance(); | 460 aura::Env::DeleteInstance(); |
| 461 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr); |
| 461 screen_.reset(); | 462 screen_.reset(); |
| 462 #endif | 463 #endif |
| 463 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 464 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
| 464 if (IsDelegatedRendererEnabled()) | 465 if (IsDelegatedRendererEnabled()) |
| 465 ImageTransportFactory::Terminate(); | 466 ImageTransportFactory::Terminate(); |
| 466 #endif | 467 #endif |
| 467 | 468 |
| 468 // Process all pending tasks to avoid leaks. | 469 // Process all pending tasks to avoid leaks. |
| 469 base::MessageLoop::current()->RunUntilIdle(); | 470 base::MessageLoop::current()->RunUntilIdle(); |
| 470 } | 471 } |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 // Having an initial size set means that the size information had been sent | 1469 // Having an initial size set means that the size information had been sent |
| 1469 // with the reqiest to new up the RenderView and so subsequent WasResized | 1470 // with the reqiest to new up the RenderView and so subsequent WasResized |
| 1470 // calls should not result in new IPC (unless the size has actually changed). | 1471 // calls should not result in new IPC (unless the size has actually changed). |
| 1471 host_->WasResized(); | 1472 host_->WasResized(); |
| 1472 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); | 1473 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); |
| 1473 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); | 1474 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); |
| 1474 EXPECT_TRUE(host_->resize_ack_pending_); | 1475 EXPECT_TRUE(host_->resize_ack_pending_); |
| 1475 } | 1476 } |
| 1476 | 1477 |
| 1477 } // namespace content | 1478 } // namespace content |
| OLD | NEW |