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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-far.html

Issue 2960263002: [DevTools] Move pixel tests from inspector-protocol to inspector (Closed)
Patch Set: rebased Created 3 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 3
4 <script src="../../http/tests/inspector-protocol/resources/inspector-protocol-te st.js"></script> 4 <script src="../../http/tests/inspector/inspector-test.js"></script>
5 5
6 <style> 6 <style>
7 html { 7 html {
8 overflow: hidden; 8 overflow: hidden;
9 } 9 }
10 10
11 body { 11 body {
12 margin: 0; 12 margin: 0;
13 min-height: 1000px; 13 min-height: 1000px;
14 overflow: hidden; 14 overflow: hidden;
(...skipping 14 matching lines...) Expand all
29 top: 9000px; 29 top: 9000px;
30 width: 100px; 30 width: 100px;
31 height: 100px; 31 height: 100px;
32 background-color: green; 32 background-color: green;
33 } 33 }
34 </style> 34 </style>
35 35
36 <script> 36 <script>
37 function test() 37 function test()
38 { 38 {
39 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunner.du mpAsTextWithPixelResults();"} ); 39 InspectorTest.evaluateInPage("testRunner.dumpAsTextWithPixelResults();", () => {
40 40 InspectorTest.EmulationAgent.invoke_forceViewport({x: 200, y: 9000, scal e: 2.0}).then(overrideActive);
41 InspectorTest.sendCommand("Emulation.forceViewport", { "x": 200, "y": 9000, "scale": 2.0 }, overrideActive); 41 });
42 42
43 function overrideActive(msg) 43 function overrideActive(msg)
44 { 44 {
45 // Complete the test without closing the inspector, so that the override stays active for the picture. 45 // Complete the test without closing the inspector, so that the override stays active for the picture.
46 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunne r.notifyDone();"} ); 46 InspectorTest.flushResults();
47 InspectorTest.evaluateInPage("testRunner.notifyDone();");
47 } 48 }
48 } 49 }
49 </script> 50 </script>
50 51
51 </head> 52 </head>
52 <body onload="runTest()"> 53 <body onload="runTest()">
53 <p> 54 <p>
54 Tests that a forced viewport repositions and scales an element that lies outside the normal painting area. 55 Tests that a forced viewport repositions and scales an element that lies outside the normal painting area.
55 </p> 56 </p>
56 <div id="near"></div> 57 <div id="near"></div>
57 <div id="far"></div> 58 <div id="far"></div>
58 </body> 59 </body>
59 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698