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

Unified Diff: content/browser/device_sensors/device_sensor_browsertest.cc

Issue 2896583005: Reland: Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors (Closed)
Patch Set: updated test code Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/device_sensors/device_sensor_browsertest.cc
diff --git a/content/browser/device_sensors/device_sensor_browsertest.cc b/content/browser/device_sensors/device_sensor_browsertest.cc
index ef16d3810c34451a599a2cac2b32b964eb30b8e7..4e2bc2b5bb5c27e7edf07e3eb5892f1eee9637ad 100644
--- a/content/browser/device_sensors/device_sensor_browsertest.cc
+++ b/content/browser/device_sensors/device_sensor_browsertest.cc
@@ -315,18 +315,6 @@ IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, OrientationAbsoluteTest) {
orientation_absolute_stopped_runloop_->Run();
}
-IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, MotionTest) {
Reilly Grant (use Gerrit) 2017/05/22 20:29:46 Where did these tests move to?
juncai 2017/05/23 02:30:23 Talked to reillyg@ offline, these tests are alread
timvolodine 2017/05/23 12:33:40 what is the reason for removing this? strictly spe
juncai 2017/05/23 21:33:55 I think the layout tests at: //third_party/WebKit/
timvolodine 2017/05/24 15:30:15 The //third_party/WebKit/LayoutTests/device_orient
juncai 2017/05/26 02:38:52 Thanks for the comments. I updated device sensors
- // The test page will register an event handler for motion events,
- // expects to get an event with fake values, then removes the event
- // handler and navigates to #pass.
- GURL test_url = GetTestUrl("device_sensors", "device_motion_test.html");
- NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 2);
-
- EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref());
- motion_started_runloop_->Run();
- motion_stopped_runloop_->Run();
-}
-
IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, OrientationNullTest) {
// The test page registers an event handler for orientation events and
// expects to get an event with null values, because no sensor data can be
@@ -355,19 +343,6 @@ IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, OrientationAbsoluteNullTest) {
orientation_absolute_stopped_runloop_->Run();
}
-IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, MotionNullTest) {
- // The test page registers an event handler for motion events and
- // expects to get an event with null values, because no sensor data can be
- // provided.
- fetcher_->SetSensorDataAvailable(false);
- GURL test_url = GetTestUrl("device_sensors", "device_motion_null_test.html");
- NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 2);
-
- EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref());
- motion_started_runloop_->Run();
- motion_stopped_runloop_->Run();
-}
-
IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, NullTestWithAlert) {
// The test page registers an event handlers for motion/orientation events and
// expects to get events with null values. The test raises a modal alert
@@ -385,8 +360,6 @@ IN_PROC_BROWSER_TEST_F(DeviceSensorBrowserTest, NullTestWithAlert) {
// delay, crbug.com/360044.
WaitForAlertDialogAndQuitAfterDelay(base::TimeDelta::FromMilliseconds(500));
- motion_started_runloop_->Run();
- motion_stopped_runloop_->Run();
orientation_started_runloop_->Run();
orientation_stopped_runloop_->Run();
same_tab_observer.Wait();
« no previous file with comments | « no previous file | content/public/test/layouttest_support.h » ('j') | content/renderer/device_sensors/device_motion_event_pump.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698