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

Side by Side Diff: LayoutTests/inspector/elements/styles/add-new-rule-with-style-after-body.html

Issue 1158883003: DevTools: shard inspector/elements tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script>
6 function addStyle()
7 {
8 var style = document.createElement("style");
9 document.documentElement.appendChild(style);
10 style.sheet.insertRule("foo {display: none;}", 0);
11 }
12
13 function test()
14 {
15 InspectorTest.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St yleSheetAdded, stylesheetAdded);
16 InspectorTest.evaluateInPage("addStyle()");
17
18 function stylesheetAdded()
19 {
20 InspectorTest.cssModel.removeEventListener(WebInspector.CSSStyleModel.Ev ents.StyleSheetAdded, stylesheetAdded);
21 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
22 }
23
24 var treeElement;
25 var hasResourceChanged;
26
27 function step1()
28 {
29 InspectorTest.addNewRule("inspected", step2);
30 }
31
32 function step2()
33 {
34 var section = InspectorTest.firstMatchedStyleSection();
35 var newProperty = section.addNewBlankProperty();
36 newProperty.startEditing();
37 newProperty.nameElement.textContent = "color";
38 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente r"));
39 newProperty.valueElement.textContent = "maroon";
40 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent er"));
41 InspectorTest.waitForStyles("inspected", step3);
42 }
43
44 function step3()
45 {
46 InspectorTest.addResult("After adding new rule:");
47 InspectorTest.dumpSelectedElementStyles(true, false, true);
48 InspectorTest.completeTest();
49 }
50 }
51
52 </script>
53 </head>
54
55 <body onload="runTest()">
56 <p>
57 Tests that adding a new rule works when there is a STYLE element after BODY. TIM EOUT SHOULD NOT OCCUR! <a href="https://bugs.webkit.org/show_bug.cgi?id=111299"> Bug 111299</a>
58 </p>
59
60 <div id="inspected" style="font-size: 12px">Text</div>
61
62 </body>
63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698