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

Side by Side Diff: LayoutTests/inspector/elements/styles/styles-disable-then-enable-overriden-ua.html

Issue 1058723002: Remove testRunner.injectStyleSheet usage from layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update baseline Created 5 years, 8 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
1 <!DOCTYPE html>
1 <html> 2 <html>
2 <head> 3 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 5 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 6
6 <script> 7 <script>
7 8
8 function injectStyleSheet()
9 {
10 var styleSheet = "#container { margin: 8px }";
11 if (window.testRunner)
12 window.testRunner.injectStyleSheet(styleSheet, true);
13 }
14
15 function test() 9 function test()
16 { 10 {
17 InspectorTest.selectNodeAndWaitForStyles("container", step0); 11 InspectorTest.selectNodeAndWaitForStyles("body-id", step1);
18
19 function step0()
20 {
21 InspectorTest.evaluateInPage("injectStyleSheet()", step1);
22 }
23 12
24 function step1() 13 function step1()
25 { 14 {
26 InspectorTest.waitForStyles("container", step2); 15 InspectorTest.addResult("Before disable");
16 InspectorTest.dumpSelectedElementStyles(true, false, true);
17 InspectorTest.toggleStyleProperty("margin", false);
18 InspectorTest.waitForStyles("body-id", step2);
27 } 19 }
28 20
29 function step2() 21 function step2()
30 { 22 {
31 InspectorTest.addResult("Before disable"); 23 InspectorTest.addResult("After disable");
32 InspectorTest.dumpSelectedElementStyles(true, false, true); 24 InspectorTest.dumpSelectedElementStyles(true, false, true);
33 InspectorTest.toggleStyleProperty("margin", false); 25 InspectorTest.toggleStyleProperty("margin", true);
34 InspectorTest.waitForStyles("container", step3); 26 InspectorTest.waitForStyles("body-id", step3);
35 } 27 }
36 28
37 function step3() 29 function step3()
38 { 30 {
39 InspectorTest.addResult("After disable");
40 InspectorTest.dumpSelectedElementStyles(true, false, true);
41 InspectorTest.toggleStyleProperty("margin", true);
42 InspectorTest.waitForStyles("container", step4);
43 }
44
45 function step4()
46 {
47 InspectorTest.addResult("After enable"); 31 InspectorTest.addResult("After enable");
48 InspectorTest.dumpSelectedElementStyles(true, false, true); 32 InspectorTest.dumpSelectedElementStyles(true, false, true);
49 InspectorTest.completeTest(); 33 InspectorTest.completeTest();
50 } 34 }
51 } 35 }
52 </script> 36 </script>
53 </head> 37 </head>
54 38
55 <body onload="runTest()" id="body-id"> 39 <body onload="runTest()" id="body-id" style="margin: 10px">
56 <p> 40 <p>
57 Tests that disabling shorthand removes the "overriden" mark from the UA shorthan d it overrides. 41 Tests that disabling shorthand removes the "overriden" mark from the UA shorthan d it overrides.
58 </p> 42 </p>
59 43
60 <div id="container" style="margin: 10px"></div>
61
62 </body> 44 </body>
63 </html> 45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698