Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / inspector / resource-tree / resource-tree-invalid-mime-type-css-content.html
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script src="../resources-test.js"></script>
5 <link rel="stylesheet" href="resources/stylesheet-text-plain.php" type="text/css">
6 <script>
7 function test()
8 {
9     var cssResource;
10
11     InspectorTest.runAfterResourcesAreFinished(["stylesheet-text-plain.php"], step1);
12
13     function step1()
14     {
15         WebInspector.resourceTreeModel.forAllResources(findCSSResource);
16         function findCSSResource(resource)
17         {
18             if (resource.url.indexOf("stylesheet-text-plain.php") !== -1)
19                 cssResource = resource;
20         }
21         InspectorTest.addResult(cssResource.url);
22         InspectorTest.assertEquals(cssResource.resourceType(), WebInspector.resourceTypes.Stylesheet, "Resource type should be Stylesheet.");
23         InspectorTest.assertTrue(!cssResource.failed, "Resource loading failed.");
24         cssResource.requestContent(step2);
25     }
26
27     function step2()
28     {
29         InspectorTest.addResult("Resource.content: " + cssResource.content);
30         InspectorTest.completeTest();
31     }
32 }
33 </script>
34 </head>
35 <body onload="runTest()">
36 <p>Tests that content is correctly shown for css loaded with invalid mime type in quirks mode.</p>
37 <a href="https://bugs.webkit.org/show_bug.cgi?id=80528">Bug 80528</a>
38 </body>
39 </html>