--- /dev/null
+The WebGL initial code of main.js(line 1~234) comes from
+https://www.khronos.org/registry/webgl/sdk/demos/webkit/
+without modification.
+
+These tests are copyright by the Khronos Group under MIT License:
+https://www.khronos.org/registry/webgl/sdk/tests/test-guidelines.md
+
+
+The jquery extension code of main.js(line 251~376) comes from
+http://jquerymobile.com/demos/1.3.0/docs/examples/slider/tooltip.html
+with some modifications.
+
+ this._currentValue = newValue;
++ var ID = this.element[0].id;
++ if (ID == "slider-1") {
++ var value = 7 + 23*(4 - (parseInt(newValue, 10) - 1))/5;
++ setSize(value);
++ if (parseInt(newValue, 10) != 3) {
++ testFlag.size = true;
++ checkEnable();
++ }
++ } else if (ID == "speed-1") {
++ setSpeed(parseInt(newValue, 10));
++ if (parseInt(newValue, 10) != 5) {
++ testFlag.speed = true;
++ checkEnable();
++ }
++ } else if (ID == "flip-1") {
++ if (newValue == "0") {
++ stop();
++ $("input[type='radio']").checkboxradio('disable');
++ $("#slider-1").slider('disable');
++ $("#speed-1").slider('disable');
++ testFlag.status = true;
++ checkEnable();
++ } else if (newValue == "1"){
++ if (!isInit) {
++ reStart();
++ $("input[type='radio']").checkboxradio('enable');
++ $("#slider-1").slider('enable');
++ $("#speed-1").slider('enable');
++ } else {
++ isInit = false;
++ }
++ }
++ }
+
+You may use any jQuery project under the terms of the MIT License:
+http://jquery.org/license
+
-/*
- 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:
- Lin, Wanming <wanmingx.lin@intel.com>
-
- */
var g = {}; // globals
var ORIGIN_SPEED = 0.5;
var multiple = 5;
}
}
- //setSpeed(parseInt(newValue, 10));
if (o.popupEnabled) {
this._positionPopup();
this._popup.html(Math.round(newValue));
--- /dev/null
+The code of main.js comes from
+http://svn.webkit.org/repository/webkit/trunk/LayoutTests/transitions/resources/transition-test-helpers.js
+without modification.
+
+These resources are under BSD Two Clause License:
+http://trac.webkit.org/browser/trunk/Source/WebKit/LICENSE
-/*
-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:
- Lin, Wanming <wanmingx.lin@intel.com>
+/* This is the helper function to run transition tests:
+
+Test page requirements:
+- The body must contain an empty div with id "result"
+- Call this function directly from the <script> inside the test page
+
+Function parameters:
+ expected [required]: an array of arrays defining a set of CSS properties that must have given values at specific times (see below)
+ callback [optional]: a function to be executed just before the test starts (none by default)
+
+ Each sub-array must contain these items in this order:
+ - the time in seconds at which to snapshot the CSS property
+ - the id of the element on which to get the CSS property value
+ - the name of the CSS property to get [1]
+ - the expected value for the CSS property
+ - the tolerance to use when comparing the effective CSS property value with its expected value
+
+ [1] If the CSS property name is "-webkit-transform", expected value must be an array of 1 or more numbers corresponding to the matrix elements,
+ or a string which will be compared directly (useful if the expected value is "none")
+ If the CSS property name is "-webkit-transform.N", expected value must be a number corresponding to the Nth element of the matrix
*/
-
const usePauseAPI = true;
const dontUsePauseAPI = false;
const shouldBeTransitioning = true;
const shouldNotBeTransitioning = false;
-
function roundNumber(num, decimalPlaces)
{
return Math.round(num * Math.pow(10, decimalPlaces)) / Math.pow(10, decimalPlaces);
isCloseEnough(parseInt(rgb[2]), expected[2], tolerance));
}
+function parseCrossFade(s)
+{
+ var matches = s.match("-webkit-cross-fade\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\)");
+
+ if (!matches)
+ return null;
+
+ return {"from": matches[1], "to": matches[2], "percent": parseFloat(matches[3])}
+}
+
function checkExpectedValue(expected, index)
{
var time = expected[index][0];
} else if (property == "lineHeight") {
computedValue = parseInt(window.getComputedStyle(document.getElementById(elementId)).lineHeight);
pass = isCloseEnough(computedValue, expectedValue, tolerance);
+ } else if (property == "background-image"
+ || property == "border-image-source"
+ || property == "border-image"
+ || property == "list-style-image"
+ || property == "-webkit-mask-image"
+ || property == "-webkit-mask-box-image") {
+ if (property == "border-image" || property == "-webkit-mask-image" || property == "-webkit-mask-box-image")
+ property += "-source";
+
+ computedValue = window.getComputedStyle(document.getElementById(elementId)).getPropertyCSSValue(property).cssText;
+ computedCrossFade = parseCrossFade(computedValue);
+
+ if (!computedCrossFade) {
+ pass = false;
+ } else {
+ pass = isCloseEnough(computedCrossFade.percent, expectedValue, tolerance);
+ }
} else {
var computedStyle = window.getComputedStyle(document.getElementById(elementId)).getPropertyCSSValue(property);
if (computedStyle.cssValueType == CSSValue.CSS_VALUE_LIST) {
} else if (computedStyle.cssValueType == CSSValue.CSS_PRIMITIVE_VALUE) {
switch (computedStyle.primitiveType) {
case CSSPrimitiveValue.CSS_STRING:
+ case CSSPrimitiveValue.CSS_IDENT:
computedValue = computedStyle.getStringValue();
pass = computedValue == expectedValue;
break;
{
document.getElementById('result').innerHTML = result;
- if (window.layoutTestController)
- layoutTestController.notifyDone();
+ if (window.testRunner)
+ testRunner.notifyDone();
}
function checkExpectedValueCallback(expected, index)
if (tryToPauseTransition === undefined)
tryToPauseTransition = shouldBeTransitioning;
- // We can only use the transition fast-forward mechanism if DRT implements pauseTransitionAtTimeOnElementWithId()
if (hasPauseTransitionAPI && usePauseAPI) {
if (tryToPauseTransition) {
- if (!layoutTestController.pauseTransitionAtTimeOnElementWithId(property, time, elementId))
+ var element = document.getElementById(elementId);
+ if (!internals.pauseTransitionAtTimeOnElement(property, time, element))
window.console.log("Failed to pause '" + property + "' transition on element '" + elementId + "'");
}
checkExpectedValue(expected, i);
}
}
- /*if (maxTime > 0)
+ if (maxTime > 0)
window.setTimeout(endTest, maxTime * 1000 + 50);
else
- endTest();*/
+ endTest();
}
function waitForAnimationStart(callback, delay)
function runTransitionTest(expected, callback, usePauseAPI, doPixelTest)
{
- hasPauseTransitionAPI = ('layoutTestController' in window) && ('pauseTransitionAtTimeOnElementWithId' in layoutTestController);
-
- if (window.layoutTestController) {
+ hasPauseTransitionAPI = 'internals' in window;
+
+ if (window.testRunner) {
if (!doPixelTest)
- layoutTestController.dumpAsText();
- layoutTestController.waitUntilDone();
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
}
-
+
if (!expected)
throw("Expected results are missing!");
-
+
window.addEventListener("load", function() { startTest(expected, usePauseAPI, callback); }, false);
}
--- /dev/null
+The jquery extension code of main.js(line 236~339) comes from
+http://jquerymobile.com/demos/1.3.0/docs/examples/slider/tooltip.html
+with some modifications.
+
+ this._currentValue = newValue;
++ var ID = this.element[0].id;
++ if (ID == "slider-1") {
++ if ( o.showValue ) {
++ this._handleText.html(Math.round(newValue*100)+"%");
++ $("#p").css("opacity", newValue);
++ if(newValue != 1){
++ testFlag.Transparency = true;
++ status();
++ }
++ }
++ }else if(ID == "slider-2"){
++ if ( o.showValue ) {
++ this._handleText.html(Math.round(newValue));
++ $("#text-div").css("outline-offset", newValue);
++ if(newValue != 5){
++ testFlag.Outline = true;
++ status();
++ }
++ }
++ }
+- //setSpeed(parseInt(newValue, 10));
+- if (o.popupEnabled) {
+- this._positionPopup();
+- this._popup.html(Math.round(newValue));
+- }
+- if (o.showValue) {
+- this._handleText.html(Math.round(newValue));
+- }
+
+You may use any jQuery project under the terms of the MIT License:
+http://jquery.org/license
-/*
-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:
-Cui, Jieqiong <jieqiongx.cui@intel.com>
-
- */
-
var testFlag={
Mulcolumn: false,
Transparency: false,
--- /dev/null
+The code of determine user's location in main.js(line 44~86)
+reference a sample of google maps:
+https://developers.google.com/maps/articles/geolocation?hl=zh-CN
+
+The code samples are licensed under the Apache 2.0 License:
+http://www.apache.org/licenses/LICENSE-2.0
-/*
-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>
-
-*/
-
-
function initialize() {
$.mobile.loading('show', {
text: 'loading...',
--- /dev/null
+The jquery extension code of main.js(line 67~159) comes from
+http://jquerymobile.com/demos/1.3.0/docs/examples/slider/tooltip.html
+with some modifications.
+
+ if (o.popupEnabled) {
+ this._positionPopup();
+- this._popup.html(Math.round(newValue));
++ this._popup.html(Math.round(newValue*100)+"%" );
++ document.getElementById("MediaPlayback").volume = newValue;
+ }
+ if (o.showValue) {
+- this._handleText.html(Math.round(newValue));
++ this._handleText.html(Math.round(newValue*100)+"%");
++ document.getElementById("MediaPlayback").volume = newValue;
+ }
+
+You may use any jQuery project under the terms of the MIT License:
+http://jquery.org/license
-/*
-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:
- Lin, Wanming <wanmingx.lin@intel.com>
-
-*/
-
var videoFileList = new Array("big_buck_bunny_640x360_theora.ogv", "big_buck_bunny_640x360_h264.mp4", "big_buck_bunny_640x360_xvid.3gp");
var testTarget='';
--- /dev/null
+The jquery extension code of main.js(line 37~137) comes from
+http://jquerymobile.com/demos/1.3.0/docs/examples/slider/tooltip.html
+with some modifications.
+
+ this._currentValue = newValue;
++ var ID = this.element[0].id;
++ if (ID == "slider-1") {
++ vibration_time = Number($("#slider-1").val())*1000;
++ } else if (ID == "slider-2") {
++ vibration_periods = Number($("#slider-2").val())*1000;
++ } else if (ID == "slider-3") {
++ vibration_number = $("#slider-3").val();
++ }
+
+You may use any jQuery project under the terms of the MIT License:
+http://jquery.org/license
-/*
-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:
- Lin, Wanming <wanmingx.lin@intel.com>
-
-*/
var vibration_time, vibration_periods, vibration_number;
jQuery(document).ready(function() {
vibration_number = $("#slider-3").val();
}
- //setSpeed(parseInt(newValue, 10));
if (o.popupEnabled) {
this._positionPopup();
this._popup.html(newValue);