Changeset 89804 in webkit
- Timestamp:
- Jun 27, 2011 1:15:01 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r89799 r89804 1 2011-06-26 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: roll out r88337 for making tests flaky. 6 https://bugs.webkit.org/show_bug.cgi?id=63422 7 8 * http/tests/inspector/elements-test.js: 9 (initialize_ElementTest.InspectorTest.selectNodeWithId.onNodeFound): 10 (initialize_ElementTest.InspectorTest.selectNodeWithId): 11 (initialize_ElementTest.InspectorTest.waitForStyles): 12 (initialize_ElementTest.InspectorTest.selectNodeAndWaitForStyles.nodeSelected): 13 (initialize_ElementTest.InspectorTest.selectNodeAndWaitForStyles.stylesUpdated): 14 (initialize_ElementTest.InspectorTest.selectNodeAndWaitForStyles): 15 * http/tests/inspector/inspect-iframe-from-different-domain.html: 16 * inspector/elements/edit-dom-actions.html: 17 * inspector/elements/elements-delete-inline-style.html: 18 * inspector/elements/elements-panel-styles.html: 19 * inspector/styles/metrics-box-sizing.html: 20 * inspector/styles/parse-utf8-bom.html: 21 * inspector/styles/styles-add-blank-property.html: 22 * inspector/styles/styles-add-invalid-property.html: 23 * inspector/styles/styles-cancel-editing.html: 24 * inspector/styles/styles-commit-editing.html: 25 * inspector/styles/styles-computed-trace.html: 26 * inspector/styles/styles-disable-inherited.html: 27 * inspector/styles/styles-disable-then-change.html: 28 * inspector/styles/styles-disable-then-delete.html: 29 * inspector/styles/styles-disable-then-enable.html: 30 * inspector/styles/styles-iframe-expected.txt: 31 * inspector/styles/styles-iframe.html: 32 * inspector/styles/styles-source-lines-expected.txt: 33 * inspector/styles/styles-source-lines-inline.html: 34 * inspector/styles/styles-source-lines.html: 35 * inspector/styles/styles-update-from-js-expected.txt: 36 * inspector/styles/styles-update-from-js.html: 37 * inspector/styles/styles-url-linkify.html: 38 * inspector/styles/up-down-numerics-and-colors-expected.txt: 39 * inspector/styles/up-down-numerics-and-colors.html: 40 1 41 2011-06-27 Csaba Osztrogonác <ossy@webkit.org> 2 42 -
trunk/LayoutTests/http/tests/inspector/elements-test.js
r89347 r89804 65 65 InspectorTest.selectNodeWithId = function(idValue, callback) 66 66 { 67 callback = InspectorTest.safeWrap(callback); 67 68 function onNodeFound(node) 68 69 { 69 InspectorTest.selectNode(node, callback); 70 if (node) 71 WebInspector.updateFocusedNode(node.id); 72 callback(node); 70 73 } 71 74 InspectorTest.nodeWithId(idValue, onNodeFound); 72 }; 73 74 InspectorTest.selectNode = function(node, callback) 75 { 76 callback = InspectorTest.safeWrap(callback); 77 if (node) 78 WebInspector.updateFocusedNode(node.id); 79 InspectorTest.runAfterPendingDispatches(callback.bind(null, node)); 75 } 76 77 InspectorTest.waitForStyles = function(idValue, callback) 78 { 79 callback = InspectorTest.safeWrap(callback); 80 81 (function sniff(node) 82 { 83 if (node && node.getAttribute("id") === idValue) { 84 callback(); 85 return; 86 } 87 InspectorTest.addSniffer(WebInspector.ElementsPanel.prototype, "_stylesUpdated", sniff); 88 })(null); 89 } 90 91 InspectorTest.selectNodeAndWaitForStyles = function(idValue, callback) 92 { 93 WebInspector.showPanel("elements"); 94 95 callback = InspectorTest.safeWrap(callback); 96 97 var targetNode; 98 99 InspectorTest.waitForStyles(idValue, stylesUpdated); 100 InspectorTest.selectNodeWithId(idValue, nodeSelected); 101 102 function nodeSelected(node) 103 { 104 targetNode = node; 105 } 106 107 function stylesUpdated() 108 { 109 callback(targetNode); 110 } 80 111 } 81 112 -
trunk/LayoutTests/http/tests/inspector/inspect-iframe-from-different-domain.html
r88337 r89804 17 17 function test() 18 18 { 19 InspectorTest.selectNodeWithId("iframe-body"); 20 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1, true); 19 InspectorTest.selectNodeAndWaitForStyles("iframe-body", step1); 21 20 22 function step1( node)21 function step1() 23 22 { 24 if (node && node.getAttribute("id") === "iframe-body") { 25 var treeItem = InspectorTest.getElementStylePropertyTreeItem("background"); 26 InspectorTest.dumpStyleTreeItem(treeItem, ""); 27 InspectorTest.completeTest(); 28 } 23 var treeItem = InspectorTest.getElementStylePropertyTreeItem("background"); 24 InspectorTest.dumpStyleTreeItem(treeItem, ""); 25 InspectorTest.completeTest(); 29 26 } 30 27 } -
trunk/LayoutTests/inspector/elements/edit-dom-actions.html
r88950 r89804 119 119 InspectorTest.dumpElementsTree(testNode); 120 120 121 InspectorTest.selectNodeWithId(dataNode, step1); 121 InspectorTest.selectNodeWithId(dataNode, step0); 122 123 function step0(node) 124 { 125 InspectorTest.runAfterPendingDispatches(step1.bind(null, node)); 126 } 122 127 123 128 function step1(node) -
trunk/LayoutTests/inspector/elements/elements-delete-inline-style.html
r88337 r89804 8 8 { 9 9 WebInspector.showPanel("elements"); 10 InspectorTest.selectNodeWithId("inspected"); 11 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 12 11 13 12 function step1(node) … … 16 15 InspectorTest.dumpSelectedElementStyles(true); 17 16 node.removeAttribute("style"); 18 InspectorTest. addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2);17 InspectorTest.waitForStyles("inspected", step2); 19 18 } 20 19 -
trunk/LayoutTests/inspector/elements/elements-panel-styles.html
r88337 r89804 9 9 function test() 10 10 { 11 InspectorTest.selectNodeWithId("foo"); 12 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1, true); 11 InspectorTest.selectNodeAndWaitForStyles("foo", step1); 13 12 14 function step1( node)13 function step1() 15 14 { 16 if (node && node.getAttribute("id") === "foo") { 17 InspectorTest.dumpSelectedElementStyles(false, false); 18 InspectorTest.completeTest(); 19 } 15 InspectorTest.dumpSelectedElementStyles(false, false); 16 InspectorTest.completeTest(); 20 17 } 21 18 } -
trunk/LayoutTests/inspector/styles/metrics-box-sizing.html
r84135 r89804 73 73 function testBorderBoxInit1(next) 74 74 { 75 InspectorTest.selectNode WithId("border-box", next);75 InspectorTest.selectNodeAndWaitForStyles("border-box", next); 76 76 }, 77 77 -
trunk/LayoutTests/inspector/styles/parse-utf8-bom.html
r84777 r89804 9 9 function test() 10 10 { 11 InspectorTest.selectNode WithId("inspected", step1);11 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 12 12 13 13 function step1() -
trunk/LayoutTests/inspector/styles/styles-add-blank-property.html
r82252 r89804 8 8 { 9 9 WebInspector.showPanel("elements"); 10 InspectorTest.selectNode WithId("inspected", step0);10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 11 11 12 12 var treeElement; 13 13 var section; 14 14 15 function step 0()15 function step1() 16 16 { 17 17 InspectorTest.addResult("Before append:"); … … 19 19 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1]; 20 20 section.expand(); 21 InspectorTest.runAfterPendingDispatches(step1);22 }23 21 24 function step1()25 {26 22 // Create and increment. 27 23 treeElement = section.addNewBlankProperty(); … … 29 25 treeElement.nameElement.textContent = "margin-left"; 30 26 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); 27 31 28 treeElement.valueElement.textContent = "1px"; 32 29 treeElement.valueElement.firstChild.select(); … … 46 43 // Commit. 47 44 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); 48 InspectorTest.selectNodeWithId("other", step4); 45 InspectorTest.selectNodeWithId("other"); 46 InspectorTest.runAfterPendingDispatches(step4); 49 47 } 50 48 51 49 function step4() 52 50 { 53 InspectorTest.selectNode WithId("inspected", step5);51 InspectorTest.selectNodeAndWaitForStyles("inspected", step5); 54 52 } 55 53 -
trunk/LayoutTests/inspector/styles/styles-add-invalid-property.html
r88337 r89804 8 8 { 9 9 WebInspector.showPanel("elements"); 10 InspectorTest.selectNodeWithId("inspected"); 11 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step0); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 12 11 13 12 var treeElement; 14 13 var section; 15 14 16 function step 0()15 function step1() 17 16 { 18 17 InspectorTest.addResult("Before append:"); … … 20 19 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1]; 21 20 section.expand(); 22 InspectorTest.runAfterPendingDispatches(step1);23 }24 21 25 function step1()26 {27 22 // Create and increment. 28 23 treeElement = section.addNewBlankProperty(); … … 47 42 function step3() 48 43 { 49 InspectorTest.selectNode WithId("other");50 InspectorTest. addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate",step4);44 InspectorTest.selectNodeAndWaitForStyles("other"); 45 InspectorTest.runAfterPendingDispatches(step4); 51 46 } 52 47 53 48 function step4() 54 49 { 55 InspectorTest.selectNodeWithId("inspected"); 56 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step5); 50 InspectorTest.selectNodeAndWaitForStyles("inspected", step5); 57 51 } 58 52 -
trunk/LayoutTests/inspector/styles/styles-cancel-editing.html
r88337 r89804 8 8 { 9 9 WebInspector.showPanel("elements"); 10 InspectorTest.selectNodeWithId("inspected"); 11 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 12 11 13 12 var treeElement; … … 35 34 function step2() 36 35 { 37 InspectorTest.selectNodeWithId("other"); 38 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step3); 36 InspectorTest.selectNodeAndWaitForStyles("other", step3); 39 37 } 40 38 41 39 function step3() 42 40 { 43 InspectorTest.selectNodeWithId("inspected"); 44 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step4); 41 InspectorTest.selectNodeAndWaitForStyles("inspected", step4); 45 42 } 46 43 -
trunk/LayoutTests/inspector/styles/styles-commit-editing.html
r88337 r89804 8 8 { 9 9 WebInspector.showPanel("elements"); 10 InspectorTest.selectNodeWithId("inspected"); 11 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); 12 11 13 12 var treeElement; … … 36 35 function step2() 37 36 { 38 InspectorTest.selectNodeWithId("other"); 39 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step3); 37 InspectorTest.selectNodeAndWaitForStyles("other", step3); 40 38 } 41 39 42 40 function step3() 43 41 { 44 InspectorTest.selectNodeWithId("inspected"); 45 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step4); 42 InspectorTest.selectNodeAndWaitForStyles("inspected", step4); 46 43 } 47 44 -
trunk/LayoutTests/inspector/styles/styles-computed-trace.html
r88337 r89804 38 38 function test() 39 39 { 40 InspectorTest.selectNodeWithId("id1"); 41 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 40 InspectorTest.selectNodeAndWaitForStyles("id1", step1); 42 41 43 42 function step1() … … 45 44 InspectorTest.addResult("==== Computed style for ID1 ===="); 46 45 InspectorTest.dumpSelectedElementStyles(false, true); 47 48 InspectorTest.selectNodeWithId("id2"); 49 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2); 46 InspectorTest.selectNodeAndWaitForStyles("id2", step2); 50 47 } 51 48 -
trunk/LayoutTests/inspector/styles/styles-disable-inherited.html
r88337 r89804 8 8 { 9 9 10 InspectorTest.selectNodeWithId("nested"); 11 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 10 InspectorTest.selectNodeAndWaitForStyles("nested", step1); 12 11 13 12 function step1() … … 17 16 InspectorTest.dumpSelectedElementStyles(true); 18 17 19 InspectorTest.selectNodeWithId("container"); 20 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2); 18 InspectorTest.selectNodeAndWaitForStyles("container", step2); 21 19 } 22 20 … … 25 23 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight"); 26 24 treeItem.toggleEnabled({ target: { checked: false } }); 27 InspectorTest.selectNodeWithId("nested"); 28 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step3); 25 InspectorTest.selectNodeAndWaitForStyles("nested", step3); 29 26 } 30 27 -
trunk/LayoutTests/inspector/styles/styles-disable-then-change.html
r88441 r89804 7 7 function test() 8 8 { 9 InspectorTest.selectNodeWithId("container"); 10 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 9 InspectorTest.selectNodeAndWaitForStyles("container", step1); 11 10 12 11 function step1() … … 17 16 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight"); 18 17 treeItem.toggleEnabled({ target: { checked: false } }); 19 InspectorTest. addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2);18 InspectorTest.waitForStyles("container", step2); 20 19 } 21 20 … … 27 26 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight"); 28 27 treeItem.applyStyleText("color: green", true); 29 InspectorTest. addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step3);28 InspectorTest.waitForStyles("container", step3); 30 29 } 31 30 -
trunk/LayoutTests/inspector/styles/styles-disable-then-delete.html
r88337 r89804 7 7 function test() 8 8 { 9 InspectorTest.selectNodeWithId("container"); 10 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 9 InspectorTest.selectNodeAndWaitForStyles("container", step1); 11 10 12 11 function step1() … … 36 35 function step3() 37 36 { 38 InspectorTest.selectNodeWithId("other"); 39 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step4); 37 InspectorTest.selectNodeAndWaitForStyles("other", step4); 40 38 } 41 39 42 40 function step4() 43 41 { 44 InspectorTest.selectNodeWithId("container"); 45 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step5); 42 InspectorTest.selectNodeAndWaitForStyles("container", step5); 46 43 } 47 44 48 function step5( )45 function step5(node) 49 46 { 50 47 InspectorTest.addResult("After delete"); -
trunk/LayoutTests/inspector/styles/styles-disable-then-enable.html
r88347 r89804 7 7 function test() 8 8 { 9 InspectorTest.selectNodeWithId("container"); 10 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 9 InspectorTest.selectNodeAndWaitForStyles("container", step1); 11 10 12 function step1( )11 function step1(node) 13 12 { 14 13 InspectorTest.addResult("Before disable"); … … 17 16 18 17 treeItem.toggleEnabled({ target: { checked: false } }); 19 InspectorTest. addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2);18 InspectorTest.waitForStyles("container", step2); 20 19 } 21 20 … … 27 26 28 27 treeItem.toggleEnabled({ target: { checked: true } }); 29 InspectorTest. addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step3);28 InspectorTest.waitForStyles("container", step3); 30 29 } 31 30 -
trunk/LayoutTests/inspector/styles/styles-iframe-expected.txt
r78535 r89804 7 7 8 8 ======== Matched CSS Rules ======== 9 [expanded] body{ (styles-iframe.html:5)9 [expanded] #main { (styles-iframe.html:5) 10 10 background: blue; 11 11 12 [expanded] body{ (user agent stylesheet)12 [expanded] div { (user agent stylesheet) 13 13 display: block; 14 margin: 8px;15 14 16 15 -
trunk/LayoutTests/inspector/styles/styles-iframe.html
r88337 r89804 3 3 4 4 <style type="text/css" media="screen"> 5 body{ background:blue; }5 #main { background:blue; } 6 6 </style> 7 7 … … 24 24 function step0() 25 25 { 26 InspectorTest.selectNode WithId("mainBody", step1);26 InspectorTest.selectNodeAndWaitForStyles("main", step1); 27 27 } 28 28 … … 31 31 InspectorTest.addResult("Main frame style:"); 32 32 InspectorTest.dumpSelectedElementStyles(true, false, true); 33 InspectorTest.selectNodeWithId("iframeBody"); 34 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2); 33 InspectorTest.selectNodeAndWaitForStyles("iframeBody", step2); 35 34 } 36 35 … … 45 44 </head> 46 45 47 <body onload="runTest()" id="mainBody">46 <body onload="runTest()"> 48 47 <p> 49 48 Tests that proper (and different) styles are returned for body elements of main document and iframe. 50 49 </p> 51 50 51 <div id="main"></div> 52 52 </body> 53 53 </html> -
trunk/LayoutTests/inspector/styles/styles-source-lines-expected.txt
r78535 r89804 4 4 5 5 ======== Matched CSS Rules ======== 6 [expanded] body, .at_line_50 { (styles-source-lines.html:50)6 [expanded] #main, .at_line_50 { (styles-source-lines.html:50) 7 7 border: 1px solid 8 8 red; 9 9 10 [expanded] body, .at_line_43 { (styles-source-lines.html:43)10 [expanded] #main, .at_line_43 { (styles-source-lines.html:43) 11 11 font-size: 10px; 12 12 13 [expanded] body, .at_line_29 { (styles-source-lines.html:29)13 [expanded] #main, .at_line_29 { (styles-source-lines.html:29) 14 14 font-family: /* Comment in 15 15 value */courier; 16 16 17 [expanded] body, .at_line_15::before { (styles-source-lines.html:15)17 [expanded] #main, .at_line_15::before { (styles-source-lines.html:15) 18 18 color: red; 19 19 content: "Before"; 20 20 21 [expanded] body{ (user agent stylesheet)21 [expanded] div { (user agent stylesheet) 22 22 display: block; 23 margin: 8px;24 23 25 24 -
trunk/LayoutTests/inspector/styles/styles-source-lines-inline.html
r88441 r89804 14 14 function test() 15 15 { 16 InspectorTest.selectNodeWithId("foo"); 17 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 16 InspectorTest.selectNodeAndWaitForStyles("foo", step2); 18 17 19 function step 1()18 function step2() 20 19 { 21 20 InspectorTest.dumpSelectedElementStyles(true, false, true); -
trunk/LayoutTests/inspector/styles/styles-source-lines.html
r82713 r89804 9 9 10 10 <style type="text/css" media="screen"> 11 body, .at_line_15::/*11 #main, .at_line_15::/* 12 12 Multiline comment 13 13 before pseudo element … … 24 24 */ 25 25 26 body, .at_line_2926 #main, .at_line_29 27 27 28 28 … … 38 38 39 39 followed by selector 40 */ body,40 */#main, 41 41 .at_line_43 42 42 … … 47 47 48 48 49 body, .at_line_5049 #main, .at_line_50 50 50 { 51 51 border: 1px solid … … 60 60 function test() 61 61 { 62 InspectorTest.selectNode WithId("mainBody", step1);62 InspectorTest.selectNodeAndWaitForStyles("main", step1); 63 63 64 64 function step1() … … 72 72 </head> 73 73 74 <body onload="runTest()" id="mainBody">74 <body onload="runTest()"> 75 75 <p> 76 76 Tests that proper source lines are reported for the parsed styles. 77 77 </p> 78 78 79 <div id="main"></div> 80 79 81 </body> 80 82 </html> -
trunk/LayoutTests/inspector/styles/styles-update-from-js-expected.txt
r88950 r89804 1 1 Tests that changes to an inline style from JavaScript are reflected in the Styles pane and Elements tree. 2 2 3 Modified "style" attribute 3 4 Running: testInit 5 6 Running: testSetStyleAttribute 4 7 <div id="container" style="color: #daC0DE; border: 1px solid black;"></div> 5 8 [expanded] element.style { () … … 20 23 21 24 22 Modified cssText 25 26 Running: testSetStyleCSSText 23 27 <div id="container" style="color: rgb(192, 255, 238); "></div> 24 28 [expanded] element.style { () … … 26 30 27 31 28 Modified parsed attributes 32 33 Running: testSetViaParsedAttributes 29 34 <div id="container" style="color: rgb(192, 255, 238); border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: green; border-right-color: green; border-bottom-color: green; border-left-color: green; border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; "></div> 30 35 [expanded] element.style { () … … 46 51 47 52 48 Inline style invalidated 3 times49 53 -
trunk/LayoutTests/inspector/styles/styles-update-from-js.html
r88950 r89804 23 23 function test() 24 24 { 25 var sniffCount = 0; 26 var inlineStyleInvalidationCount = 0; 25 InspectorTest.runTestSuite([ 26 function testInit(next) 27 { 28 InspectorTest.selectNodeAndWaitForStyles("container", next); 29 }, 27 30 28 InspectorTest.selectNodeWithId("container"); 29 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", snifferCallback, true); 30 InspectorTest.addSniffer(WebInspector.DOMDispatcher.prototype, "inlineStyleInvalidated", inlineStyleInvalidatedSniffer, true); 31 function testSetStyleAttribute(next) 32 { 33 waitAndDumpAttributeAndStyles(next); 34 InspectorTest.evaluateInPage("modifyStyleAttribute()"); 35 }, 31 36 32 function inlineStyleInvalidatedSniffer() 37 function testSetStyleCSSText(next) 38 { 39 waitAndDumpAttributeAndStyles(next); 40 InspectorTest.evaluateInPage("modifyCSSText()"); 41 }, 42 43 function testSetViaParsedAttributes(next) 44 { 45 waitAndDumpAttributeAndStyles(next); 46 InspectorTest.evaluateInPage("modifyParsedAttributes()"); 47 } 48 ]); 49 50 function waitAndDumpAttributeAndStyles(next) 33 51 { 34 inlineStyleInvalidationCount += 1; 35 } 36 37 function snifferCallback() 38 { 39 function innerCallback() 52 function callback() 40 53 { 41 switch (sniffCount++) { 42 case 0: 43 InspectorTest.evaluateInPage("modifyStyleAttribute()"); 44 break; 45 case 1: 46 InspectorTest.addResult("Modified \"style\" attribute"); 47 dumpAttributeAndStyles(); 48 InspectorTest.evaluateInPage("modifyCSSText()"); 49 break; 50 case 2: 51 InspectorTest.addResult("Modified cssText"); 52 dumpAttributeAndStyles(); 53 InspectorTest.evaluateInPage("modifyParsedAttributes()"); 54 break; 55 case 3: 56 InspectorTest.addResult("Modified parsed attributes"); 57 dumpAttributeAndStyles(); 58 InspectorTest.addResult("Inline style invalidated " + inlineStyleInvalidationCount + " times"); 59 InspectorTest.completeTest(); 60 break; 61 } 54 dumpAttributeAndStyles(); 55 next(); 62 56 } 63 64 InspectorTest.runAfterPendingDispatches(innerCallback); 57 InspectorTest.waitForStyles("container", callback); 65 58 } 66 59 -
trunk/LayoutTests/inspector/styles/styles-url-linkify.html
r88920 r89804 50 50 } 51 51 52 InspectorTest.selectNodeWithId("local"); 53 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step1); 52 InspectorTest.selectNodeAndWaitForStyles("local", step1); 54 53 55 54 function step1() … … 57 56 InspectorTest.addResult("Link for a URI from CSS document:"); 58 57 dumpHref(); 59 InspectorTest.selectNodeWithId("iframed"); 60 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", step2); 61 58 InspectorTest.selectNodeAndWaitForStyles("iframed", step2); 62 59 } 63 60 -
trunk/LayoutTests/inspector/styles/up-down-numerics-and-colors-expected.txt
r86663 r89804 4 4 5 5 6 Running: testInit1 7 8 Running: testInit2 6 Running: testInit 9 7 10 8 Running: testAlterColor -
trunk/LayoutTests/inspector/styles/up-down-numerics-and-colors.html
r88347 r89804 19 19 20 20 InspectorTest.runTestSuite([ 21 function testInit 1(next)21 function testInit(next) 22 22 { 23 InspectorTest.selectNodeWithId("inspected"); 24 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", next); 25 }, 23 InspectorTest.selectNodeAndWaitForStyles("inspected", expandSection); 26 24 27 function testInit2(next) 28 { 29 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2]; 30 section.expand(); 31 InspectorTest.runAfterPendingDispatches(next); 25 function expandSection() 26 { 27 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2]; 28 section.expand(); 29 next(); 30 } 32 31 }, 33 32 -
trunk/Source/WebCore/ChangeLog
r89803 r89804 1 2011-06-26 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: roll out r88337 for making tests flaky. 6 https://bugs.webkit.org/show_bug.cgi?id=63422 7 8 * inspector/front-end/ElementsPanel.js: 9 (WebInspector.ElementsPanel): 10 (WebInspector.ElementsPanel.prototype.updateStyles): 11 (WebInspector.ElementsPanel.prototype._stylesUpdated): 12 * inspector/front-end/StylesSidebarPane.js: 13 (WebInspector.StylesSidebarPane.prototype.update.stylesCallback): 14 (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback): 15 (WebInspector.StylesSidebarPane.prototype.update): 16 1 17 2011-06-27 Huang Dongsung <luxtella@company100.net> 2 18 -
trunk/Source/WebCore/inspector/front-end/ElementsPanel.js
r88805 r89804 98 98 this.sidebarElement.id = "elements-sidebar"; 99 99 100 for (var pane in this.sidebarPanes) 100 for (var pane in this.sidebarPanes) { 101 101 this.sidebarElement.appendChild(this.sidebarPanes[pane].element); 102 if (this.sidebarPanes[pane].onattach) 103 this.sidebarPanes[pane].onattach(); 104 } 102 105 103 106 this.sidebarResizeElement = document.createElement("div"); … … 1016 1019 return; 1017 1020 1018 stylesSidebarPane.update(this.focusedDOMNode, null, forceUpdate );1021 stylesSidebarPane.update(this.focusedDOMNode, null, forceUpdate, this._stylesUpdated.bind(this, this.focusedDOMNode)); 1019 1022 stylesSidebarPane.needsUpdate = false; 1023 }, 1024 1025 _stylesUpdated: function(node) 1026 { 1027 // This method is overriden in tests. 1020 1028 }, 1021 1029 -
trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js
r88337 r89804 196 196 }, 197 197 198 update: function(node, editedSection, forceUpdate )198 update: function(node, editedSection, forceUpdate, callback) 199 199 { 200 200 var refresh = false; … … 221 221 this._computedStylePane.bodyElement.removeChildren(); 222 222 this.sections = {}; 223 if (callback) 224 callback(); 223 225 return; 224 226 } … … 228 230 if (styles) 229 231 this._rebuildUpdate(node, styles); 232 if (callback) 233 callback(); 230 234 } 231 235 … … 234 238 if (computedStyle) 235 239 this._refreshUpdate(node, computedStyle, editedSection); 236 } 237 238 function reloadAllStyles() 239 { 240 delete this._reloadAllStylesTimer; 241 WebInspector.cssModel.getStylesAsync(this._allStylesNodeId, stylesCallback.bind(this)) 240 if (callback) 241 callback(); 242 242 } 243 243 244 244 if (refresh) 245 245 WebInspector.cssModel.getComputedStyleAsync(node.id, computedStyleCallback.bind(this)); 246 else { 247 // Always refresh the node to request styles for. 248 this._allStylesNodeId = node.id; 249 if ("_reloadAllStylesTimer" in this) 250 return; 251 this._reloadAllStylesTimer = setTimeout(reloadAllStyles.bind(this), 0); 252 } 246 else 247 WebInspector.cssModel.getStylesAsync(node.id, stylesCallback.bind(this)); 253 248 }, 254 249
Note: See TracChangeset
for help on using the changeset viewer.