Backed out changeset 964de5d960fa
authorNikhil Marathe <nsm.nikhil@gmail.com>
Wed, 24 Jun 2015 14:32:39 -0700
changeset 280940 a7c734a613f74ede8e53b9863229a956fa7f1d44
parent 280939 964de5d960fa2bdd927fa414e8822a43cac7aacb
child 280941 dc2547747a19d98199737f14460edb145358378a
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone41.0a1
backs out964de5d960fa2bdd927fa414e8822a43cac7aacb
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
Backed out changeset 964de5d960fa The changes these tests depend on were backed out, but I didn't realise that and pushed this. Backing out and pushing again.
dom/push/test/xpcshell/test_notification_http2.js
dom/push/test/xpcshell/test_register_error_http2.js
dom/push/test/xpcshell/test_register_success_http2.js
dom/push/test/xpcshell/test_registration_error_http2.js
dom/push/test/xpcshell/test_registration_success_http2.js
dom/push/test/xpcshell/test_unregister_success_http2.js
--- a/dom/push/test/xpcshell/test_notification_http2.js
+++ b/dom/push/test/xpcshell/test_notification_http2.js
@@ -52,30 +52,27 @@ add_task(function* test_pushNotification
   });
 
   var serverURL = "https://localhost:" + serverPort;
 
   let records = [{
     subscriptionUri: serverURL + '/pushNotifications/subscription1',
     pushEndpoint: serverURL + '/pushEndpoint1',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpoint1',
-    scope: 'https://example.com/page/1',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    scope: 'https://example.com/page/1'
   }, {
     subscriptionUri: serverURL + '/pushNotifications/subscription2',
     pushEndpoint: serverURL + '/pushEndpoint2',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpoint2',
-    scope: 'https://example.com/page/2',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    scope: 'https://example.com/page/2'
   }, {
     subscriptionUri: serverURL + '/pushNotifications/subscription3',
     pushEndpoint: serverURL + '/pushEndpoint3',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpoint3',
-    scope: 'https://example.com/page/3',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    scope: 'https://example.com/page/3'
   }];
 
   for (let record of records) {
     yield db.put(record);
   }
 
   let notifyPromise = Promise.all([
     promiseObserverNotification('push-notification'),
--- a/dom/push/test/xpcshell/test_register_error_http2.js
+++ b/dom/push/test/xpcshell/test_register_error_http2.js
@@ -42,18 +42,17 @@ add_task(function* test_pushSubscription
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionNoConnection/subscribe",
     db
   });
 
   yield rejects(
     PushNotificationService.register(
-      'https://example.net/page/invalid-response',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+      'https://example.net/page/invalid-response'),
     function(error) {
       return error && error.includes("Error");
     },
     'Wrong error for not being able to establish connecion.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, "Should not store records when connection couldn't be established.");
@@ -83,18 +82,17 @@ add_task(function* test_pushSubscription
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionMissingLocation/subscribe",
     db
   });
 
   yield rejects(
     PushNotificationService.register(
-      'https://example.net/page/invalid-response',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+      'https://example.net/page/invalid-response'),
     function(error) {
       return error && error.includes("Return code 201, but the answer is bogus");
     },
     'Wrong error for the missing location header.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when the location header is missing.');
@@ -110,18 +108,17 @@ add_task(function* test_pushSubscription
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionMissingLink/subscribe",
     db
   });
 
   yield rejects(
     PushNotificationService.register(
-      'https://example.net/page/invalid-response',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+      'https://example.net/page/invalid-response'),
     function(error) {
       return error && error.includes("Return code 201, but the answer is bogus");
     },
     'Wrong error for the missing link header.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when a link header is missing.');
@@ -137,18 +134,17 @@ add_task(function* test_pushSubscription
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionMissingLink1/subscribe",
     db
   });
 
   yield rejects(
     PushNotificationService.register(
-      'https://example.net/page/invalid-response',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+      'https://example.net/page/invalid-response'),
     function(error) {
       return error && error.includes("Return code 201, but the answer is bogus");
     },
     'Wrong error for the missing push endpoint.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when the push endpoint is missing.');
@@ -164,18 +160,17 @@ add_task(function* test_pushSubscription
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionLocationBogus/subscribe",
     db
   });
 
   yield rejects(
     PushNotificationService.register(
-      'https://example.net/page/invalid-response',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+      'https://example.net/page/invalid-response'),
     function(error) {
       return error && error.includes("Return code 201, but URI is bogus.");
     },
     'Wrong error for the bogus location'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when location header is bogus.');
@@ -191,18 +186,17 @@ add_task(function* test_pushSubscription
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionNot201Code/subscribe",
     db
   });
 
   yield rejects(
     PushNotificationService.register(
-      'https://example.net/page/invalid-response',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+      'https://example.net/page/invalid-response'),
     function(error) {
       return error && error.includes("Error");
     },
     'Wrong error for not 201 responce code.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when respons code is not 201.');
