Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Side by Side Diff: chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_shim/app_shim_handler_mac.cc ('k') | chrome/browser/background/background_contents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698