From 79d4e9fa87b201bf52ccd9c41c9487670b802d29 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Thu, 16 Jul 1998 21:13:10 +0000 Subject: [PATCH] Rotation test git-svn-id: svn://10.0.0.236/trunk@5733 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/tests/Rotate.html | 25 +++++++++++++++++ mozilla/layout/html/tests/Rotate.js | 39 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 mozilla/layout/html/tests/Rotate.html create mode 100644 mozilla/layout/html/tests/Rotate.js diff --git a/mozilla/layout/html/tests/Rotate.html b/mozilla/layout/html/tests/Rotate.html new file mode 100644 index 00000000000..15629e7458a --- /dev/null +++ b/mozilla/layout/html/tests/Rotate.html @@ -0,0 +1,25 @@ + + +

+Let's start with some text, have a bold element, an italicized element and then an image: +. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +And now a lot more text. And now a lot more text. And now a lot more text. +

+ + \ No newline at end of file diff --git a/mozilla/layout/html/tests/Rotate.js b/mozilla/layout/html/tests/Rotate.js new file mode 100644 index 00000000000..d1ddddac181 --- /dev/null +++ b/mozilla/layout/html/tests/Rotate.js @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +var body = document.documentElement.childNodes[1]; +var para = body.childNodes[1]; +var image = para.childNodes[5]; + +var pos = 0; + +function rotate() { + dump("Removing\n"); + para.removeChild(image); + dump("Getting child " + pos + "\n"); + var child = para.childNodes[pos++]; + if (pos == para.childNodes.length) { + pos = 0; + } + dump("Inserting\n"); + para.insertBefore(image, child); + dump("Done\n"); +} + +//rotate(); +setInterval(rotate, 2000);