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

Unified Diff: content/test/data/interaction-mq-dynamic.html

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)
Patch Set: Nit fix Created 3 years, 8 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/test/data/interaction-mq-dynamic.html
diff --git a/content/test/data/interaction-mq-dynamic.html b/content/test/data/interaction-mq-dynamic.html
new file mode 100644
index 0000000000000000000000000000000000000000..f841f6948140c0bdec26720f86892f236c9accdc
--- /dev/null
+++ b/content/test/data/interaction-mq-dynamic.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Dynamic interaction media query test</title>
+ <script type="text/javascript">
+ function handleMediaChange(mediaQueryList) {
+ if (mediaQueryList.matches) {
+ pass();
+ } else {
+ fail();
+ }
+ }
+
+ function start() {
+ var mql = window.matchMedia("(pointer: coarse) and (hover:hover)");
+ mql.addListener(handleMediaChange);
+ }
+
+ function pass() {
+ document.title = 'SUCCESS';
+ }
+
+ function fail() {
+ document.title = 'FAIL';
+ }
+ </script>
+</head>
+<body onLoad="start()">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698