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

Unified Diff: LayoutTests/inspector/styles/styles-add-new-rule.html

Issue 8380009: Merge 98243 - Web Inspector: [Styles] Adding a new style rule breaks things (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/styles/styles-add-new-rule-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/styles/styles-add-new-rule.html
===================================================================
--- LayoutTests/inspector/styles/styles-add-new-rule.html (revision 98247)
+++ LayoutTests/inspector/styles/styles-add-new-rule.html (working copy)
@@ -13,25 +13,40 @@
function step1()
{
- // Click add new rule
+ // Click "Add new rule".
document.getElementById("add-style-button-test-id").click();
- InspectorTest.selectNodeAndWaitForStyles("other", step2);
+ var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
+ section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ InspectorTest.runAfterPendingDispatches(step2);
}
- function step2() {
- // Click add new rule
- document.getElementById("add-style-button-test-id").click();
- InspectorTest.selectNodeAndWaitForStyles("inspected", step3);
+ function step2()
+ {
+ var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
+ var newProperty = section.addNewBlankProperty();
+ newProperty.startEditing();
+ newProperty.nameElement.textContent = "color";
+ newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ newProperty.valueElement.textContent = "maroon";
+ newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ InspectorTest.selectNodeAndWaitForStyles("other", step3);
}
function step3()
{
+ // Click "Add new rule".
+ document.getElementById("add-style-button-test-id").click();
+ InspectorTest.selectNodeAndWaitForStyles("inspected", step4);
+ }
+
+ function step4()
+ {
InspectorTest.addResult("After adding new rule (inspected):");
InspectorTest.dumpSelectedElementStyles(true, false, true);
- InspectorTest.selectNodeAndWaitForStyles("other", step4);
+ InspectorTest.selectNodeAndWaitForStyles("other", step5);
}
- function step4()
+ function step5()
{
InspectorTest.addResult("After adding new rule (other):");
InspectorTest.dumpSelectedElementStyles(true, false, true);
@@ -44,7 +59,7 @@
<body onload="runTest()">
<p>
-Tests that adding a new rule works after sitching nodes.
+Tests that adding a new rule works after switching nodes.
</p>
<div id="inspected" style="font-size: 12px">Text</div>
« no previous file with comments | « no previous file | LayoutTests/inspector/styles/styles-add-new-rule-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698