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

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: 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
(Empty)
1 <html>
dcheng 2015/04/02 04:41:18 Given that this also seems to test style sheet inj
pfeldman 2015/04/02 05:34:12 According to the description, the test is about ov
dcheng 2015/04/02 05:39:12 I don't think it's worth keeping around ~500 lines
pfeldman 2015/04/02 05:46:16 By no means I am suggesting to keep the code. I am
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5
6 <script>
7
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()
16 {
17 InspectorTest.selectNodeAndWaitForStyles("container", step0);
18
19 function step0()
20 {
21 InspectorTest.evaluateInPage("injectStyleSheet()", step1);
22 }
23
24 function step1()
25 {
26 InspectorTest.waitForStyles("container", step2);
27 }
28
29 function step2()
30 {
31 InspectorTest.addResult("Before disable");
32 InspectorTest.dumpSelectedElementStyles(true, false, true);
33 InspectorTest.toggleStyleProperty("margin", false);
34 InspectorTest.waitForStyles("container", step3);
35 }
36
37 function step3()
38 {
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");
48 InspectorTest.dumpSelectedElementStyles(true, false, true);
49 InspectorTest.completeTest();
50 }
51 }
52 </script>
53 </head>
54
55 <body onload="runTest()" id="body-id">
56 <p>
57 Tests that disabling shorthand removes the "overriden" mark from the UA shorthan d it overrides.
58 </p>
59
60 <div id="container" style="margin: 10px"></div>
61
62 </body>
63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698