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

Side by Side Diff: LayoutTests/inspector/layers/layers-3d-view-hit-testing.html

Issue 711423002: DevTools: better visual feedback for hovered objects is Layers3DView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed review comments, fixed test Created 6 years, 1 month 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
« no previous file with comments | « no previous file | Source/devtools/front_end/layers/LayersPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/layers-test.js"></script> 4 <script src="../../http/tests/inspector/layers-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 setTimeout(InspectorTest.completeTest.bind(InspectorTest), 4000);
8 var contentRoot; 9 var contentRoot;
9 var layers; 10 var layers;
10 var rootOffsetXInPixels, rootOffsetYInPixels, rootHeightInPixels, rootWidthI nPixels; 11 var rootOffsetXInPixels, rootOffsetYInPixels, rootHeightInPixels, rootWidthI nPixels;
11 var canvas; 12 var canvas;
12 const ButtonByEventType = { mousemove: -1, mousedown: 0, mouseup: 0 }; 13 const ButtonByEventType = { mousemove: -1, mousedown: 0, mouseup: 0 };
13 14
14 function initLayers() 15 function initLayers()
15 { 16 {
16 layerA = InspectorTest.findLayerByNodeIdAttribute("a"); 17 layerA = InspectorTest.findLayerByNodeIdAttribute("a");
17 layerB = InspectorTest.findLayerByNodeIdAttribute("b"); 18 layerB = InspectorTest.findLayerByNodeIdAttribute("b");
(...skipping 28 matching lines...) Expand all
46 InspectorTest.dispatchMouseEvent(eventType, ButtonByEventType[eventType] , canvas, rootOffsetXInPixels + rootWidthInPixels * x, rootOffsetYInPixels + roo tHeightInPixels * y); 47 InspectorTest.dispatchMouseEvent(eventType, ButtonByEventType[eventType] , canvas, rootOffsetXInPixels + rootWidthInPixels * x, rootOffsetYInPixels + roo tHeightInPixels * y);
47 } 48 }
48 49
49 function dumpStateForOutlineType(type) 50 function dumpStateForOutlineType(type)
50 { 51 {
51 var outlined = "none"; 52 var outlined = "none";
52 53
53 function checkLayer(layerInfo) 54 function checkLayer(layerInfo)
54 { 55 {
55 var l3dview = WebInspector.panels.layers._layers3DView; 56 var l3dview = WebInspector.panels.layers._layers3DView;
56 if (l3dview._lastActiveObject[type] && layerInfo.layer.id() === l3dv iew._lastActiveObject[type].layer.id()) 57 if (l3dview._lastSelection[type] && layerInfo.layer.id() === l3dview ._lastSelection[type].layer.id())
57 outlined = layerInfo.name; 58 outlined = layerInfo.name;
58 } 59 }
59 60
60 layers.forEach(checkLayer); 61 layers.forEach(checkLayer);
61 InspectorTest.addResult(type + " layer: " + outlined); 62 InspectorTest.addResult(type + " layer: " + outlined);
62 } 63 }
63 64
64 function dumpOutlinedStateForLayers() 65 function dumpOutlinedStateForLayers()
65 { 66 {
66 InspectorTest.addResult("State of layers:"); 67 InspectorTest.addResult("State of layers:");
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 InspectorTest.requestLayers(onGotLayers); 101 InspectorTest.requestLayers(onGotLayers);
101 } 102 }
102 </script> 103 </script>
103 </head> 104 </head>
104 <body onload="runTest()" style="height:500px;width:500px;"> 105 <body onload="runTest()" style="height:500px;width:500px;">
105 <div id="a" style="transform:translateZ(0px) translateY(60px) rotateZ(45deg);wid th:300px;height:300px;margin-left:100px;"> 106 <div id="a" style="transform:translateZ(0px) translateY(60px) rotateZ(45deg);wid th:300px;height:300px;margin-left:100px;">
106 <div id="b" style="transform:translateX(0px) translateY(0px) translateZ(0px) rotateX(45deg) rotateY(45deg);width:300px;height:300px;"></div> 107 <div id="b" style="transform:translateX(0px) translateY(0px) translateZ(0px) rotateX(45deg) rotateY(45deg);width:300px;height:300px;"></div>
107 </div> 108 </div>
108 </body> 109 </body>
109 </html> 110 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/layers/LayersPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698