--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* 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.
+* Neither the name of Intel Corporation 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 INTEL CORPORATION "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 INTEL CORPORATION 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.
+
+Authors:
+ Xinx, liu <xinx.liu@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>Notification Test: notification_requestPermission</title>
+ <link rel="author" title="Intel" href="http://www.intel.com" />
+ <link rel="help" href="http://www.w3.org/TR/2012/WD-notifications-20120614/#api" />
+ <meta name="flags" content="" />
+ <meta name="assert" content="Check that the notification.requestPermission are implemented as specified for existence, type" />
+ <script src="support/notifications.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script type="text/javascript">
+ test(function() {
+ assert_true("requestPermission" in Notification, "requestPermission method exists ");
+ }, "Check if Notification.requestPermission method exists");
+
+ test(function() {
+ assert_equals(typeof Notification.requestPermission, "function", "requestPermission method of type");
+ }, "Check if the type Notification.requestPermission method is function");
+ </script>
+</body>
+</html>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=1</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=1</test_script_entry>
</description>
<specs>
<spec>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if notification.permission attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_permission_exist">
- <description>
- <pre_condition/>
- <post_condition/>
- <steps>
- <step order="1">
- <step_desc>Check if notification.permission attribute exists</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=2</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="method" element_name="permission" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
- <spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if the type notification.permission attribute is function" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_permission_type">
- <description>
- <pre_condition/>
- <post_condition/>
- <steps>
- <step order="1">
- <step_desc>Check if the type notification.permission attribute is function</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=3</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion element_type="method" element_name="permission" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
- <spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
- <spec_statement/>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check if notification.requestPermission attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_requestPermission_exist">
+ <testcase purpose="Check if notification.onclick attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclick_exist">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if notification.requestPermission attribute exists</step_desc>
+ <step_desc>Check if notification.onclick attribute exists</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=4</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=2</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="method" element_name="requestPermission" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onclick" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the type notification.requestPermission attribute is function" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_requestPermission_type">
+ <testcase purpose="Check if the type notification.onclick attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclick_type">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if the type notification.requestPermission attribute is function</step_desc>
+ <step_desc>Check if the type notification.onclick attribute is object</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=5</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=3</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="method" element_name="requestPermission" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onclick" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if notification.onclick attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclick_exist">
+ <testcase purpose="Check if notification.onshow attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onshow_exist">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if notification.onclick attribute exists</step_desc>
+ <step_desc>Check if notification.onshow attribute exists</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=6</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=4</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onclick" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onshow" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the type notification.onclick attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclick_type">
+ <testcase purpose="Check if the type notification.onshow attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onshow_type">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if the type notification.onclick attribute is object</step_desc>
+ <step_desc>Check if the type notification.onshow attribute is object</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=7</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=5</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onclick" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onshow" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if notification.onshow attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onshow_exist">
+ <testcase purpose="Check if notification.onerror attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onerror_exist">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if notification.onshow attribute exists</step_desc>
+ <step_desc>Check if notification.onerror attribute exists</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=8</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=6</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onshow" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onerror" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the type notification.onshow attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onshow_type">
+ <testcase purpose="Check if the type notification.onerror attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onerror_type">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if the type notification.onshow attribute is object</step_desc>
+ <step_desc>Check if the type notification.onerror attribute is object</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=9</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=7</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onshow" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onerror" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if notification.onerror attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onerror_exist">
+ <testcase purpose="Check if notification.onclose attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclose_exist">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if notification.onerror attribute exists</step_desc>
+ <step_desc>Check if notification.onclose attribute exists</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=10</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=8</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onerror" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onclose" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the type notification.onerror attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onerror_type">
+ <testcase purpose="Check if the type notification.onclose attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclose_type">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if the type notification.onerror attribute is object</step_desc>
+ <step_desc>Check if the type notification.onclose attribute is object</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=11</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=9</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onerror" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="eventhandler" element_name="onclose" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if notification.onclose attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclose_exist">
+ <testcase purpose="Check if notification.close attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_close_exist">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if notification.onclose attribute exists</step_desc>
+ <step_desc>Check if notification.close attribute exists</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=12</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=10</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onclose" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="method" element_name="close" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the type notification.onclose attribute is object" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_onclose_type">
+ <testcase purpose="Check if the type notification.close attribute is function" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_close_type">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if the type notification.onclose attribute is object</step_desc>
+ <step_desc>Check if the type notification.close attribute is function</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=13</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=11&amp;locator_key=id&amp;value=11</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="eventhandler" element_name="onclose" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="method" element_name="close" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if notification.close attribute exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_close_exist">
+ <testcase purpose="Check if notification.requestPermission method exists" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_requestPermission_exist">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if notification.close attribute exists</step_desc>
+ <step_desc>Check if notification.requestPermission attribute exists</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=14</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_requestPermission.html?total_num=2&amp;locator_key=id&amp;value=1</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="method" element_name="close" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="method" element_name="requestPermission" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if the type notification.close attribute is function" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_close_type">
+ <testcase purpose="Check if the type notification.requestPermission method is function" type="compliance" status="approved" component="WebAPI/UI/Web Notifications (Partial)" execution_type="auto" priority="P1" id="notification_requestPermission_type">
<description>
<pre_condition/>
<post_condition/>
<steps>
<step order="1">
- <step_desc>Check if the type notification.close attribute is function</step_desc>
+ <step_desc>Check if the type notification.requestPermission attribute is function</step_desc>
<expected>Pass</expected>
</step>
</steps>
- <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_attribute.html?total_num=15&amp;locator_key=id&amp;value=15</test_script_entry>
+ <test_script_entry >/opt/tct-notification-w3c-tests/notification/notification_requestPermission.html?total_num=2&amp;locator_key=id&amp;value=2</test_script_entry>
</description>
<specs>
<spec>
- <spec_assertion element_type="method" element_name="close" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
+ <spec_assertion element_type="method" element_name="requestPermission" interface="Notification" specification="Web Notifications (Partial)" section="UI" category="Tizen W3C API Specifications" />
<spec_url>http://www.w3.org/TR/2012/WD-notifications-20120614/#api</spec_url>
<spec_statement/>
</spec>