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