OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="/inspector/inspector-test.js"></script> |
| 4 <script> |
| 5 |
| 6 function test() |
| 7 { |
| 8 var blockedSetting = Common.settingForTest("networkBlockedURLs"); |
| 9 |
| 10 Common.moduleSetting('requestBlockingEnabled').set(false); |
| 11 blockedSetting.set([]); |
| 12 dumpIconResult(); |
| 13 Common.moduleSetting('requestBlockingEnabled').set(true); |
| 14 dumpIconResult(); |
| 15 blockedSetting.set(['*']); |
| 16 dumpIconResult(); |
| 17 Common.moduleSetting('requestBlockingEnabled').set(false); |
| 18 dumpIconResult(); |
| 19 |
| 20 InspectorTest.addResult("Loading Network Module"); |
| 21 UI.inspectorView._tabbedPane.tabView('network')._materialize().then(() => { |
| 22 InspectorTest.addResult("Network Module Loaded"); |
| 23 |
| 24 Common.moduleSetting('requestBlockingEnabled').set(false); |
| 25 blockedSetting.set([]); |
| 26 dumpIconResult(); |
| 27 Common.moduleSetting('requestBlockingEnabled').set(true); |
| 28 dumpIconResult(); |
| 29 blockedSetting.set(['*']); |
| 30 dumpIconResult(); |
| 31 Common.moduleSetting('requestBlockingEnabled').set(false); |
| 32 dumpIconResult(); |
| 33 InspectorTest.completeTest(); |
| 34 }) |
| 35 |
| 36 function dumpIconResult() { |
| 37 var hasIcon = !!UI.inspectorView._tabbedPane._tabsElement.getElementsByC
lassName("smallicon-warning").length; |
| 38 InspectorTest.addResult("Setting Enabled: " + Common.moduleSetting('requ
estBlockingEnabled').get()); |
| 39 InspectorTest.addResult("Has Patterns: " + !!blockedSetting.get().length
); |
| 40 InspectorTest.addResult(hasIcon ? "Has Icon" : "Does Not Have Icon"); |
| 41 InspectorTest.addResult(""); |
| 42 } |
| 43 } |
| 44 </script> |
| 45 </head> |
| 46 <body onload="runTest()"> |
| 47 <p>Ensures the icon is properly displayed when network request blocking setting
is enabled/disabled.</p> |
| 48 </body> |
| 49 </html> |
OLD | NEW |