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

Side by Side Diff: LayoutTests/http/tests/inspector/resource-tree/resource-tree-invalid-mime-type-css-content.html

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../resources-test.js"></script> 4 <script src="../resources-test.js"></script>
5 <link rel="stylesheet" href="resources/stylesheet-text-plain.php" type="text/css "> 5 <link rel="stylesheet" href="resources/stylesheet-text-plain.php" type="text/css ">
6 <script> 6 <script>
7 function test() 7 function test()
8 { 8 {
9 var cssResource; 9 var cssResource;
10 10
11 InspectorTest.runAfterResourcesAreFinished(["stylesheet-text-plain.php"], st ep1); 11 InspectorTest.runAfterResourcesAreFinished(["stylesheet-text-plain.php"], st ep1);
12 12
13 function step1() 13 function step1()
14 { 14 {
15 WebInspector.resourceTreeModel.forAllResources(findCSSResource); 15 InspectorTest.resourceTreeModel.forAllResources(findCSSResource);
16 function findCSSResource(resource) 16 function findCSSResource(resource)
17 { 17 {
18 if (resource.url.indexOf("stylesheet-text-plain.php") !== -1) 18 if (resource.url.indexOf("stylesheet-text-plain.php") !== -1)
19 cssResource = resource; 19 cssResource = resource;
20 } 20 }
21 InspectorTest.addResult(cssResource.url); 21 InspectorTest.addResult(cssResource.url);
22 InspectorTest.assertEquals(cssResource.resourceType(), WebInspector.reso urceTypes.Stylesheet, "Resource type should be Stylesheet."); 22 InspectorTest.assertEquals(cssResource.resourceType(), WebInspector.reso urceTypes.Stylesheet, "Resource type should be Stylesheet.");
23 InspectorTest.assertTrue(!cssResource.failed, "Resource loading failed." ); 23 InspectorTest.assertTrue(!cssResource.failed, "Resource loading failed." );
24 cssResource.requestContent(step2); 24 cssResource.requestContent(step2);
25 } 25 }
26 26
27 function step2() 27 function step2()
28 { 28 {
29 InspectorTest.addResult("Resource.content: " + cssResource.content); 29 InspectorTest.addResult("Resource.content: " + cssResource.content);
30 InspectorTest.completeTest(); 30 InspectorTest.completeTest();
31 } 31 }
32 } 32 }
33 </script> 33 </script>
34 </head> 34 </head>
35 <body onload="runTest()"> 35 <body onload="runTest()">
36 <p>Tests that content is correctly shown for css loaded with invalid mime type i n quirks mode.</p> 36 <p>Tests that content is correctly shown for css loaded with invalid mime type i n quirks mode.</p>
37 <a href="https://bugs.webkit.org/show_bug.cgi?id=80528">Bug 80528</a> 37 <a href="https://bugs.webkit.org/show_bug.cgi?id=80528">Bug 80528</a>
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698