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

Unified Diff: chrome/test/data/extensions/api_test/webintent_handler/background.js

Issue 12223086: Update app runtime custom bindings to handle no WebIntents launch data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More stuff removed Created 7 years, 10 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: chrome/test/data/extensions/api_test/webintent_handler/background.js
diff --git a/chrome/test/data/extensions/api_test/webintent_handler/background.js b/chrome/test/data/extensions/api_test/webintent_handler/background.js
deleted file mode 100644
index 2cd36b87dad0d8858db5a382b09c5de755537d8e..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/api_test/webintent_handler/background.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/*
-This extension is a platform app that provides a Web Intent handler; it accepts
-incoming requests and invokes chrome.test.succeed() immediately.
-*/
-
-function launchedListener(launchData) {
- chrome.test.assertFalse(!launchData, "No launchData");
- chrome.test.assertFalse(!launchData.intent, "No launchData.intent");
- chrome.test.assertEq(launchData.intent.action,
- "http://webintents.org/view");
- chrome.test.assertEq(launchData.intent.type,
- "chrome-extension://fileentry");
- chrome.test.assertFalse(!launchData.intent.data,
- "No launchData.intent.data");
-
- launchData.intent.data.file(function(file) {
- var reader = new FileReader();
- reader.onloadend = function(e) {
- chrome.test.assertEq("hello, world!", reader.result);
- chrome.test.succeed();
- };
- reader.onerror = function(e) {
- chrome.test.fail("Error reading file contents.");
- };
- reader.readAsText(file);
- });
-}
-
-chrome.app.runtime.onLaunched.addListener(launchedListener);

Powered by Google App Engine
This is Rietveld 408576698