| Index: LayoutTests/inspector/elements/styles/inject-stylesheet.html
|
| diff --git a/LayoutTests/inspector/elements/styles/inject-stylesheet.html b/LayoutTests/inspector/elements/styles/inject-stylesheet.html
|
| index a45ab6c1b7fb72da378b594583929865e544744d..4cc2560f5313c93bbaf8420e9c70895aa64d14da 100644
|
| --- a/LayoutTests/inspector/elements/styles/inject-stylesheet.html
|
| +++ b/LayoutTests/inspector/elements/styles/inject-stylesheet.html
|
| @@ -9,11 +9,16 @@
|
| <script src="../../../http/tests/inspector/elements-test.js"></script>
|
| <script>
|
|
|
| -function injectStyleSheet()
|
| +function injectStyleSheet(context)
|
| {
|
| var styleSheet = "#main { color: red; -webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==) } #iframeBody { background: red }";
|
| - if (window.testRunner)
|
| - window.testRunner.injectStyleSheet(styleSheet, true);
|
| + if (context.testRunner)
|
| + context.testRunner.insertStyleSheet(styleSheet);
|
| +}
|
| +
|
| +function preRunTest() {
|
| + injectStyleSheet(window);
|
| + runTest();
|
| }
|
|
|
| function loadIframe()
|
| @@ -25,12 +30,7 @@ function loadIframe()
|
|
|
| function test()
|
| {
|
| - InspectorTest.evaluateInPage("injectStyleSheet()", init);
|
| -
|
| - function init()
|
| - {
|
| - InspectorTest.selectNodeAndWaitForStylesWithComputed("main", step0);
|
| - }
|
| + InspectorTest.selectNodeAndWaitForStylesWithComputed("main", step0);
|
|
|
| function step0()
|
| {
|
| @@ -55,7 +55,7 @@ function test()
|
| </script>
|
| </head>
|
|
|
| -<body onload="runTest()">
|
| +<body onload="preRunTest()">
|
| <p>
|
| Tests that injected user stylesheets are reflected in the Styles pane.
|
| </p>
|
|
|