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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.h

Issue 1351393002: Make getBluetoothManualChooserEvents() asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Go back to the callback interface. Created 5 years, 2 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 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ 5 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_
6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ 6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_
7 7
8 #include <deque>
8 #include <vector> 9 #include <vector>
9 10
11 #include "base/callback.h"
10 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
11 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
12 #include "components/test_runner/test_preferences.h" 14 #include "components/test_runner/test_preferences.h"
13 #include "components/test_runner/web_test_delegate.h" 15 #include "components/test_runner/web_test_delegate.h"
14 #include "content/public/common/page_state.h" 16 #include "content/public/common/page_state.h"
15 #include "content/public/renderer/render_view_observer.h" 17 #include "content/public/renderer/render_view_observer.h"
16 #include "content/public/renderer/render_view_observer_tracker.h" 18 #include "content/public/renderer/render_view_observer_tracker.h"
17 #include "content/shell/common/shell_test_configuration.h" 19 #include "content/shell/common/shell_test_configuration.h"
18 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationType.h" 20 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationType.h"
19 #include "v8/include/v8.h" 21 #include "v8/include/v8.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void CloseDevTools() override; 92 void CloseDevTools() override;
91 void EvaluateInWebInspector(long call_id, const std::string& script) override; 93 void EvaluateInWebInspector(long call_id, const std::string& script) override;
92 void ClearAllDatabases() override; 94 void ClearAllDatabases() override;
93 void SetDatabaseQuota(int quota) override; 95 void SetDatabaseQuota(int quota) override;
94 void SimulateWebNotificationClick(const std::string& title, 96 void SimulateWebNotificationClick(const std::string& title,
95 int action_index) override; 97 int action_index) override;
96 void SetDeviceScaleFactor(float factor) override; 98 void SetDeviceScaleFactor(float factor) override;
97 void SetDeviceColorProfile(const std::string& name) override; 99 void SetDeviceColorProfile(const std::string& name) override;
98 void SetBluetoothMockDataSet(const std::string& name) override; 100 void SetBluetoothMockDataSet(const std::string& name) override;
99 void SetBluetoothManualChooser() override; 101 void SetBluetoothManualChooser() override;
100 std::vector<std::string> GetBluetoothManualChooserEvents() override; 102 void GetBluetoothManualChooserEvents(
103 const base::Callback<void(const std::vector<std::string>&)>& callback)
104 override;
101 void SendBluetoothManualChooserEvent(const std::string& event, 105 void SendBluetoothManualChooserEvent(const std::string& event,
102 const std::string& argument) override; 106 const std::string& argument) override;
103 void SetGeofencingMockProvider(bool service_available) override; 107 void SetGeofencingMockProvider(bool service_available) override;
104 void ClearGeofencingMockProvider() override; 108 void ClearGeofencingMockProvider() override;
105 void SetGeofencingMockPosition(double latitude, double longitude) override; 109 void SetGeofencingMockPosition(double latitude, double longitude) override;
106 void SetFocus(test_runner::WebTestProxyBase* proxy, bool focus) override; 110 void SetFocus(test_runner::WebTestProxyBase* proxy, bool focus) override;
107 void SetAcceptAllCookies(bool accept) override; 111 void SetAcceptAllCookies(bool accept) override;
108 std::string PathToLocalResource(const std::string& resource) override; 112 std::string PathToLocalResource(const std::string& resource) override;
109 void SetLocale(const std::string& locale) override; 113 void SetLocale(const std::string& locale) override;
110 void TestFinished() override; 114 void TestFinished() override;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 private: 155 private:
152 // Message handlers. 156 // Message handlers.
153 void OnSetTestConfiguration(const ShellTestConfiguration& params); 157 void OnSetTestConfiguration(const ShellTestConfiguration& params);
154 void OnSessionHistory( 158 void OnSessionHistory(
155 const std::vector<int>& routing_ids, 159 const std::vector<int>& routing_ids,
156 const std::vector<std::vector<PageState> >& session_histories, 160 const std::vector<std::vector<PageState> >& session_histories,
157 const std::vector<unsigned>& current_entry_indexes); 161 const std::vector<unsigned>& current_entry_indexes);
158 void OnReset(); 162 void OnReset();
159 void OnNotifyDone(); 163 void OnNotifyDone();
160 void OnTryLeakDetection(); 164 void OnTryLeakDetection();
165 void OnReplyBluetoothManualChooserEvents(
166 const std::vector<std::string>& events);
161 167
162 // After finishing the test, retrieves the audio, text, and pixel dumps from 168 // After finishing the test, retrieves the audio, text, and pixel dumps from
163 // the TestRunner library and sends them to the browser process. 169 // the TestRunner library and sends them to the browser process.
164 void CaptureDump(); 170 void CaptureDump();
165 void CaptureDumpPixels(const SkBitmap& snapshot); 171 void CaptureDumpPixels(const SkBitmap& snapshot);
166 void CaptureDumpComplete(); 172 void CaptureDumpComplete();
167 173
168 test_runner::WebTestProxyBase* proxy_; 174 test_runner::WebTestProxyBase* proxy_;
169 175
170 RenderView* focused_view_; 176 RenderView* focused_view_;
171 177
172 test_runner::TestPreferences prefs_; 178 test_runner::TestPreferences prefs_;
173 179
174 ShellTestConfiguration test_config_; 180 ShellTestConfiguration test_config_;
175 181
176 std::vector<int> routing_ids_; 182 std::vector<int> routing_ids_;
177 std::vector<std::vector<PageState> > session_histories_; 183 std::vector<std::vector<PageState> > session_histories_;
178 std::vector<unsigned> current_entry_indexes_; 184 std::vector<unsigned> current_entry_indexes_;
179 185
186 std::deque<base::Callback<void(const std::vector<std::string>&)>>
187 get_bluetooth_events_callbacks_;
188
180 bool is_main_window_; 189 bool is_main_window_;
181 190
182 bool focus_on_next_commit_; 191 bool focus_on_next_commit_;
183 192
184 scoped_ptr<LeakDetector> leak_detector_; 193 scoped_ptr<LeakDetector> leak_detector_;
185 bool needs_leak_detector_; 194 bool needs_leak_detector_;
186 195
187 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner); 196 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner);
188 }; 197 };
189 198
190 } // namespace content 199 } // namespace content
191 200
192 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ 201 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « content/shell/common/shell_messages.h ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698