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

Unified Diff: third_party/WebKit/LayoutTests/inspector/network/network-request-server-ip-address.html

Issue 1798173003: [DevTools] Added serverIPaddress to HAR output (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed format issue of using single vs double quotes Created 4 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/inspector/network/network-request-server-ip-address-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/network/network-request-server-ip-address.html
diff --git a/third_party/WebKit/LayoutTests/inspector/network/network-request-server-ip-address.html b/third_party/WebKit/LayoutTests/inspector/network/network-request-server-ip-address.html
new file mode 100644
index 0000000000000000000000000000000000000000..ec531799958e8231b74b5f6adc515e236a9e1dc2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/network/network-request-server-ip-address.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/network-test.js"></script>
+<script>
+function test() {
+ function checkHAREntry (message, url, remoteAddress, port) {
+ return new Promise(function (resolve) {
caseq 2016/03/15 21:50:11 Why does it have to be a promise?
+ var request = new WebInspector.NetworkRequest(WebInspector.targetManager.mainTarget(), url, url, "", "", "");
+ request.setRemoteAddress(remoteAddress, port);
+
+ var harBuild = new WebInspector.HAREntry(request).build();
+
+ InspectorTest.addResult(message);
+ InspectorTest.addResult("Has cache: " + typeof harBuild.cache);
+ InspectorTest.addResult("Has request: " + typeof harBuild.request);
+ InspectorTest.addResult("Has response: " + typeof harBuild.response);
+
+ InspectorTest.addResult("serverIPAddress: " + harBuild.serverIPAddress);
+
+ InspectorTest.addResult("Has startedDateTime: " + typeof harBuild.startedDateTime);
+ InspectorTest.addResult("Has time: " + typeof harBuild.time);
+ InspectorTest.addResult("Has timings: " + typeof harBuild.timings);
+ InspectorTest.addResult("");
+
+ resolve();
+ });
+ }
+
+ Promise.all([
+ checkHAREntry("Checking IPv4", "http://127.0.0.1", "127.0.0.1", "80"),
+ checkHAREntry("Checking IPv6", "http://localhost", "[[::1]]", "443")
+ ]).then( () => InspectorTest.completeTest() );
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests HAR output format.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/network/network-request-server-ip-address-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698