diff options
Diffstat (limited to 'tests/javascript')
-rw-r--r-- | tests/javascript/index.php | 2 | ||||
-rw-r--r-- | tests/javascript/piwik.php | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php index 418150fc94..c49c942cbc 100644 --- a/tests/javascript/index.php +++ b/tests/javascript/index.php @@ -664,7 +664,7 @@ function PiwikTest() { propEqual(actual, [], "htmlCollectionToArray, should always return an array even if interger given"); // would still parse string to an array but we can live with that var htmlCollection = document.getElementsByTagName('a'); - ok(htmlCollection instanceof HTMLCollection, 'htmlCollectionToArray, we need to make sure we handle an html collection in order to make test really useful') + ok((htmlCollection instanceof HTMLCollection) || (htmlCollection instanceof NodeList), 'htmlCollectionToArray, we need to make sure we handle an html collection in order to make test really useful') actual = query.htmlCollectionToArray(htmlCollection); ok($.isArray(actual), 'htmlCollectionToArray, should convert to array'); ok(actual.length === htmlCollection.length, 'htmlCollectionToArray should have same amount of elements as before'); diff --git a/tests/javascript/piwik.php b/tests/javascript/piwik.php index e38102545e..c1c0f5ae20 100644 --- a/tests/javascript/piwik.php +++ b/tests/javascript/piwik.php @@ -91,6 +91,11 @@ if (isset($_GET['requests'])) { if (!empty($requests) && isPost()) { $query = true; foreach ($requests['requests'] as $request) { + if (empty($data) && preg_match('/data=%7B%22token%22%3A%22([a-z0-9A-Z]*?)%22%7D/', $request, $matches)) { + // safari and opera + $data = array('token' => $matches[1]); + } + $query = $query && logRequest($sqlite, $uri . $request, $data); } } else { |