{'fraction_non_alphanumeric': 0.023286759813705923, 'fraction_numerical': 0.0, 'mean_word_length': 4.852140077821011, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Power-on Hardware Self-test Framework in Web-based OS

The hardware status of mobile devices is crucial to users. If hardware fails and running application cannot perceive it, it may cause application to process wrong data and eventually make the system fall into a logically chaotic state, which may lead to severe consequences. Web-based Operating System (OS) is a mobile OS on which the application is developed by Web, but there is no mechanism for users to get hardware status in the OS. To address the above issue, we propose a hardware poweron selftest framework to deliver hardware status of Web-based OS to users. We design the framework by deep stacking three layers from bottom to top: (i) infrastructure layer, in which we register a new driver named self-test to collect the information about the hardware status from other drivers. (ii) web engine layer, in which we implement a Web API named CallCLibrary to read the status from infrastructure layer and pass it to web application; (iii) web application layer, which receives status information from lower layer and displays it to users. We implement the framework on a device equipped with Firefox OS, which is representative of Web-based OS and conduct experiments to verify the self-test framework and test the performance of CallCLibrary. Experimental results show that the proposed framework successfully captures various failure statuses of hardware and CallCLibrary outperforms native Web APIs of Web-based OS and JNI of Android.