Skip to content

Commit

Permalink
Remove display feature parts
Browse files Browse the repository at this point in the history
  • Loading branch information
JuhaVainio committed Mar 28, 2024
1 parent 6d08aa0 commit d77455b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 98 deletions.
12 changes: 0 additions & 12 deletions resources/testdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1032,14 +1032,6 @@
console.log('JV666 TEST_DRIVER testdriver.js set_device_posture: ' + posture);
return window.test_driver_internal.set_device_posture(posture, context);
},

/**
* Sets the viewport orientation.
*/
async set_display_feature(orientation, offset, mask_length, context=null) {
console.log('JV666 TEST_DRIVER testdriver.js set_display_feature: ' + orientation + ' ' + offset + ' ' + mask_length);
return window.test_driver_internal.set_display_feature(orientation, offset, mask_length, context);
}
};

window.test_driver_internal = {
Expand Down Expand Up @@ -1223,10 +1215,6 @@

async set_device_posture(posture, context=null) {
throw new Error("set_device_posture() is not implemented by testdriver-vendor.js");
},

async set_display_feature(orientation, offset, mask_length, context=null) {
throw new Error("set_display_feature() is not implemented by testdriver-vendor.js");
}
};
})();
17 changes: 1 addition & 16 deletions tools/wptrunner/wptrunner/executors/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,20 +455,6 @@ def __call__(self, payload):
self.logger.debug("JV666 tools/wptrunner/wptrunner/executors/actions.py set_device_posture: %s" % posture)
return self.protocol.device_posture.set_device_posture(posture)

class SetDisplayFeature:
name = "set_display_feature"

def __init__(self, logger, protocol):
self.logger = logger
self.protocol = protocol

def __call__(self, payload):
orientation = payload["orientation"]
offset = payload["offset"]
mask_length = payload["mask_length"]
self.logger.debug("JV666 tools/wptrunner/wptrunner/executors/actions.py set_display_feature: %s" % orientation)
return self.protocol.display_feature.set_display_feature(orientation, offset, mask_length)

actions = [ClickAction,
DeleteAllCookiesAction,
GetAllCookiesAction,
Expand Down Expand Up @@ -503,5 +489,4 @@ def __call__(self, payload):
UpdateVirtualSensorAction,
RemoveVirtualSensorAction,
GetVirtualSensorInformationAction,
SetDevicePostureAction,
SetDisplayFeature]
SetDevicePostureAction]
15 changes: 1 addition & 14 deletions tools/wptrunner/wptrunner/executors/executorwebdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
FedCMProtocolPart,
VirtualSensorProtocolPart,
DevicePostureProtocolPart,
DisplayFeatureProtocolPart,
merge_dicts)

from webdriver.client import Session
Expand Down Expand Up @@ -442,17 +441,6 @@ def set_device_posture(self, posture):
self.logger.debug("JV666 tools/wptrunner/wptrunner/executors/executorwebdriver.py set_device_posture: %s" % posture)
return self.webdriver.send_session_command("POST", "deviceposture", body)

class WebDriverDisplayFeaturePart(DisplayFeatureProtocolPart):
def setup(self):
self.webdriver = self.parent.webdriver

def set_display_feature(self, orientation, offset, mask_length):
body = {"orientation": orientation}
body.update({"offset": offset})
body.update({"maskLength": mask_length})
self.logger.debug("JV666 tools/wptrunner/wptrunner/executors/executorwebdriver.py set_display_feature: %s" % orientation)
return self.webdriver.send_session_command("POST", "displayfeature", body)

class WebDriverProtocol(Protocol):
implements = [WebDriverBaseProtocolPart,
WebDriverTestharnessProtocolPart,
Expand All @@ -472,8 +460,7 @@ class WebDriverProtocol(Protocol):
WebDriverFedCMProtocolPart,
WebDriverDebugProtocolPart,
WebDriverVirtualSensorPart,
WebDriverDevicePosturePart,
WebDriverDisplayFeaturePart]
WebDriverDevicePosturePart]

def __init__(self, executor, browser, capabilities, **kwargs):
super().__init__(executor, browser)
Expand Down
10 changes: 0 additions & 10 deletions tools/wptrunner/wptrunner/executors/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,13 +812,3 @@ class DevicePostureProtocolPart(ProtocolPart):
@abstractmethod
def set_device_posture(self, posture):
pass

class DisplayFeatureProtocolPart(ProtocolPart):
"""Protocol part for Display Feature"""
__metaclass__ = ABCMeta

name = "display_feature"

@abstractmethod
def set_display_feature(self, orientation, offset, mask_length):
pass
5 changes: 0 additions & 5 deletions tools/wptrunner/wptrunner/testdriver-extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,4 @@
console.log('JV666 TEST_DRIVER tools/wptrunner/wptrunner/testdriver-extra.js set_device_posture: ' + posture);
return create_action("set_device_posture", {posture, context});
};

window.test_driver_internal.set_display_feature = function(orientation, offset, mask_length, context=null) {
console.log('JV666 TEST_DRIVER tools/wptrunner/wptrunner/testdriver-extra.js set_display_feature: ' + orientation + ' ' + offset + ' ' + mask_length);
return create_action("set_display_feature", {orientation, offset, mask_length, context});
};
})();
41 changes: 0 additions & 41 deletions visual-viewport/display-feature.html

This file was deleted.

0 comments on commit d77455b

Please sign in to comment.