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

Unified Diff: chrome/test/data/extensions/platform_apps/document_editor/test.js

Issue 9845003: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include files Created 8 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: chrome/test/data/extensions/platform_apps/document_editor/test.js
diff --git a/chrome/test/data/extensions/platform_apps/document_editor/test.js b/chrome/test/data/extensions/platform_apps/document_editor/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..4f76c66c1f570a223737827a64a65492caccaccb
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/document_editor/test.js
@@ -0,0 +1,22 @@
+// 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.
+
+chrome.test.runTests([
+ function testIntent() {
+ chrome.test.assertFalse(!window.intent, "No window.intent");
+ chrome.test.assertTrue(window.intent.action == "http://webintents.org/view",
+ "window.intent.action incorrect: " + window.intent.action);
+ chrome.test.assertTrue(window.intent.type == "text/plain",
+ "window.intent.type incorrect: " + window.intent.type);
+ var request = new XMLHttpRequest();
+ request.open('GET', window.intent.data, false);
+ request.send(null);
+ chrome.test.assertTrue(request.status === 0,
+ "Invalid request.status: " + request.status);
+ chrome.test.assertTrue(
+ request.responseText.indexOf("This is a test. Word.") == 0,
+ "request.responseText incorrect: " + request.responseText);
+ chrome.test.succeed();
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698