Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-09 22:36:13 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-09 22:36:13 +0400
commitf2f3471f67ff05ab8a972ec9b7aad100f8b096d1 (patch)
tree3624124d62cf98eeeaa492840165d71168f70906 /tests/javascript
parent34f48f693be7b4c7cda5ce429a7259bd59b3f741 (diff)
refs #4996 fix some tests in latest safari and opera
Diffstat (limited to 'tests/javascript')
-rw-r--r--tests/javascript/index.php2
-rw-r--r--tests/javascript/piwik.php5
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 {