Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3901)

Unified Diff: bower_components/web-animations-js/tutorial/tutorial-testing.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: bower_components/web-animations-js/tutorial/tutorial-testing.js
diff --git a/bower_components/web-animations-js/tutorial/tutorial-testing.js b/bower_components/web-animations-js/tutorial/tutorial-testing.js
deleted file mode 100644
index 5bb26b8e31b6ac25519946103c25c13041f5cd44..0000000000000000000000000000000000000000
--- a/bower_components/web-animations-js/tutorial/tutorial-testing.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-"use strict";
-
-(function() {
-var pass;
-var completedTests;
-var allDone;
-var numTests;
-
-// Call to initialize the testing environment.
-function setupTutorialTests() {
- setState("Manual");
- var timeOfAnimation = document.createElement('div');
- timeOfAnimation.id = "animViewerText";
- timeOfAnimation.innerHTML = "Current animation time: 0.00";
- document.body.appendChild(timeOfAnimation);
- numTests = 0;
- completedTests = 0;
- allDone = false;
- pass = true;
-}
-
-// This function mimics the async_test function in testharness.js so that
-// extra-asserts.js will run as intended for a tutorial.
-function async_test(func, name, properties) {
- numTests++;
- step = function(func) {
- func();
- if (!pass) {
- parent.TryItDisplay.fail();
- allDone = true;
- };
- };
-
- done = function() {
- completedTests++;
- if (completedTests == numTests && !allDone) {
- allDone = true;
- parent.TryItDisplay.pass();
- };
- };
- return this;
-}
-
-function assert_equals(actual, expected, description) {
- pass = (actual == expected);
-}
-
-function assert_approx_equals(actual, expected, epsilon, description) {
- var lowerBound = expected - (epsilon / 2) < actual;
- var upperBound = expected + (epsilon / 2) > actual;
- pass = (lowerBound && upperBound);
-}
-
-// This function is required to do nothing for tutorial testing,
-// but extra-asserts calls it and thus without this function,
-// extra-asserts.js will cause the page to crash.
-function add_completion_callback(anything) {
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Exposing functions to be accessed externally //
-///////////////////////////////////////////////////////////////////////////////
-
-window.setupTutorialTests = setupTutorialTests;
-window.async_test = async_test;
-window.assert_approx_equals = assert_approx_equals;
-window.assert_equals = assert_equals;
-window.add_completion_callback = add_completion_callback;
-})();
« no previous file with comments | « bower_components/web-animations-js/tutorial/tutorial-style.css ('k') | bower_components/web-animations-js/web-animations.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698