diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js')
-rw-r--r-- | tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js b/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js index f6ea1b48..4484467d 100644 --- a/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js @@ -7,7 +7,7 @@ } ) ); var getAccessKeyPrefixTestData = [ - //ua string, platform string, expected prefix + // ua string, platform string, expected prefix // Internet Explorer ['Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)', 'Win32', 'alt-'], ['Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)', 'Win32', 'alt-'], @@ -27,11 +27,11 @@ ['Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30', 'MacIntel', 'ctrl-option-'], ['Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.68 Safari/534.30', 'Linux i686', 'alt-shift-'] ], - //strings appended to title to make sure updateTooltipAccessKeys handles them correctly + // strings appended to title to make sure updateTooltipAccessKeys handles them correctly updateTooltipAccessKeysTestData = [ '', ' [a]', ' [test-a]', ' [alt-b]' ]; function makeInput( title, accessKey ) { - //The properties aren't escaped, so make sure you don't call this function with values that need to be escaped! + // The properties aren't escaped, so make sure you don't call this function with values that need to be escaped! return '<input title="' + title + '" ' + ( accessKey ? 'accessKey="' + accessKey + '" ' : '' ) + ' />'; } @@ -46,10 +46,10 @@ } ); QUnit.test( 'updateTooltipAccessKeys - current browser', 2, function ( assert ) { - var title = $( makeInput ( 'Title', 'a' ) ).updateTooltipAccessKeys().prop( 'title' ), - //The new title should be something like "Title [alt-a]", but the exact label will depend on the browser. - //The "a" could be capitalized, and the prefix could be anything, e.g. a simple "^" for ctrl- - //(no browser is known using such a short prefix, though) or "Alt+Umschalt+" in German Firefox. + var title = $( makeInput( 'Title', 'a' ) ).updateTooltipAccessKeys().prop( 'title' ), + // The new title should be something like "Title [alt-a]", but the exact label will depend on the browser. + // The "a" could be capitalized, and the prefix could be anything, e.g. a simple "^" for ctrl- + // (no browser is known using such a short prefix, though) or "Alt+Umschalt+" in German Firefox. result = /^Title \[(.+)[aA]\]$/.exec( title ); assert.ok( result, 'title should match expected structure.' ); assert.notEqual( result[1], 'test-', 'Prefix used for testing shouldn\'t be used in production.' ); |