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

Unified Diff: third_party/WebKit/LayoutTests/inspector/file-system-project.html

Issue 2533073003: [DevTools] Remove workspace-test.js part1. (Closed)
Patch Set: Created 4 years, 1 month 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/inspector/file-system-project.html
diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-project.html b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
index 69153429176a9d696151f5cc6b9d1370d01f16fa..7402cefb61e27da4aaad11a6d392c6851343b506 100644
--- a/third_party/WebKit/LayoutTests/inspector/file-system-project.html
+++ b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
@@ -2,11 +2,34 @@
<head>
<script src="../http/tests/inspector/inspector-test.js"></script>
<script src="../http/tests/inspector/debugger-test.js"></script>
-<script src="../http/tests/inspector/workspace-test.js"></script>
<script src="../http/tests/inspector/isolated-filesystem-test.js"></script>
<script>
function test()
{
+ function fileSystemUISourceCodes()
+ {
+ var uiSourceCodes = [];
+ var fileSystemProjects = Workspace.workspace.projectsForType(Workspace.projectTypes.FileSystem);
+ for (var project of fileSystemProjects)
+ uiSourceCodes = uiSourceCodes.concat(project.uiSourceCodes());
+ return uiSourceCodes;
+ }
+
+ function dumpUISourceCode(uiSourceCode, callback)
+ {
+ InspectorTest.addResult("UISourceCode: " + uiSourceCode.url().replace(/.*LayoutTests/, "LayoutTests"));
+ if (uiSourceCode.contentType() === Common.resourceTypes.Script || uiSourceCode.contentType() === Common.resourceTypes.Document)
+ InspectorTest.addResult("UISourceCode is content script: " + (uiSourceCode.project().type() === Workspace.projectTypes.ContentScripts));
+ uiSourceCode.requestContent().then(didRequestContent);
+
+ function didRequestContent(content, contentEncoded)
+ {
+ InspectorTest.addResult("Highlighter type: " + Bindings.NetworkProject.uiSourceCodeMimeType(uiSourceCode));
+ InspectorTest.addResult("UISourceCode content: " + content);
+ callback();
+ }
+ }
+
function dumpUISourceCodes(uiSourceCodes, next)
{
innerDumpUISourceCodes(uiSourceCodes, 0, next);
@@ -19,7 +42,7 @@ function test()
return;
}
- InspectorTest.dumpUISourceCode(uiSourceCodes[startIndex], innerDumpUISourceCodes.bind(this, uiSourceCodes, startIndex + 1, next));
+ dumpUISourceCode(uiSourceCodes[startIndex], innerDumpUISourceCodes.bind(this, uiSourceCodes, startIndex + 1, next));
}
}
@@ -36,7 +59,7 @@ function test()
function dumpWorkspaceUISourceCodes()
{
InspectorTest.addResult("Dumping uiSourceCodes origin URLs:");
- var uiSourceCodes = InspectorTest.fileSystemUISourceCodes();
+ var uiSourceCodes = fileSystemUISourceCodes();
for (var i = 0; i < uiSourceCodes.length; ++i)
InspectorTest.addResult(" - " + uiSourceCodes[i].url());
}
@@ -86,7 +109,7 @@ function test()
function onUISourceCodesLoaded()
{
- uiSourceCodes = InspectorTest.fileSystemUISourceCodes();
+ uiSourceCodes = fileSystemUISourceCodes();
dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped);
}
@@ -100,7 +123,7 @@ function test()
function contentCommitted()
{
InspectorTest.addResult("After revision added:");
- InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize);
+ dumpUISourceCode(uiSourceCodes[0], finalize);
}
function finalize()
@@ -146,7 +169,7 @@ function test()
function dumpExcludes(fs)
{
- InspectorTest.fileSystemUISourceCodes()[0].project().excludeFolder("file:///var/www3/html2/");
+ fileSystemUISourceCodes()[0].project().excludeFolder("file:///var/www3/html2/");
InspectorTest.addResult("");
InspectorTest.addResult("-- Excluded /html2/ --");
dumpWorkspaceUISourceCodes();

Powered by Google App Engine
This is Rietveld 408576698