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@gmail.com>2015-08-07 10:46:45 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-08-07 10:46:45 +0300
commite8bde681ec380b53ed15fa14a994176dffa5d58f (patch)
tree113f8b02495136006c59f6b37f265acfb4524b42 /tests/javascript
parent08f113d9c4edae6182bfd458e63016f49a7dd024 (diff)
refs #8413 prevent malformed url error if encoding is not utf8
Diffstat (limited to 'tests/javascript')
-rw-r--r--tests/javascript/index.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index d232f62295..8c5179f77f 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -384,6 +384,7 @@ function setupContentTrackingFixture(name, targetNode) {
<iframe name="iframe5"></iframe>
<iframe name="iframe6"></iframe>
<iframe name="iframe7"></iframe>
+ <iframe name="iframe9"></iframe>
<img id="image1" src=""/> <!-- Test require this empty source attribute before image2!! -->
<img id="image2" data-content-piece src="img.jpg"/>
<ul>
@@ -396,6 +397,7 @@ function setupContentTrackingFixture(name, targetNode) {
<li><a id="click7" href="example.word" target="iframe7" class="piwik_download clicktest">download: explicit</a></li>
<li><a id="click8" href="example.exe" target="iframe8" class="clicktest">no click handler</a></li>
<li><a id="click9" href="example.html" target="iframe7" download class="clicktest">download: explicit (attribute)</a></li>
+ <li><a id="click11" href="http://example.co.nz/test-with-%F6%E4%FC/story/0" target="iframe9">outlink: containing iso-8859-1 encoded url</a></li>
</ul>
<div id="clickDiv"></div>
</div>
@@ -723,7 +725,7 @@ function PiwikTest() {
ok(actual.length > 11, "findNodesHavingAttribute, should find many elements within body");
actual = query.findNodesHavingAttribute(_e('other'), 'href');
- propEqual(actual, [_e('click1'), _e('click2'), _e('click3'), _e('click4'), _e('click5'), _e('click6'), _e('click7'), _e('click8'), _e('click9')], "findNodesHavingAttribute, should find many elements within node");
+ propEqual(actual, [_e('click1'), _e('click2'), _e('click3'), _e('click4'), _e('click5'), _e('click6'), _e('click7'), _e('click8'), _e('click9'), _e('click11')], "findNodesHavingAttribute, should find many elements within node");
actual = query.findNodesHavingAttribute(_e('other'), 'anyAttribute');
propEqual(actual, [], "findNodesHavingAttribute, should not find any such attribute within div");
@@ -2720,7 +2722,7 @@ if ($sqlite) {
});
test("tracking", function() {
- expect(101);
+ expect(102);
// Prevent Opera and HtmlUnit from performing the default action (i.e., load the href URL)
var stopEvent = function (evt) {
@@ -2816,7 +2818,7 @@ if ($sqlite) {
tracker.enableLinkTracking(true);
tracker.setRequestMethod("GET");
- var buttons = new Array("click1", "click2", "click3", "click4", "click5", "click6", "click7");
+ var buttons = new Array("click1", "click2", "click3", "click4", "click5", "click6", "click7", "click11");
for (var i=0; i < buttons.length; i++) {
tracker.hook.test._addEventListener(_e(buttons[i]), "click", stopEvent);
triggerEvent(_e(buttons[i]), 'click');
@@ -3012,7 +3014,7 @@ if ($sqlite) {
xhr.open("GET", "piwik.php?requests=" + getToken(), false);
xhr.send(null);
results = xhr.responseText;
- equal( (/<span\>([0-9]+)\<\/span\>/.exec(results))[1], "32", "count tracking events" );
+ equal( (/<span\>([0-9]+)\<\/span\>/.exec(results))[1], "33", "count tracking events" );
// firing callback
ok( trackLinkCallbackFired, "trackLink() callback fired" );
@@ -3029,6 +3031,7 @@ if ($sqlite) {
ok( /example.us/.test( results ), "addListener()" );
ok( /example.net/.test( results ), "setRequestMethod(GET), click: implicit outlink (by outbound URL)" );
+ ok( /example.co.nz/.test( results ), "setRequestMethod(GET), click: outlink with iso-8859-1 encoding" );
ok( /example.html/.test( results ), "click: explicit outlink" );
ok( /example.pdf/.test( results ), "click: implicit download (by file extension)" );
ok( /example.word/.test( results ), "click: explicit download" );