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

Unified Diff: LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles.html

Issue 666883002: DevTools: [CSS] cache lineEndings in InspectorStyleSheet (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: get rid of pointer magic Created 6 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/http/tests/inspector-enabled/reattach-after-editing-styles-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles.html
diff --git a/LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles.html b/LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles.html
index a945eea723c66cb38d33d12fa087d51675f8037d..112cc509f50272d4c0800db126c940ba109298fa 100644
--- a/LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles.html
+++ b/LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles.html
@@ -44,9 +44,9 @@ function test()
function testFirstOpen()
{
InspectorTest.addResult("Dump initial styles:");
- dump(step2);
-
- function step2()
+ dump(onStylesDumped);
+
+ function onStylesDumped()
{
treeElement = InspectorTest.getMatchedStylePropertyTreeItem("color");
treeElement.startEditing();
@@ -57,14 +57,29 @@ function test()
treeElement.valueElement.textContent = "green";
treeElement.valueElement.firstChild.select();
treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- InspectorTest.runAfterPendingDispatches(step3);
+ InspectorTest.waitForStyleApplied(onPropertyEdited);
}
- function step3()
+ function onPropertyEdited()
+ {
+ InspectorTest.addNewRule("#testDiv, my-custom-tag", onFirstRuleAdded);
+ }
+
+ function onFirstRuleAdded()
+ {
+ InspectorTest.addNewRule("#testDiv, another-custom-tag", onSecondRuleAdded);
+ }
+
+ function onSecondRuleAdded()
+ {
+ WebInspector.domModel.undo(onRuleRemoved);
+ }
+
+ function onRuleRemoved()
{
InspectorTest.selectNodeAndWaitForStyles("other", step4);
}
-
+
function step4()
{
InspectorTest.addResult("Dump styles after editing:");
@@ -81,7 +96,7 @@ function test()
function dump(callback)
{
InspectorTest.selectNodeAndWaitForStyles("testDiv", step2);
-
+
function step2()
{
InspectorTest.dumpSelectedElementStyles(true);
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector-enabled/reattach-after-editing-styles-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698