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

Unified 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, 9 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: LayoutTests/inspector/elements/styles/styles-disable-then-enable-overriden-ua.html
diff --git a/LayoutTests/inspector/elements/styles/styles-disable-then-enable-overriden-ua.html b/LayoutTests/inspector/elements/styles/styles-disable-then-enable-overriden-ua.html
index dfc9fa7489ab52dad5925c5aa4aacf600153ed62..64acd8bd450bf8332b7e4459b92f787a0b2aa5a6 100644
--- a/LayoutTests/inspector/elements/styles/styles-disable-then-enable-overriden-ua.html
+++ b/LayoutTests/inspector/elements/styles/styles-disable-then-enable-overriden-ua.html
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
<html>
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
@@ -5,44 +6,27 @@
<script>
-function injectStyleSheet()
-{
- var styleSheet = "#container { margin: 8px }";
- if (window.testRunner)
- window.testRunner.injectStyleSheet(styleSheet, true);
-}
-
function test()
{
- InspectorTest.selectNodeAndWaitForStyles("container", step0);
-
- function step0()
- {
- InspectorTest.evaluateInPage("injectStyleSheet()", step1);
- }
+ InspectorTest.selectNodeAndWaitForStyles("body-id", step1);
function step1()
{
- InspectorTest.waitForStyles("container", step2);
- }
-
- function step2()
- {
InspectorTest.addResult("Before disable");
InspectorTest.dumpSelectedElementStyles(true, false, true);
InspectorTest.toggleStyleProperty("margin", false);
- InspectorTest.waitForStyles("container", step3);
+ InspectorTest.waitForStyles("body-id", step2);
}
- function step3()
+ function step2()
{
InspectorTest.addResult("After disable");
InspectorTest.dumpSelectedElementStyles(true, false, true);
InspectorTest.toggleStyleProperty("margin", true);
- InspectorTest.waitForStyles("container", step4);
+ InspectorTest.waitForStyles("body-id", step3);
}
- function step4()
+ function step3()
{
InspectorTest.addResult("After enable");
InspectorTest.dumpSelectedElementStyles(true, false, true);
@@ -52,12 +36,10 @@ function test()
</script>
</head>
-<body onload="runTest()" id="body-id">
+<body onload="runTest()" id="body-id" style="margin: 10px">
<p>
Tests that disabling shorthand removes the "overriden" mark from the UA shorthand it overrides.
</p>
-<div id="container" style="margin: 10px"></div>
-
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698