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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon.html

Issue 2765443005: [Devtools] Fixed network indicator icon for throttling (Closed)
Patch Set: added tests Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon.html
new file mode 100644
index 0000000000000000000000000000000000000000..9ec37932dbe10e643aa816d9e0d583f4cfed75bb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src="/inspector/inspector-test.js"></script>
+<script>
+
+function test()
+{
+ var blockedSetting = Common.settingForTest("networkBlockedURLs");
+
+ Common.moduleSetting('requestBlockingEnabled').set(false);
+ blockedSetting.set([]);
+ dumpIconResult();
+ Common.moduleSetting('requestBlockingEnabled').set(true);
+ dumpIconResult();
+ blockedSetting.set(['*']);
+ dumpIconResult();
+ Common.moduleSetting('requestBlockingEnabled').set(false);
+ dumpIconResult();
+
+ InspectorTest.addResult("Loading Network Module");
+ UI.inspectorView._tabbedPane.tabView('network')._materialize().then(() => {
+ InspectorTest.addResult("Network Module Loaded");
+
+ Common.moduleSetting('requestBlockingEnabled').set(false);
+ blockedSetting.set([]);
+ dumpIconResult();
+ Common.moduleSetting('requestBlockingEnabled').set(true);
+ dumpIconResult();
+ blockedSetting.set(['*']);
+ dumpIconResult();
+ Common.moduleSetting('requestBlockingEnabled').set(false);
+ dumpIconResult();
+ InspectorTest.completeTest();
+ })
+
+ function dumpIconResult() {
+ var hasIcon = !!UI.inspectorView._tabbedPane._tabsElement.getElementsByClassName("smallicon-warning").length;
+ InspectorTest.addResult("Setting Enabled: " + Common.moduleSetting('requestBlockingEnabled').get());
+ InspectorTest.addResult("Has Patterns: " + !!blockedSetting.get().length);
+ InspectorTest.addResult(hasIcon ? "Has Icon" : "Does Not Have Icon");
+ InspectorTest.addResult("");
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Ensures the icon is properly displayed when network request blocking setting is enabled/disabled.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/network-requestblocking-icon-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698