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

Side by Side Diff: LayoutTests/inspector/styles/stylesheet-removal.html

Issue 25879002: DevTools: Get rid of styleFile on UISourceCode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed test Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <link id="link1" rel="stylesheet" href="resources/stylesheet-removal.css" />
5 <link id="link2" rel="stylesheet" href="resources/stylesheet-removal.css" />
6 <script>
7 function removeStyleSheetOne()
8 {
9 var link = document.getElementById("link1");
10 link.parentElement.removeChild(link);
11 }
12
13 function removeStyleSheetTwo()
14 {
15 var link = document.getElementById("link2");
16 link.parentElement.removeChild(link);
17 }
18
19 function test()
20 {
21 var uiSourceCode;
22
23 function headerOneRemoved(header)
24 {
25 InspectorTest.addResult("Style file is " + (uiSourceCode.styleFile() ? " " : "not ") + "present");
26 WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Eve nts.StyleSheetRemoved, headerOneRemoved, this);
27 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events .StyleSheetRemoved, headerTwoRemoved, this);
28 InspectorTest.evaluateInPage("removeStyleSheetTwo()");
29 }
30
31 function headerTwoRemoved(header)
32 {
33 InspectorTest.addResult("Style file is " + (uiSourceCode.styleFile() ? " " : "not ") + "present");
34 InspectorTest.completeTest();
35 }
36
37 uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(WebInspector.Parsed URL.completeURL(WebInspector.inspectedPageURL, "resources/stylesheet-removal.css "));
38 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty leSheetRemoved, headerOneRemoved, this);
39 InspectorTest.evaluateInPage("removeStyleSheetOne()");
40 }
41
42 </script>
43
44 </head>
45
46 <body onload="runTest()">
47 <p>Tests that things are cleaned up properly upon stylesheet header removal.</p>
48 </body>
49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698