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

Unified Diff: LayoutTests/inspector/extensions/extensions-reload.html

Issue 13816005: Add preprocessor to reloadOptions in chrome.devtools.inspectedWindow.reload(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove unnecessary include Created 7 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/inspector/extensions/extensions-reload-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/extensions/extensions-reload.html
diff --git a/LayoutTests/inspector/extensions/extensions-reload.html b/LayoutTests/inspector/extensions/extensions-reload.html
index 55d0a7f8a0ba1eeeaca73282d2699e6bea9f381e..d966ff78a19212b7183f38c300c724e0ee348d8a 100644
--- a/LayoutTests/inspector/extensions/extensions-reload.html
+++ b/LayoutTests/inspector/extensions/extensions-reload.html
@@ -2,6 +2,8 @@
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/extensions-test.js"></script>
+
+<script src="resources/test-script.js"></script>
<script type="text/javascript">
window.bar = "foo = " + window.foo;
@@ -32,6 +34,24 @@ function extension_testReloadInjectsCode(nextTest)
});
}
+function extension_testReloadPreprocessesCode(nextTest)
+{
+ evaluateOnFrontend("InspectorTest.runWhenPageLoads(reply)", nextTest);
+ function preprocessor(src, url)
+ {
+ console.log("preprocessor transcoding " + url);
+ if(/-test.js/.test(url))
+ return src;
+ url = url.replace(/\.html/, '_html');
+ var preamble = 'console.log("running preprocessed " + \"' + url + '\");\n';
+ var sourceURL = '\n//# sourceURL=' + url + '.js\n';
+ return preamble + src + sourceURL;
+ }
+ webInspector.inspectedWindow.reload({
+ preprocessingScript: '(' + preprocessor + ')'
+ });
+}
+
</script>
</head>
<body onload="runTest()">
« no previous file with comments | « no previous file | LayoutTests/inspector/extensions/extensions-reload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698