3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/extensions-test.js"></script>
5 <script type=
"text/javascript">
7 window
.whereAmI
= "main world";
9 testRunner
.setIsolatedWorldSecurityOrigin(632, "file:///");
10 testRunner
.evaluateScriptInIsolatedWorld(632, "window.whereAmI = 'brave new world'");
12 function extension_testEvalInMainWorldImplicit(nextTest
)
14 webInspector
.inspectedWindow
.eval("whereAmI", callbackAndNextTest(extension_onEval
, nextTest
));
17 function extension_testEvalInMainWorldExplicit(nextTest
)
19 webInspector
.inspectedWindow
.eval("whereAmI", { useContentScriptContext
: false }, callbackAndNextTest(extension_onEval
, nextTest
));
22 function extension_testEvalInContentScriptContext(nextTest
)
24 webInspector
.inspectedWindow
.eval("whereAmI", { useContentScriptContext
: true }, callbackAndNextTest(extension_onEval
, nextTest
));
27 function extension_onEval(value
, isException
)
29 output("Evaluate: " + JSON
.stringify(value
) + " (exception: " + isException
+ ")");
34 <body onload=
"runTest()">
35 <p>Tests WebInspector extension API
</p>