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

Side by Side Diff: chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js

Issue 347393005: Missing removeEventListener() arg in assertions.js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function() { 5 (function() {
6 6
7 // We are going to kill all of the builtins, so hold onto the ones we need. 7 // We are going to kill all of the builtins, so hold onto the ones we need.
8 var defineGetter = Object.prototype.__defineGetter__; 8 var defineGetter = Object.prototype.__defineGetter__;
9 var defineSetter = Object.prototype.__defineSetter__; 9 var defineSetter = Object.prototype.__defineSetter__;
10 var Error = window.Error; 10 var Error = window.Error;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Our tab's location. Normally this would be our document's location but if 79 // Our tab's location. Normally this would be our document's location but if
80 // we're an iframe it will be the location of the parent - in which case, 80 // we're an iframe it will be the location of the parent - in which case,
81 // expect to be told. 81 // expect to be told.
82 var tabLocationHref = null; 82 var tabLocationHref = null;
83 83
84 if (parent == window) { 84 if (parent == window) {
85 tabLocationHref = document.location.href; 85 tabLocationHref = document.location.href;
86 } else { 86 } else {
87 window.addEventListener('message', function listener(event) { 87 window.addEventListener('message', function listener(event) {
88 window.removeEventListener(listener); 88 window.removeEventListener('message', listener);
89 tabLocationHref = event.data; 89 tabLocationHref = event.data;
90 }); 90 });
91 } 91 }
92 92
93 function checkLastError(reply) { 93 function checkLastError(reply) {
94 if (!chrome.runtime.lastError) 94 if (!chrome.runtime.lastError)
95 return true; 95 return true;
96 var kCouldNotEstablishConnection = 96 var kCouldNotEstablishConnection =
97 'Could not establish connection. Receiving end does not exist.'; 97 'Could not establish connection. Receiving end does not exist.';
98 if (chrome.runtime.lastError.message == kCouldNotEstablishConnection) 98 if (chrome.runtime.lastError.message == kCouldNotEstablishConnection)
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if (!message) 285 if (!message)
286 message = kMessage; 286 message = kMessage;
287 287
288 chrome.runtime.sendMessage(extensionId, message, 288 chrome.runtime.sendMessage(extensionId, message,
289 {'includeTlsChannelId': includeTlsChannelId}, 289 {'includeTlsChannelId': includeTlsChannelId},
290 checkTlsChannelIdResponse); 290 checkTlsChannelIdResponse);
291 } 291 }
292 }; 292 };
293 293
294 }()); 294 }());
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698