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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/device-mode/forced-viewport-far-layered.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 15 matching lines...) Expand all
30 width: 100px; 30 width: 100px;
31 height: 100px; 31 height: 100px;
32 background-color: green; 32 background-color: green;
33 transform: translateZ(0px); /* force separate layer */ 33 transform: translateZ(0px); /* force separate layer */
34 } 34 }
35 </style> 35 </style>
36 36
37 <script> 37 <script>
38 function test() 38 function test()
39 { 39 {
40 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunner.du mpAsTextWithPixelResults();"} ); 40 InspectorTest.evaluateInPage("testRunner.dumpAsTextWithPixelResults();", () => {
41 41 InspectorTest.EmulationAgent.invoke_forceViewport({x: 200, y: 9000, scal e: 2.0}).then(overrideActive);
42 InspectorTest.sendCommand("Emulation.forceViewport", { "x": 200, "y": 9000, "scale": 2.0 }, overrideActive); 42 });
43 43
44 function overrideActive(msg) 44 function overrideActive(msg)
45 { 45 {
46 // Complete the test without closing the inspector, so that the override stays active for the picture. 46 // Complete the test without closing the inspector, so that the override stays active for the picture.
47 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testRunne r.notifyDone();"} ); 47 InspectorTest.flushResults();
48 InspectorTest.evaluateInPage("testRunner.notifyDone();");
48 } 49 }
49 } 50 }
50 </script> 51 </script>
51 52
52 </head> 53 </head>
53 <body onload="runTest()"> 54 <body onload="runTest()">
54 <p> 55 <p>
55 Tests that a forced viewport repositions and scales an element on a separate lay er that lies outside the normal painting area. 56 Tests that a forced viewport repositions and scales an element on a separate lay er that lies outside the normal painting area.
56 </p> 57 </p>
57 <div id="near"></div> 58 <div id="near"></div>
58 <div id="far"></div> 59 <div id="far"></div>
59 </body> 60 </body>
60 </html> 61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698