4 <style type="text/css">
8 #main { color: black; }
12 #main { color: green; }
16 <script src="../../../http/tests/inspector/inspector-test.js"></script>
17 <script src="../../../http/tests/inspector/elements-test.js"></script>
22 InspectorTest.selectNodeAndWaitForStyles("main", step0);
26 InspectorTest.addResult("Original style:");
27 InspectorTest.dumpSelectedElementStyles();
28 applyEmulatedMedia("print");
29 InspectorTest.waitForStyles("main", step1);
33 InspectorTest.addResult("print media emulated:");
34 InspectorTest.dumpSelectedElementStyles();
35 applyEmulatedMedia("tty");
36 InspectorTest.waitForStyles("main", step2);
41 InspectorTest.addResult("tty media emulated:");
42 InspectorTest.dumpSelectedElementStyles();
43 applyEmulatedMedia("");
44 InspectorTest.waitForStyles("main", step3);
49 InspectorTest.addResult("No media emulated:");
50 InspectorTest.dumpSelectedElementStyles();
51 InspectorTest.completeTest();
54 function applyEmulatedMedia(media)
56 PageAgent.setEmulatedMedia(media);
57 WebInspector.cssModel.mediaQueryResultChanged();
63 <body onload="runTest()">
65 Tests that emulated CSS media is reflected in the Styles pane.