| 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 "content/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 std::unique_ptr<base::Value> value; | 377 std::unique_ptr<base::Value> value; |
| 378 value = content::ExecuteScriptAndGetValue(main_frame, "get_current()"); | 378 value = content::ExecuteScriptAndGetValue(main_frame, "get_current()"); |
| 379 if (!value->GetAsInteger(&index)) | 379 if (!value->GetAsInteger(&index)) |
| 380 index = -1; | 380 index = -1; |
| 381 return index; | 381 return index; |
| 382 } | 382 } |
| 383 | 383 |
| 384 int ExecuteScriptAndExtractInt(const std::string& script) { | 384 int ExecuteScriptAndExtractInt(const std::string& script) { |
| 385 int value = 0; | 385 int value = 0; |
| 386 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( | 386 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( |
| 387 shell()->web_contents(), | 387 shell(), "domAutomationController.send(" + script + ")", &value)); |
| 388 "domAutomationController.send(" + script + ")", | |
| 389 &value)); | |
| 390 return value; | 388 return value; |
| 391 } | 389 } |
| 392 | 390 |
| 393 RenderViewHost* GetRenderViewHost() const { | 391 RenderViewHost* GetRenderViewHost() const { |
| 394 RenderViewHost* const rvh = shell()->web_contents()->GetRenderViewHost(); | 392 RenderViewHost* const rvh = shell()->web_contents()->GetRenderViewHost(); |
| 395 CHECK(rvh); | 393 CHECK(rvh); |
| 396 return rvh; | 394 return rvh; |
| 397 } | 395 } |
| 398 | 396 |
| 399 RenderWidgetHostImpl* GetRenderWidgetHost() const { | 397 RenderWidgetHostImpl* GetRenderWidgetHost() const { |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 details = dispatcher->OnEventFromSource(&release); | 1127 details = dispatcher->OnEventFromSource(&release); |
| 1130 ASSERT_FALSE(details.dispatcher_destroyed); | 1128 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1131 WaitAFrame(); | 1129 WaitAFrame(); |
| 1132 | 1130 |
| 1133 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1131 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1134 EXPECT_FALSE(tracker.overscroll_completed()); | 1132 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1135 } | 1133 } |
| 1136 } | 1134 } |
| 1137 | 1135 |
| 1138 } // namespace content | 1136 } // namespace content |
| OLD | NEW |