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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename.html

Issue 2889013002: DevTools: introduce uiSourceCode.mimeType() method (Closed)
Patch Set: address comments Created 3 years, 7 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 | third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename.html
new file mode 100644
index 0000000000000000000000000000000000000000..0e041c8225c68b6fa1e68ff2c4c78c23fa115290
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename.html
@@ -0,0 +1,42 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../debugger-test.js"></script>
+<script src="../isolated-filesystem-test.js"></script>
+<script src="./automapping-test.js"></script>
+<script>
+
+async function test()
+{
+ var foo_js = {
+ content: "console.log('foo.js!');",
+ time: null
+ };
+
+ var fs = new InspectorTest.TestFileSystem("file:///var/www");
+ InspectorTest.addFiles(fs, {
+ "scripts/foo.js": foo_js,
+ });
+ await new Promise(fulfill => fs.reportCreated(fulfill));
+ InspectorTest.markStep('Open foo.js editor');
+ var fileUISourceCode = await InspectorTest.waitForUISourceCode('foo.js', Workspace.projectTypes.FileSystem);
+ await dumpEditorMimeType();
+
+ InspectorTest.markStep('Rename foo.js => foo.css');
+ await fileUISourceCode.rename('foo.css');
+ await dumpEditorMimeType();
+
+ InspectorTest.completeTest();
+
+ async function dumpEditorMimeType() {
+ var sourceFrame = await InspectorTest.showUISourceCodePromise(fileUISourceCode);
+ var textEditor = sourceFrame.textEditor;
+ InspectorTest.addResult('Text editor mimeType: ' + textEditor.mimeType());
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Verify that text editor's mimeType gets changed as UISourceCode gets renamed.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-mimetype-on-rename-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698