diff --git a/proximity/DeviceProximityEvent_tests.js b/proximity/DeviceProximityEvent_tests.js index 933e66bef6b505..57f5647694ab20 100644 --- a/proximity/DeviceProximityEvent_tests.js +++ b/proximity/DeviceProximityEvent_tests.js @@ -1,32 +1,3 @@ -/** -* W3C 3-clause BSD License -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* o Redistributions of works must retain the original copyright notice, -* this list of conditions and the following disclaimer. -* -* o Redistributions in binary form must reproduce the original copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* -* o Neither the name of the W3C nor the names of its contributors may be -* used to endorse or promote products derived from this work without -* specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -**/ - (function() { //inheritance tests test(function() { @@ -41,7 +12,7 @@ //Type attribute tests test(function() { - assert_throws(null, function() { + assert_throws(new TypeError(), function() { new DeviceProximityEvent(); }, 'First argument is required, so was expecting a TypeError.'); }, 'Missing type argument'); @@ -94,7 +65,7 @@ test(function() { var event = new DeviceProximityEvent(new Boolean(true)); assert_equals(event.type, 'true'); - }, 'type argument is instance of boolean'); + }, 'type argument is instance of Boolean (true)'); test(function() { var event = new DeviceProximityEvent(false); @@ -104,17 +75,17 @@ test(function() { var event = new DeviceProximityEvent(new Boolean(false)); assert_equals(event.type, 'false'); - }, ''); + }, 'type argument is instance of Boolean (false)'); test(function() { var event = new DeviceProximityEvent('test'); assert_equals(event.type, 'test'); - }, 'type argument is instance of boolean (false)'); + }, 'type argument is string'); test(function() { var event = new DeviceProximityEvent(new String('test')); assert_equals(event.type, 'test'); - }, 'type argument is string'); + }, 'type argument is instance of String'); test(function() { var event = new DeviceProximityEvent(function test() {}); diff --git a/proximity/ProximityEvent_tests.html b/proximity/ProximityEvent_tests.html new file mode 100644 index 00000000000000..b723ba0d3877d3 --- /dev/null +++ b/proximity/ProximityEvent_tests.html @@ -0,0 +1,9 @@ + + + +
Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License. To contribute to a W3C Test Suite, see the policies and contribution forms.
- - - diff --git a/proximity/manifest.txt b/proximity/manifest.txt index 033135b2fe9174..c7293d01e9a9bf 100644 --- a/proximity/manifest.txt +++ b/proximity/manifest.txt @@ -1,3 +1,2 @@ -index.html -index.html +ProximityEvent_tests.html