Bug 1205158 - Use channel->Open2() netwerk/test/ (r=sicking)
authorChristoph Kerschbaumer <mozilla@christophkerschbaumer.com>
Tue, 15 Sep 2015 20:12:52 -0700
changeset 295466 710023d8a43c2d1de98bd118b954d16c27aaab84
parent 295465 ffa2f8269ce74aa0250c59299d731d6c3e452f12
child 295467 91040fc155c4b7c8226a62e9761efe4360fa3857
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs1205158
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1205158 - Use channel->Open2() netwerk/test/ (r=sicking)
netwerk/test/PropertiesTest.cpp
netwerk/test/TestOpen.cpp
--- a/netwerk/test/PropertiesTest.cpp
+++ b/netwerk/test/PropertiesTest.cpp
@@ -50,21 +50,21 @@ main(int argc, char* argv[])
   nsCOMPtr<nsIURI> uri;
   ret = NS_NewURI(getter_AddRefs(uri), NS_LITERAL_CSTRING(TEST_URL));
   if (NS_FAILED(ret)) return 1;
 
   nsIChannel *channel = nullptr;
   ret = NS_NewChannel(&channel,
                       uri,
                       systemPrincipal,
-                      nsILoadInfo::SEC_NORMAL,
+                      nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                       nsIContentPolicy::TYPE_OTHER);
   if (NS_FAILED(ret)) return 1;
 
-  ret = channel->Open(&in);
+  ret = channel->Open2(&in);
   if (NS_FAILED(ret)) return 1;
 
   nsIPersistentProperties* props;
   ret = CallCreateInstance(kPersistentPropertiesCID, &props);
   if (NS_FAILED(ret) || (!props)) {
     printf("create nsIPersistentProperties failed\n");
     return 1;
   }
--- a/netwerk/test/TestOpen.cpp
+++ b/netwerk/test/TestOpen.cpp
@@ -59,22 +59,22 @@ main(int argc, char **argv)
        nsCOMPtr<nsIPrincipal> systemPrincipal;
     rv = secman->GetSystemPrincipal(getter_AddRefs(systemPrincipal));
     RETURN_IF_FAILED(rv, "Couldn't get system principal!");
 
     nsCOMPtr<nsIChannel> channel;
     rv = NS_NewChannel(getter_AddRefs(channel),
                        uri,
                        systemPrincipal,
-                       nsILoadInfo::SEC_NORMAL,
+                       nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                        nsIContentPolicy::TYPE_OTHER);
     RETURN_IF_FAILED(rv, "NS_NewChannel");
 
-    rv = channel->Open(getter_AddRefs(stream));
-    RETURN_IF_FAILED(rv, "channel->Open()");
+    rv = channel->Open2(getter_AddRefs(stream));
+    RETURN_IF_FAILED(rv, "channel->Open2()");
 
     FILE* outfile = fopen(argv[2], "wb");
     if (!outfile) {
       printf("error opening %s\n", argv[2]);
       return 1;
     }
 
     uint32_t read;