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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled.html

Issue 2784413003: DevTools: carefully cleanup javascript sourcemaps (Closed)
Patch Set: address comments Created 3 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: third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled.html b/third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0890d2aac1d32e6f68923861325637b1a8ecfb2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/sources/js-sourcemaps-toggle-enabled.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+
+<script>
+
+function addScript() {
+ var script = document.createElement('script');
+ script.src = 'resources/sourcemap-script.js';
+ document.head.appendChild(script);
+}
+
+async function test()
+{
+ var sourcesNavigator = new Sources.SourcesNavigatorView();
+ sourcesNavigator.show(UI.inspectorView.element);
+
+ Common.moduleSetting('jsSourceMapsEnabled').set(true);
+ InspectorTest.evaluateInPagePromise('addScript()');
+ await InspectorTest.waitForUISourceCode('sourcemap-typescript.ts'),
+
+ InspectorTest.markStep('dumpInitialNavigator');
+ InspectorTest.dumpNavigatorView(sourcesNavigator, false);
+
+ InspectorTest.markStep('disableJSSourceMaps');
+ Common.moduleSetting('jsSourceMapsEnabled').set(false);
+ InspectorTest.dumpNavigatorView(sourcesNavigator, false);
+
+ InspectorTest.markStep('enableJSSourceMaps');
+ Common.moduleSetting('jsSourceMapsEnabled').set(true);
+ await InspectorTest.waitForUISourceCode('sourcemap-typescript.ts'),
+ InspectorTest.dumpNavigatorView(sourcesNavigator, false);
+
+ InspectorTest.completeTest();
+};
+
+</script>
+
+</head>
+
+<body id="inspect" onload="runTest()">
+<p>Verify that JavaScript sourcemap enabling and disabling adds/removes sourcemap sources.</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698