| 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();
|
| + }
|
| +]);
|
|
|