Orientation Change Simulation in Web Browser Test Environments
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Testing websites and mobile applications' response to orientation change events is challenging due to the inability of stationary devices and server-class hardware to simulate physical rotation, as they lack the necessary orientation change sensors found in mobile devices.
Innovation Solution
A computer-implemented method and system that simulate an orientation change by retrieving an orientation action from a test script, setting a window orientation variable, issuing a resize command, and dispatching a change orientation event to the rendering engine, allowing for the simulation of orientation changes in a test environment.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If testing is performed on stationary devices or server-class hardware, then cost and technological challenges are reduced, but the ability to generate orientation change events is lost
Solution Approach 1:
The patent replaces the mechanical/physical orientation change mechanism (physical rotation of mobile devices with sensors) with a software-based simulation system. The simulation environment uses JavaScript code to generate synthetic orientation change events that mimic the behavior of physical sensors, allowing testing on stationary hardware without requiring actual mobile devices or their physical rotation capabilities.
2Adaptability or versatility
If physical mobile devices are used for testing, then orientation change events can be naturally generated, but cost and technological challenges increase
Solution Approach 1:
The patent creates a virtual copy of the orientation change event mechanism. Instead of using actual mobile devices with physical sensors, the system replicates the essential behavior of orientation change events through software simulation. The synthetic events copied from real sensor behavior allow testing to proceed on inexpensive stationary hardware while maintaining the functional characteristics needed for application testing.
3Ease of operation
If mobile device simulation environments are used, then testing can be performed on stationary hardware, but the environment lacks physical orientation change sensors
Solution Approach 1:
The patent introduces an intermediary layer (software simulation module) that bridges the gap between the stationary hardware environment and the required orientation change detection functionality. This intermediary generates synthetic orientation change events that mediate between the lack of physical sensors in the simulation environment and the need for orientation change testing, allowing applications to be tested for orientation responsiveness without actual physical sensors.
Data Source
AI summary
A computer-implemented method is presented for simulating an orientation change on a computing device in a test environment. The method includes: retrieving an orientation action from a test script, the test script defined in accordance with a scripting language and the orientation action specifying an angle of rotation to simulate; setting a value of a window orientation variable in a web browser, the value of the window orientation variable correlating to the angle of rotation specified by the orientation action; issuing a resize command to a window resize function supported by the web browser; and issuing a change orientation event to a rendering engine associated with the web browser.


