diff options
Diffstat (limited to 'dom/base/test/file_record_orientation.html')
-rw-r--r-- | dom/base/test/file_record_orientation.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dom/base/test/file_record_orientation.html b/dom/base/test/file_record_orientation.html new file mode 100644 index 000000000..a01587507 --- /dev/null +++ b/dom/base/test/file_record_orientation.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<body> +<script> +var recordedOrientations = []; + +screen.orientation.onchange = function() { + recordedOrientations.push(screen.orientation.type); +}; + +window.addEventListener("message", function(event) { + if (event.data == "report") { + event.source.postMessage(recordedOrientations, "*"); + } +}, false); +</script> |