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

Side by Side Diff: LayoutTests/http/tests/inspector/elements-test.js

Issue 208223002: DevTools: [Elements] Restore selected shadow DOM elements on reload (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 var initialize_ElementTest = function() { 1 var initialize_ElementTest = function() {
2 2
3 InspectorTest.findNode = function(matchFunction, callback) 3 InspectorTest.findNode = function(matchFunction, callback)
4 { 4 {
5 callback = InspectorTest.safeWrap(callback); 5 callback = InspectorTest.safeWrap(callback);
6 var result = null; 6 var result = null;
7 var pendingRequests = 0; 7 var pendingRequests = 0;
8 function processChildren(node) 8 function processChildren(node)
9 { 9 {
10 try { 10 try {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 { 66 {
67 var result; 67 var result;
68 function callback(node) 68 function callback(node)
69 { 69 {
70 result = node; 70 result = node;
71 } 71 }
72 InspectorTest.nodeWithId(idValue, callback); 72 InspectorTest.nodeWithId(idValue, callback);
73 return result; 73 return result;
74 } 74 }
75 75
76 InspectorTest.selectNode = function(node)
77 {
78 WebInspector.Revealer.reveal(node);
79 }
80
76 InspectorTest.selectNodeWithId = function(idValue, callback) 81 InspectorTest.selectNodeWithId = function(idValue, callback)
77 { 82 {
78 callback = InspectorTest.safeWrap(callback); 83 callback = InspectorTest.safeWrap(callback);
79 function onNodeFound(node) 84 function onNodeFound(node)
80 { 85 {
81 WebInspector.Revealer.reveal(node); 86 InspectorTest.selectNode(node);
82 callback(node); 87 callback(node);
83 } 88 }
84 InspectorTest.nodeWithId(idValue, onNodeFound); 89 InspectorTest.nodeWithId(idValue, onNodeFound);
85 } 90 }
86 91
87 function waitForStylesRebuild(matchFunction, callback, requireRebuild) 92 function waitForStylesRebuild(matchFunction, callback, requireRebuild)
88 { 93 {
89 (function sniff(node, rebuild) 94 (function sniff(node, rebuild)
90 { 95 {
91 if ((rebuild || !requireRebuild) && node && matchFunction(node)) { 96 if ((rebuild || !requireRebuild) && node && matchFunction(node)) {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 { 723 {
719 var rectNames = ["margin", "border", "padding", "content"]; 724 var rectNames = ["margin", "border", "padding", "content"];
720 var rects = window.internals.inspectorHighlightRects(document); 725 var rects = window.internals.inspectorHighlightRects(document);
721 for (var i = 0; i < rects.length; i++) 726 for (var i = 0; i < rects.length; i++)
722 { 727 {
723 var rectName = (i < rectNames.length ? rectNames[i] : "untitled"); 728 var rectName = (i < rectNames.length ? rectNames[i] : "untitled");
724 var rect = rects.item(i); 729 var rect = rects.item(i);
725 output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")"); 730 output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")");
726 } 731 }
727 } 732 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698