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

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

Issue 2927573004: DevTools: migrate StylesSidebarPane to shadow (Closed)
Patch Set: with similarity 10 Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-2/filter-matched-styles-hides-separators.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var initialize_ElementTest = function() { 1 var initialize_ElementTest = function() {
2 2
3 InspectorTest.preloadPanel("elements"); 3 InspectorTest.preloadPanel("elements");
4 4
5 InspectorTest.inlineStyleSection = function() 5 InspectorTest.inlineStyleSection = function()
6 { 6 {
7 return UI.panels.elements._stylesWidget._sectionBlocks[0].sections[0]; 7 return UI.panels.elements._stylesWidget._sectionBlocks[0].sections[0];
8 } 8 }
9 9
10 InspectorTest.computedStyleWidget = function() 10 InspectorTest.computedStyleWidget = function()
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 923
924 InspectorTest.addNewRuleInStyleSheet = function(styleSheetHeader, selector, call back) 924 InspectorTest.addNewRuleInStyleSheet = function(styleSheetHeader, selector, call back)
925 { 925 {
926 InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_addBlankSec tion", onBlankSection.bind(null, selector, callback)); 926 InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_addBlankSec tion", onBlankSection.bind(null, selector, callback));
927 UI.panels.elements._stylesWidget._createNewRuleInStyleSheet(styleSheetHeader ); 927 UI.panels.elements._stylesWidget._createNewRuleInStyleSheet(styleSheetHeader );
928 } 928 }
929 929
930 InspectorTest.addNewRule = function(selector, callback) 930 InspectorTest.addNewRule = function(selector, callback)
931 { 931 {
932 // Click "Add new rule". 932 // Click "Add new rule".
933 document.querySelector(".styles-pane-toolbar").shadowRoot.querySelector(".la rgeicon-add").click(); 933 UI.panels.elements._stylesWidget.contentElement.querySelector(".styles-pane- toolbar").shadowRoot.querySelector(".largeicon-add").click();
934 InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_addBlankSec tion", onBlankSection.bind(null, selector, callback)); 934 InspectorTest.addSniffer(Elements.StylesSidebarPane.prototype, "_addBlankSec tion", onBlankSection.bind(null, selector, callback));
935 } 935 }
936 936
937 function onBlankSection(selector, callback) 937 function onBlankSection(selector, callback)
938 { 938 {
939 var section = InspectorTest.firstMatchedStyleSection(); 939 var section = InspectorTest.firstMatchedStyleSection();
940 if (typeof selector === "string") 940 if (typeof selector === "string")
941 section._selectorElement.textContent = selector; 941 section._selectorElement.textContent = selector;
942 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter") ); 942 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter") );
943 InspectorTest.waitForSelectorCommitted(callback.bind(null, section)); 943 InspectorTest.waitForSelectorCommitted(callback.bind(null, section));
(...skipping 19 matching lines...) Expand all
963 InspectorTest.dumpAnimationTimeline = function(timeline) 963 InspectorTest.dumpAnimationTimeline = function(timeline)
964 { 964 {
965 for (var ui of timeline._uiAnimations) { 965 for (var ui of timeline._uiAnimations) {
966 InspectorTest.addResult(ui.animation().type()); 966 InspectorTest.addResult(ui.animation().type());
967 InspectorTest.addResult(ui._nameElement.innerHTML); 967 InspectorTest.addResult(ui._nameElement.innerHTML);
968 InspectorTest.addResult(ui._svg.innerHTML); 968 InspectorTest.addResult(ui._svg.innerHTML);
969 } 969 }
970 } 970 }
971 971
972 }; 972 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-2/filter-matched-styles-hides-separators.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698