--- a/dom/push/test/xpcshell/test_register_success_http2.js
+++ b/dom/push/test/xpcshell/test_register_success_http2.js
@@ -52,18 +52,17 @@ add_task(function* test_pushSubscription
   });
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionSuccess/subscribe",
     db
   });
 
   let newRecord = yield PushNotificationService.register(
-    'https://example.org/1',
-    ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    'https://example.org/1'
   );
 
   var subscriptionUri = serverURL + '/pushSubscriptionSuccesss';
   var pushEndpoint = serverURL + '/pushEndpointSuccess';
   var pushReceiptEndpoint = serverURL + '/receiptPushEndpointSuccess';
   equal(newRecord.subscriptionUri, subscriptionUri,
     'Wrong subscription ID in registration record');
   equal(newRecord.pushEndpoint, pushEndpoint,
@@ -95,18 +94,17 @@ add_task(function* test_pushSubscription
   });
 
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionMissingLink2/subscribe",
     db
   });
 
   let newRecord = yield PushNotificationService.register(
-    'https://example.org/no_receiptEndpoint',
-    ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    'https://example.org/no_receiptEndpoint'
   );
 
   var subscriptionUri = serverURL + '/subscriptionMissingLink2';
   var pushEndpoint = serverURL + '/pushEndpointMissingLink2';
   var pushReceiptEndpoint = '';
   equal(newRecord.subscriptionUri, subscriptionUri,
     'Wrong subscription ID in registration record');
   equal(newRecord.pushEndpoint, pushEndpoint,
--- a/dom/push/test/xpcshell/test_registration_error_http2.js
+++ b/dom/push/test/xpcshell/test_registration_error_http2.js
@@ -20,16 +20,15 @@ add_task(function* test_registrations_er
     db: makeStub(db, {
       getByScope(prev, scope) {
         return Promise.reject('Database error');
       }
     }),
   });
 
   yield rejects(
-    PushNotificationService.registration('https://example.net/1',
-      ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })),
+    PushNotificationService.registration('https://example.net/1'),
     function(error) {
       return error == 'Database error';
     },
     'Wrong message'
   );
 });
--- a/dom/push/test/xpcshell/test_registration_success_http2.js
+++ b/dom/push/test/xpcshell/test_registration_success_http2.js
@@ -36,42 +36,38 @@ add_task(function* test_pushNotification
   });
 
   var serverURL = "https://localhost:" + serverPort;
 
   let records = [{
     subscriptionUri: serverURL + '/subscriptionA',
     pushEndpoint: serverURL + '/pushEndpointA',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpointA',
-    scope: 'https://example.net/a',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    scope: 'https://example.net/a'
   }, {
     subscriptionUri: serverURL + '/subscriptionB',
     pushEndpoint: serverURL + '/pushEndpointB',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpointB',
-    scope: 'https://example.net/b',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    scope: 'https://example.net/b'
   }, {
     subscriptionUri: serverURL + '/subscriptionC',
     pushEndpoint: serverURL + '/pushEndpointC',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpointC',
-    scope: 'https://example.net/c',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false })
+    scope: 'https://example.net/c'
   }];
 
   for (let record of records) {
     yield db.put(record);
   }
 
   PushService.init({
     serverURI: serverURL,
     db
   });
 
   let registration = yield PushNotificationService.registration(
-    'https://example.net/a',
-    ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }));
+    'https://example.net/a');
   equal(
     registration.pushEndpoint,
     serverURL + '/pushEndpointA',
     'Wrong push endpoint for scope'
   );
 });
--- a/dom/push/test/xpcshell/test_unregister_success_http2.js
+++ b/dom/push/test/xpcshell/test_unregister_success_http2.js
@@ -48,28 +48,26 @@ add_task(function* test_pushUnsubscripti
   });
 
   var serverURL = "https://localhost:" + serverPort;
 
   yield db.put({
     subscriptionUri: serverURL + '/subscriptionUnsubscriptionSuccess',
     pushEndpoint: serverURL + '/pushEndpointUnsubscriptionSuccess',
     pushReceiptEndpoint: serverURL + '/receiptPushEndpointUnsubscriptionSuccess',
-    scope: 'https://example.com/page/unregister-success',
-    originAttributes: ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+    scope: 'https://example.com/page/unregister-success'
   });
 
   PushService.init({
     serverURI: serverURL,
     db
   });
 
   yield PushNotificationService.unregister(
-    'https://example.com/page/unregister-success',
-    ChromeUtils.originAttributesToSuffix({ appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }));
+    'https://example.com/page/unregister-success');
   let record = yield db.getByKeyID(serverURL + '/subscriptionUnsubscriptionSuccess');
   ok(!record, 'Unregister did not remove record');
 
 });
 
 add_task(function* test_complete() {
   prefs.setBoolPref("network.http.spdy.enforce-tls-profile", tlsProfile);
 });