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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 1170623003: Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 (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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h"
9 #include "base/run_loop.h" 8 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h"
11 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
12 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
13 #include "base/thread_task_runner_handle.h"
14 #include "base/values.h" 11 #include "base/values.h"
15 #if defined(OS_WIN) 12 #if defined(OS_WIN)
16 #include "base/win/windows_version.h" 13 #include "base/win/windows_version.h"
17 #endif 14 #endif
18 #include "content/browser/frame_host/navigation_controller_impl.h" 15 #include "content/browser/frame_host/navigation_controller_impl.h"
19 #include "content/browser/frame_host/navigation_entry_impl.h" 16 #include "content/browser/frame_host/navigation_entry_impl.h"
20 #include "content/browser/frame_host/navigation_entry_screenshot_manager.h" 17 #include "content/browser/frame_host/navigation_entry_screenshot_manager.h"
21 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 18 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
22 #include "content/browser/web_contents/web_contents_impl.h" 19 #include "content/browser/web_contents/web_contents_impl.h"
23 #include "content/browser/web_contents/web_contents_view.h" 20 #include "content/browser/web_contents/web_contents_view.h"
(...skipping 18 matching lines...) Expand all
42 #include "ui/events/event_switches.h" 39 #include "ui/events/event_switches.h"
43 #include "ui/events/event_utils.h" 40 #include "ui/events/event_utils.h"
44 #include "ui/events/test/event_generator.h" 41 #include "ui/events/test/event_generator.h"
45 42
46 namespace { 43 namespace {
47 44
48 // TODO(tdresser): Find a way to avoid sleeping like this. See crbug.com/405282 45 // TODO(tdresser): Find a way to avoid sleeping like this. See crbug.com/405282
49 // for details. 46 // for details.
50 void GiveItSomeTime() { 47 void GiveItSomeTime() {
51 base::RunLoop run_loop; 48 base::RunLoop run_loop;
52 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 49 base::MessageLoop::current()->PostDelayedTask(
53 FROM_HERE, run_loop.QuitClosure(), 50 FROM_HERE,
51 run_loop.QuitClosure(),
54 base::TimeDelta::FromMillisecondsD(10)); 52 base::TimeDelta::FromMillisecondsD(10));
55 run_loop.Run(); 53 run_loop.Run();
56 } 54 }
57 55
58 // WebContentsDelegate which tracks vertical overscroll updates. 56 // WebContentsDelegate which tracks vertical overscroll updates.
59 class VerticalOverscrollTracker : public content::WebContentsDelegate { 57 class VerticalOverscrollTracker : public content::WebContentsDelegate {
60 public: 58 public:
61 VerticalOverscrollTracker() : count_(0), completed_(false) {} 59 VerticalOverscrollTracker() : count_(0), completed_(false) {}
62 ~VerticalOverscrollTracker() override {} 60 ~VerticalOverscrollTracker() override {}
63 61
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 details = dispatcher->OnEventFromSource(&release); 1138 details = dispatcher->OnEventFromSource(&release);
1141 ASSERT_FALSE(details.dispatcher_destroyed); 1139 ASSERT_FALSE(details.dispatcher_destroyed);
1142 WaitAFrame(); 1140 WaitAFrame();
1143 1141
1144 EXPECT_LT(0, tracker.num_overscroll_updates()); 1142 EXPECT_LT(0, tracker.num_overscroll_updates());
1145 EXPECT_FALSE(tracker.overscroll_completed()); 1143 EXPECT_FALSE(tracker.overscroll_completed());
1146 } 1144 }
1147 } 1145 }
1148 1146
1149 } // namespace content 1147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/webui/url_data_manager_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698