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

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html

Issue 1954423002: DevTools: introduce CSSStyleSheetHeader.originalContentProvider() method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify-network-project
Patch Set: address comments Created 4 years, 7 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
Index: third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html b/third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html
index 2285cb2fed5de512d2bb1816a2b9421e9a56a009..68324e453a4641180baca2c89af0c18884c976f3 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-1/edit-inspector-stylesheet.html
@@ -7,24 +7,18 @@
function test()
{
- var inspectorResource;
+ InspectorTest.selectNodeAndWaitForStyles("inspected", onStylesSelected);
- InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
-
- function step1(node)
+ function onStylesSelected(node)
{
- InspectorTest.addNewRule("#inspected", stylesReceived);
-
- function stylesReceived()
- {
- // UISourceCode.prototype.addRevision() must finish before step2 is called.
- InspectorTest.showScriptSource("inspector-stylesheet", step2);
- }
+ WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.WorkingCopyCommitted, onWorkingCopyCommitted);
+ InspectorTest.addNewRule("#inspected", new Function());
}
- function step2(sourceFrame)
+ function onWorkingCopyCommitted(event)
{
- var uiSourceCode = sourceFrame._uiSourceCode;
+ WebInspector.workspace.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, onWorkingCopyCommitted);
+ var uiSourceCode = event.data.uiSourceCode;
InspectorTest.addResult("Inspector stylesheet URL: " + uiSourceCode.displayName());
uiSourceCode.requestContent().then(printContent(onContent))
@@ -33,11 +27,11 @@ function test()
InspectorTest.addResult("\nSetting new content");
uiSourceCode.setWorkingCopy("#inspected { background-color: green; }");
uiSourceCode.commitWorkingCopy();
- step3(uiSourceCode);
+ onUpdatedWorkingCopy(uiSourceCode);
}
}
- function step3(uiSourceCode)
+ function onUpdatedWorkingCopy(uiSourceCode)
{
uiSourceCode.requestContent().then(printContent(selectNode));
function selectNode()

Powered by Google App Engine
This is Rietveld 408576698