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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/layers/no-overlay-layers.html

Issue 2819183002: [DevTools] Consolidate overlay-related functionality in Overlay domain (Closed)
Patch Set: rebased bad merge Created 3 years, 8 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 <style> 3 <style>
4 .layer { 4 .layer {
5 transform: translateZ(10px); 5 transform: translateZ(10px);
6 opacity: 0.8; 6 opacity: 0.8;
7 } 7 }
8 </style> 8 </style>
9 <script src="../../http/tests/inspector/inspector-test.js"></script> 9 <script src="../../http/tests/inspector/inspector-test.js"></script>
10 <script src="../../http/tests/inspector/layers-test.js"></script> 10 <script src="../../http/tests/inspector/layers-test.js"></script>
11 <script> 11 <script>
12 12
13 function updateGeometry() 13 function updateGeometry()
14 { 14 {
15 document.getElementById("a").style.width = "300px"; 15 document.getElementById("a").style.width = "300px";
16 } 16 }
17 17
18 function test() 18 function test()
19 { 19 {
20 var layersBeforeHighlight = []; 20 var layersBeforeHighlight = [];
21 21
22 InspectorTest.requestLayers(step1); 22 InspectorTest.requestLayers(step1);
23 23
24 function step1() 24 function step1()
25 { 25 {
26 // Assure layer objects are not re-created during updates. 26 // Assure layer objects are not re-created during updates.
27 InspectorTest.layerTreeModel().layerTree().forEachLayer(function(layer) { layersBeforeHighlight.push(layer.id()); }); 27 InspectorTest.layerTreeModel().layerTree().forEachLayer(function(layer) { layersBeforeHighlight.push(layer.id()); });
28 InspectorTest.DOMAgent.highlightRect(0, 0, 200, 200, {r:255, g:0, b:0}); 28 InspectorTest.OverlayAgent.highlightRect(0, 0, 200, 200, {r:255, g:0, b: 0});
29 InspectorTest.evaluateAndRunWhenTreeChanges("requestAnimationFrame(updat eGeometry)", step2); 29 InspectorTest.evaluateAndRunWhenTreeChanges("requestAnimationFrame(updat eGeometry)", step2);
30 } 30 }
31 31
32 function step2() 32 function step2()
33 { 33 {
34 var layersAfterHighlight = []; 34 var layersAfterHighlight = [];
35 InspectorTest.layerTreeModel().layerTree().forEachLayer(function(layer) { layersAfterHighlight.push(layer.id()); }); 35 InspectorTest.layerTreeModel().layerTree().forEachLayer(function(layer) { layersAfterHighlight.push(layer.id()); });
36 layersBeforeHighlight.sort(); 36 layersBeforeHighlight.sort();
37 layersAfterHighlight.sort(); 37 layersAfterHighlight.sort();
38 InspectorTest.assertEquals(JSON.stringify(layersBeforeHighlight), JSON.s tringify(layersAfterHighlight)); 38 InspectorTest.assertEquals(JSON.stringify(layersBeforeHighlight), JSON.s tringify(layersAfterHighlight));
39 InspectorTest.addResult("DONE"); 39 InspectorTest.addResult("DONE");
40 InspectorTest.completeTest(); 40 InspectorTest.completeTest();
41 } 41 }
42 } 42 }
43 43
44 </script> 44 </script>
45 </head> 45 </head>
46 <body onload="runTest()"> 46 <body onload="runTest()">
47 <div id="a" style="width: 200px; height: 200px" class="layer"> 47 <div id="a" style="width: 200px; height: 200px" class="layer">
48 </div> 48 </div>
49 </body> 49 </body>
50 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698