OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <link rel="stylesheet" href="resources/style-formatter-obfuscated.css"> | 5 <link rel="stylesheet" href="resources/style-formatter-obfuscated.css"> |
6 | 6 |
7 <script> | 7 <script> |
8 | 8 |
9 var test = function() | 9 var test = function() |
10 { | 10 { |
11 var worker = Runtime.startWorker("script_formatter_worker"); | 11 var worker = new Worker("script_formatter_worker/ScriptFormatterWorker.js"); |
12 WebInspector.inspectorView.showPanel("sources"); | 12 WebInspector.inspectorView.showPanel("sources"); |
13 | 13 |
14 InspectorTest.runTestSuite([ | 14 InspectorTest.runTestSuite([ |
15 function testScriptFormatterWorker(next) | 15 function testScriptFormatterWorker(next) |
16 { | 16 { |
17 worker.onmessage = InspectorTest.safeWrap(function(event) | 17 worker.onmessage = InspectorTest.safeWrap(function(event) |
18 { | 18 { |
19 InspectorTest.assertEquals("a {\\n /* pre-comment */\\n co
lor /* after name */ : /* before value */ red /* post-comment */\\n}\\n".replace
(/\n/g, "\\n"), event.data.content.replace(/\n/g, "\\n")); | 19 InspectorTest.assertEquals("a {\\n /* pre-comment */\\n co
lor /* after name */ : /* before value */ red /* post-comment */\\n}\\n".replace
(/\n/g, "\\n"), event.data.content.replace(/\n/g, "\\n")); |
20 next(); | 20 next(); |
21 }); | 21 }); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 </script> | 95 </script> |
96 | 96 |
97 </head> | 97 </head> |
98 | 98 |
99 <body onload="runTest()"> | 99 <body onload="runTest()"> |
100 <p>Tests the script formatting functionality. | 100 <p>Tests the script formatting functionality. |
101 </p> | 101 </p> |
102 | 102 |
103 </body> | 103 </body> |
104 </html> | 104 </html> |
OLD | NEW |