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

Unified Diff: trunk/src/chrome/browser/resources/video_player/js/background.js

Issue 216183006: Revert 260198 "[VideoPlayer] Browser tests for new separated vid..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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
Index: trunk/src/chrome/browser/resources/video_player/js/background.js
===================================================================
--- trunk/src/chrome/browser/resources/video_player/js/background.js (revision 260244)
+++ trunk/src/chrome/browser/resources/video_player/js/background.js (working copy)
@@ -4,12 +4,6 @@
'use strict';
-
-// Stores the app windows OLNY for test purpose.
-// We SHOULD NOT use it as it is except for test, since the files which have
-// the same name will be overridden each other.
-var appWindowsForTest = {};
-
chrome.app.runtime.onLaunched.addListener(function(launchData) {
if (!launchData || !launchData.items || launchData.items.length == 0)
return;
@@ -18,12 +12,11 @@
entry.file(function(file) {
var url = window.URL.createObjectURL(file);
open(url, entry.name);
- }.wrap(),
- function() {
+ }, function() {
// TODO(yoshiki): handle error in a smarter way.
open('', 'error'); // Empty URL shows the error message.
- }.wrap());
-}.wrap());
+ });
+});
function open(url, title) {
chrome.app.window.create('video_player.html', {
@@ -33,11 +26,8 @@
minHeight: 100
},
function(createdWindow) {
- // Stores the window for test purpose.
- appWindowsForTest[title] = createdWindow;
-
createdWindow.setIcon('images/200/icon.png');
createdWindow.contentWindow.videoUrl = url;
createdWindow.contentWindow.videoTitle = title;
- }.wrap());
+ });
}

Powered by Google App Engine
This is Rietveld 408576698