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

Side by Side Diff: LayoutTests/inspector-protocol/css/media-query-listener-exception.html

Issue 337883003: Call media query change listeners asynchronously. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests fixed Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script> 4 <script>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 } 8 }
9 9
10 var theMediaQueryList = window.matchMedia("print"); 10 var theMediaQueryList = window.matchMedia("print");
11 11
12 theMediaQueryList.addListener(function(aMediaQueryList) { 12 theMediaQueryList.addListener(function(aMediaQueryList) {
13 objectThatDoesNotExist.produceError(); 13 objectThatDoesNotExist.produceError();
14 }); 14 });
15 15
16 function test() 16 function test()
17 { 17 {
18 function didSetEmulatedMedia(messageObject) 18 function didSetEmulatedMedia(messageObject)
19 { 19 {
20 if (messageObject.error) 20 if (messageObject.error)
21 InspectorTest.log("FAILED: " + messageObject.error.message); 21 InspectorTest.log("FAILED: " + messageObject.error.message);
22 InspectorTest.sendCommand("Page.disable", {}); 22 InspectorTest.sendCommand("Page.disable", {});
23 InspectorTest.completeTest(); 23 setTimeout("InspectorTest.completeTest();", 20);
24 } 24 }
25 25
26 InspectorTest.sendCommand("Page.enable", {}); 26 InspectorTest.sendCommand("Page.enable", {});
27 InspectorTest.sendCommand("Page.setEmulatedMedia", { 27 InspectorTest.sendCommand("Page.setEmulatedMedia", {
28 "media": "print" 28 "media": "print"
29 }, didSetEmulatedMedia); 29 }, didSetEmulatedMedia);
30 } 30 }
31 </script> 31 </script>
32 </head> 32 </head>
33 <body onload="runTest()"> 33 <body onload="runTest()">
34 <p>Test that uncaught exception in MediaQueryListListener will be reported to th e console. On success you should see two exceptions in the listener logged to th e console (first time when the media type is overridden and second - when they a re restored). <a href="https://bugs.webkit.org/show_bug.cgi?id=105162">Bug 10516 2.</p> 34 <p>Test that uncaught exception in MediaQueryListListener will be reported to th e console. On success you should see two exceptions in the listener logged to th e console (first time when the media type is overridden and second - when they a re restored). <a href="https://bugs.webkit.org/show_bug.cgi?id=105162">Bug 10516 2.</p>
35 </body> 35 </body>
36 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698