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

Unified Diff: LayoutTests/http/tests/inspector-enabled/resource-tree/main-resource-content.html

Issue 267393003: DevTools: Load document (html) content from disk cache in page agent enabling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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: LayoutTests/http/tests/inspector-enabled/resource-tree/main-resource-content.html
diff --git a/LayoutTests/http/tests/inspector-enabled/resource-tree/main-resource-content.html b/LayoutTests/http/tests/inspector-enabled/resource-tree/main-resource-content.html
new file mode 100644
index 0000000000000000000000000000000000000000..8e522b14690227e1aa5bf4e5f4c67b0883cf3bb0
--- /dev/null
+++ b/LayoutTests/http/tests/inspector-enabled/resource-tree/main-resource-content.html
@@ -0,0 +1,56 @@
+<html>
+<head>
+<script src="../../inspector/inspector-test.js"></script>
+<script src="../../inspector/resources-test.js"></script>
+<script src="../../inspector/resource-tree/resource-tree-test.js"></script>
+<script>
+function onload()
+{
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.showWebInspector();
+ }
+ runTest();
+}
+
+function test()
+{
+ InspectorTest.runAfterResourcesAreFinished(["main-resource-content-frame-utf8.php", "main-resource-content-frame.html"], step2)
+
+ var resource;
+ function step2()
+ {
+ InspectorTest.addResult("Requesting content: ");
+ resource = InspectorTest.resourceMatchingURL("main-resource-content-frame.html");
+ PageAgent.getResourceContent(resource.frameId, resource.url, step3);
+ }
+
+ function step3(error, content)
+ {
+ InspectorTest.assertTrue(!!content, "No content available.");
+ InspectorTest.addResult("Resource url: " + resource.url);
+ InspectorTest.addResult("Resource content: " + content);
+
+ InspectorTest.addResult("Requesting utf8 content: ");
+ resource = InspectorTest.resourceMatchingURL("main-resource-content-frame-utf8.php");
+ PageAgent.getResourceContent(resource.frameId, resource.url, step4);
+ }
+
+ function step4(error, content)
+ {
+ InspectorTest.assertTrue(!!content, "No content available.");
+ InspectorTest.addResult("Resource url: " + resource.url);
+ InspectorTest.addResult("Resource content: " + content);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="onload()">
+<iframe src="resources/main-resource-content-frame.html"></iframe>
+<iframe src="resources/main-resource-content-frame-utf8.php"></iframe>
+<p>
+Tests main resource content is correctly loaded and decoded using correct encoding.
+</p>
+</body>
+</html>
« no previous file with comments | « LayoutTests/SlowTests ('k') | LayoutTests/http/tests/inspector-enabled/resource-tree/main-resource-content-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698