| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 // In the drag drop test we add 20px padding to the page body because on | 1028 // In the drag drop test we add 20px padding to the page body because on |
| 1029 // windows if we get too close to the edge of the window the resize cursor | 1029 // windows if we get too close to the edge of the window the resize cursor |
| 1030 // appears and we start dragging the window edge. | 1030 // appears and we start dragging the window edge. |
| 1031 corner_.Offset(20, 20); | 1031 corner_.Offset(20, 20); |
| 1032 | 1032 |
| 1033 // Flush any pending events to make sure we start with a clean slate. | 1033 // Flush any pending events to make sure we start with a clean slate. |
| 1034 content::RunAllPendingInMessageLoop(); | 1034 content::RunAllPendingInMessageLoop(); |
| 1035 for (;;) { | 1035 for (;;) { |
| 1036 base::RunLoop run_loop; | 1036 base::RunLoop run_loop; |
| 1037 quit_closure_ = run_loop.QuitClosure(); | 1037 quit_closure_ = run_loop.QuitClosure(); |
| 1038 base::MessageLoop::current()->PostTask( | 1038 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1039 FROM_HERE, base::Bind(&WebViewInteractiveTestBase::DragTestStep1, | 1039 FROM_HERE, base::Bind(&WebViewInteractiveTestBase::DragTestStep1, |
| 1040 base::Unretained(this))); | 1040 base::Unretained(this))); |
| 1041 run_loop.Run(); | 1041 run_loop.Run(); |
| 1042 | 1042 |
| 1043 if (last_drop_data_ == "Drop me") | 1043 if (last_drop_data_ == "Drop me") |
| 1044 break; | 1044 break; |
| 1045 | 1045 |
| 1046 LOG(INFO) << "Drag was cancelled in interactive_test, restarting drag"; | 1046 LOG(INFO) << "Drag was cancelled in interactive_test, restarting drag"; |
| 1047 | 1047 |
| 1048 // Reset state for next try. | 1048 // Reset state for next try. |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 // this time. | 1340 // this time. |
| 1341 for (size_t i = 0; i < 4; ++i) | 1341 for (size_t i = 0; i < 4; ++i) |
| 1342 SendKeyPressToPlatformApp(ui::VKEY_TAB); | 1342 SendKeyPressToPlatformApp(ui::VKEY_TAB); |
| 1343 ExtensionTestMessageListener webview_button_not_focused_listener( | 1343 ExtensionTestMessageListener webview_button_not_focused_listener( |
| 1344 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); | 1344 "WebViewInteractiveTest.WebViewButtonWasNotFocused", false); |
| 1345 webview_button_not_focused_listener.set_failure_message( | 1345 webview_button_not_focused_listener.set_failure_message( |
| 1346 "WebViewInteractiveTest.WebViewButtonWasFocused"); | 1346 "WebViewInteractiveTest.WebViewButtonWasFocused"); |
| 1347 SendMessageToEmbedder("verify"); | 1347 SendMessageToEmbedder("verify"); |
| 1348 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); | 1348 EXPECT_TRUE(webview_button_not_focused_listener.WaitUntilSatisfied()); |
| 1349 } | 1349 } |
| OLD | NEW |