| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 chrome.test.runTests([ |
| 6 function testIntent() { |
| 7 chrome.test.assertFalse(!window.intent, "No window.intent"); |
| 8 chrome.test.assertTrue(window.intent.action == "http://webintents.org/view", |
| 9 "window.intent.action incorrect: " + window.intent.action); |
| 10 chrome.test.assertTrue(window.intent.type == "text/plain", |
| 11 "window.intent.type incorrect: " + window.intent.type); |
| 12 var request = new XMLHttpRequest(); |
| 13 request.open('GET', window.intent.data, false); |
| 14 request.send(null); |
| 15 chrome.test.assertTrue(request.status === 0, |
| 16 "Invalid request.status: " + request.status); |
| 17 chrome.test.assertTrue( |
| 18 request.responseText.indexOf("This is a test. Word.") == 0, |
| 19 "request.responseText incorrect: " + request.responseText); |
| 20 chrome.test.succeed(); |
| 21 } |
| 22 ]); |
| OLD | NEW |