| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 void EnablePreferredSizeMode() { | 361 void EnablePreferredSizeMode() { |
| 362 view()->OnEnablePreferredSizeChangedMode(); | 362 view()->OnEnablePreferredSizeChangedMode(); |
| 363 } | 363 } |
| 364 | 364 |
| 365 const gfx::Size& GetPreferredSize() { | 365 const gfx::Size& GetPreferredSize() { |
| 366 view()->CheckPreferredSize(); | 366 view()->CheckPreferredSize(); |
| 367 return view()->preferred_size_; | 367 return view()->preferred_size_; |
| 368 } | 368 } |
| 369 | 369 |
| 370 void SetZoomLevel(double level) { | 370 void SetZoomLevel(double level) { |
| 371 view()->OnSetZoomLevelForView(false, level); | 371 view()->OnSetZoomLevel( |
| 372 PageMsg_SetZoomLevel_Command::USE_CURRENT_TEMPORARY_MODE, level); |
| 372 } | 373 } |
| 373 | 374 |
| 374 private: | 375 private: |
| 375 std::unique_ptr<MockKeyboard> mock_keyboard_; | 376 std::unique_ptr<MockKeyboard> mock_keyboard_; |
| 376 }; | 377 }; |
| 377 | 378 |
| 378 class DevToolsAgentTest : public RenderViewImplTest { | 379 class DevToolsAgentTest : public RenderViewImplTest { |
| 379 public: | 380 public: |
| 380 void Attach() { | 381 void Attach() { |
| 381 notifications_ = std::vector<std::string>(); | 382 notifications_ = std::vector<std::string>(); |
| (...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2393 | 2394 |
| 2394 TEST_F(DevToolsAgentTest, RuntimeEnableForcesContextsAfterNavigation) { | 2395 TEST_F(DevToolsAgentTest, RuntimeEnableForcesContextsAfterNavigation) { |
| 2395 Attach(); | 2396 Attach(); |
| 2396 DispatchDevToolsMessage("{\"id\":1,\"method\":\"Runtime.enable\"}"); | 2397 DispatchDevToolsMessage("{\"id\":1,\"method\":\"Runtime.enable\"}"); |
| 2397 EXPECT_EQ(0, CountNotifications("Runtime.executionContextCreated")); | 2398 EXPECT_EQ(0, CountNotifications("Runtime.executionContextCreated")); |
| 2398 LoadHTML("<body>page<iframe></iframe></body>"); | 2399 LoadHTML("<body>page<iframe></iframe></body>"); |
| 2399 EXPECT_EQ(2, CountNotifications("Runtime.executionContextCreated")); | 2400 EXPECT_EQ(2, CountNotifications("Runtime.executionContextCreated")); |
| 2400 } | 2401 } |
| 2401 | 2402 |
| 2402 } // namespace content | 2403 } // namespace content |
| OLD | NEW |