Regression testcase for Bug 492046 based on THarwoods testcase (r=me)

error: pathspec 'test/acceptance/regress/bug_492046.as' did not match any file(s) known to git

--- test/acceptance/regress/bug_492046.as
+++ test/acceptance/regress/bug_492046.as
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine.].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2005-2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Adobe AS3 Team
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+class State {
+	var next = null;
+}
+
+const depths = new Vector.<State>(2,true);
+
+function expand(depth)
+{
+	var x = new State;
+	x.next = depths[depth];
+	return(x);
+}
+
+var TITLE   = "Regression Testcase for Bug 492046: null value assigned to slot raises assertion failure";
+
+startTest();
+
+AddTestCase("null value assigned to slot should not assert", "[object State]", String(expand(1)) );
+
+test();
+
+


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261398 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/BrowserManager.as
+++ frameworks/projects/framework/src/mx/managers/BrowserManager.as
@@ -30,6 +30,11 @@
  *
  *  @see mx.managers.IBrowserManager
  *  @see mx.managers.HistoryManager
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class BrowserManager
 {
@@ -64,6 +69,11 @@
      *
      *  @return Returns the sole instance of this Singleton class;
      *  creates it if it does not already exist.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getInstance():IBrowserManager
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1269722 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/skins/halo/ApplicationBackground.as
+++ frameworks/projects/mx/src/mx/skins/halo/ApplicationBackground.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.skins.halo
 {


Implemented basic loading and material fallbacks in viewer.

--- tools/viewers/flash/src/AWDViewer.as
+++ tools/viewers/flash/src/AWDViewer.as
@@ -1,13 +1,70 @@
 package
 {
+	import away3d.containers.View3D;
+	import away3d.entities.Mesh;
+	import away3d.events.AssetEvent;
+	import away3d.events.LoaderEvent;
+	import away3d.library.assets.AssetType;
+	import away3d.loaders.Loader3D;
+	import away3d.loaders.misc.AssetLoaderContext;
+	import away3d.loaders.parsers.AWD2Parser;
+	import away3d.materials.ColorMaterial;
+	import away3d.materials.TextureMaterial;
+
 	import flash.display.Sprite;
+	import flash.events.Event;
+	import flash.net.URLRequest;

 	[SWF(width="800", height="600")]
 	public class AWDViewer extends Sprite
 	{
+		private var _view : View3D;
+		private var _loader : Loader3D;
+
 		public function AWDViewer()
 		{
+			_view = new View3D();
+			_view.antiAlias = 4;
+			_view.camera.z = -400;
+			addChild(_view);
+			addEventListener(Event.ENTER_FRAME, onEnterFrame);

+			Loader3D.enableParser(AWD2Parser);
+
+			_loader = new Loader3D(false);
+			_loader.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
+			_loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
+			_loader.load(new URLRequest('test.awd'), new AssetLoaderContext(false));
+		}
+
+
+		private function onAssetComplete(ev : AssetEvent) : void
+		{
+			if (ev.asset.assetType == AssetType.MESH) {
+				var mesh : Mesh;
+				var texMat : TextureMaterial;
+
+				mesh = Mesh(ev.asset);
+				texMat = mesh.material as TextureMaterial;
+
+				if (mesh.material == null || (texMat && texMat.texture == null))
+					mesh.material = new ColorMaterial(Math.random() * 0xffffff);
+			}
+		}
+
+
+		private function onResourceComplete(ev : LoaderEvent) : void
+		{
+			_view.scene.addChild(_loader);
+		}
+
+
+		private function onEnterFrame(ev : Event) : void
+		{
+			_view.camera.y = stage.mouseY - stage.stageHeight/2;
+			_view.camera.x = stage.mouseX - stage.stageWidth/2;
+			_view.camera.lookAt(_loader.position);
+			_view.render();
 		}
 	}
 }


Create data class for testing: ClassLevelCopyableSubclass.

error: pathspec 'dolly-framework/src/test/resources/dolly/data/ClassLevelCopyableSubclass.as' did not match any file(s) known to git

--- dolly-framework/src/test/resources/dolly/data/ClassLevelCopyableSubclass.as
+++ dolly-framework/src/test/resources/dolly/data/ClassLevelCopyableSubclass.as
@@ -0,0 +1,22 @@
+package dolly.data {
+
+[Copyable]
+public class ClassLevelCopyableSubclass extends ClassLevelCopyable {
+
+	private var _writableField2:String;
+
+	public var property4:String;
+	public var property5:String;
+
+	public function ClassLevelCopyableSubclass() {
+	}
+
+	public function get writableField2():String {
+		return _writableField2;
+	}
+
+	public function set writableField2(value:String):void {
+		_writableField2 = value;
+	}
+}
+}


Added new composite attribute presenter

Added new composite attribute presenter

error: pathspec 'collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/CompositeAttributePresenter.as' did not match any file(s) known to git

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/CompositeAttributePresenter.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/presenter/CompositeAttributePresenter.as
@@ -0,0 +1,24 @@
+package org.openforis.collect.presenter
+{
+	import mx.binding.utils.ChangeWatcher;
+
+	import org.openforis.collect.ui.component.detail.AttributeItemRenderer;
+	import org.openforis.collect.ui.component.detail.CompositeAttributeRenderer;
+	import org.openforis.collect.ui.component.input.InputField;
+
+	/**
+	 * @author S. Ricci
+	 * */
+	public class CompositeAttributePresenter extends AttributePresenter {
+
+		public function CompositeAttributePresenter(view:CompositeAttributeRenderer) {
+			var inputFields:Array = view.inputFields;
+			if(inputFields != null) {
+				for each (var f:InputField in inputFields) {
+					ChangeWatcher.watch(f, "visited", fieldVisitedHandler);
+				}
+			}
+			super(view);
+		}
+	}
+}


updating main url to "main/home"

updating main url to "main/home"

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


added classes folder

added classes folder

error: pathspec 'practice/classes/DynamicTextArea.as' did not match any file(s) known to git

--- practice/classes/DynamicTextArea.as
+++ practice/classes/DynamicTextArea.as
@@ -0,0 +1,117 @@
+/*
+
+	@Author: Karthik Rangarajan
+	@Version: 0.1
+/*
+
+This class is derived from the TextArea component to provide text boxes that resize automatically on user input, without displaying scrollbars, or hiding text.
+
+*/
+
+package classes
+{
+	import flash.events.Event;
+
+	import mx.controls.TextArea;
+	import mx.utils.NameUtil;
+
+
+	public class DynamicTextArea extends TextArea
+	{
+		private var topPadding:int;
+		private var bottomPadding:int;
+		private var h:int;
+		public var index:int;
+		public function DynamicTextArea()
+		{
+			super();
+			super.horizontalScrollPolicy = "off";
+			super.verticalScrollPolicy = "off";
+			this.addEventListener(Event.CHANGE,adjustHeightHandler);
+		}
+		private function adjustHeightHandler(event:Event):void {
+			var paddingTop:String = this.getStyle("paddingTop");
+			var paddingBottom:String= this.getStyle("paddingBottom");
+			topPadding= int(paddingTop);
+			bottomPadding= int(paddingBottom);
+			/*
+			The padding parameters are required, because text is hidden because of the padding, inspite of the text area being large enough to accomodate the entire text
+			*/
+			if(height <= textField.textHeight + textField.getLineMetrics(0).height + topPadding + bottomPadding){
+				h = topPadding+bottomPadding+textField.textHeight;
+				height = h;
+				validateNow();
+			}
+			if(height >= textField.textHeight + textField.getLineMetrics(0).height+topPadding+bottomPadding){
+				if(height>super.minHeight){
+					h = topPadding+bottomPadding+textField.textHeight;
+					height = h;
+				}
+				validateNow();
+			}
+		}
+		override public function set text(value:String):void{
+			textField.text = value;
+			validateNow();
+			var paddingTop:String = this.getStyle("paddingTop");
+			var paddingBottom:String= this.getStyle("paddingBottom");
+			topPadding= int(paddingTop);
+			bottomPadding= int(paddingBottom);
+			/*
+			Same comment above the padding in the previous function applies here as well
+			*/
+			if((textField.textHeight + topPadding + bottomPadding)>=super.minHeight){
+				height = textField.textHeight+topPadding+bottomPadding;
+			}
+			validateNow();
+		}
+
+		/*
+		Not bothering with adding padding parameters in the below function, since I make the assumption that HTML text is almost never inside the text area that I use
+		*/
+		override public function set htmlText(value:String):void{
+			textField.htmlText = value;
+			validateNow();
+			height = textField.textHeight;
+			validateNow();
+		}
+		override public function set height(value:Number):void{
+			if(textField == null){
+				if(height <= value){
+					super.height = value;
+				}
+			}
+			else{
+				var paddingTop:String = this.getStyle("paddingTop");
+				var paddingBottom:String= this.getStyle("paddingBottom");
+				topPadding= int(paddingTop);
+				bottomPadding= int(paddingBottom);
+				h = topPadding+bottomPadding+textField.textHeight+textField.getLineMetrics(0).height;
+				var currentHeight:uint = h;
+				if(currentHeight <= super.maxHeight){
+					if(textField.textHeight!= textField.getLineMetrics(0).height){
+						super.height = currentHeight;
+					}
+				}
+				else{
+					super.height = super.maxHeight;
+				}
+			}
+		}
+		override public function get text():String{
+			return textField.text;
+		}
+		override public function get htmlText():String{
+			return textField.htmlText;
+		}
+		override public function set maxHeight(value:Number):void{
+			super.maxHeight = value;
+		}
+		override public function set minHeight(value:Number):void{
+			super.minHeight = value;
+		}
+		override public function toString():String{
+			return NameUtil.displayObjectToString(this);
+		}
+	}
+}


- change: renamed Vector to Vector2D, making reprise FP10-compatible
- change: cleanup in Vector2D

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@863 bc4816be-ef27-423a-9c4d-fc420be121a2

error: pathspec 'src/reprise/geom/Vector2D.as' did not match any file(s) known to git


Don't null out the throughput timer, just reset it It's not necessary to null out the throughput timer and it could be dereferenced if the src is changed while a seek is still "in-flight". Resetting it ensures it is stopped and zeroed and it can be garbage collected along with the rest of the HTTPVideoProvider. This was causing errors in videojs-contrib-hls when the source was changed quickly after a seek was requested.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/OnCircle/vpaid-wrapper.git/'


bug 733051: add testcase for ByteArray lzma compress/uncompress  on behalf of Liping Zhao (r=dschaffe)

error: pathspec 'test/acceptance/as3/ByteArray/ByteArrayLzma.as' did not match any file(s) known to git

--- test/acceptance/as3/ByteArray/ByteArrayLzma.as
+++ test/acceptance/as3/ByteArray/ByteArrayLzma.as
@@ -0,0 +1,874 @@
+/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
+/* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
+/* ***** BEGIN LICENSE BLOCK *****
+* Version: MPL 1.1/GPL 2.0/LGPL 2.1
+*
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (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.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License.
+*
+* The Original Code is [Open Source Virtual Machine.].
+*
+* The Initial Developer of the Original Code is
+* Adobe System Incorporated.
+* Portions created by the Initial Developer are Copyright (C) 2005-2006
+* the Initial Developer. All Rights Reserved.
+*
+* Contributor(s):
+*   Adobe AS3 Team
+*
+* Alternatively, the contents of this file may be used under the terms of
+* either the GNU General Public License Version 2 or later (the "GPL"), or
+* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+* in which case the provisions of the GPL or the LGPL are applicable instead
+* of those above. If you wish to allow use of your version of this file only
+* under the terms of either the GPL or the LGPL, and not to allow others to
+* use your version of this file under the terms of the MPL, indicate your
+* decision by deleting the provisions above and replace them with the notice
+* and other provisions required by the GPL or the LGPL. If you do not delete
+* the provisions above, a recipient may use your version of this file under
+* the terms of any one of the MPL, the GPL or the LGPL.
+*
+* ***** END LICENSE BLOCK ***** */
+
+// General principles for this test suite:
+//
+//  - never write just one, write at least two (to test that position
+//    advances correctly and output is placed correctly)
+//  - ditto read
+//  - test both little and big endian for multibyte data
+//  - test both aligned and unaligned access for multibyte data
+//
+// Search for "TODO" for comments about missing tests.
+
+import flash.errors.EOFError;
+import flash.errors.IOError;
+import flash.utils.ByteArray;
+import flash.utils.CompressionAlgorithm;
+
+
+var SECTION = "ByteArrayWithLzmaTemplate";
+var VERSION = "as3";
+startTest();
+var TITLE   = "test ByteArray class with lzma";
+
+writeHeaderToLog( SECTION + " "+ TITLE );
+
+// Utility to make and pad a ByteArray
+function makeByteArray(padding=0) : ByteArray
+{
+    var bytearray:ByteArray=new ByteArray();
+    for ( var i=0 ; i < padding ; i++ )
+        bytearray.writeByte(0);
+    return bytearray;
+}
+
+// Utility to test for RangeError
+function expectRangeError(tag, thunk)
+{
+    var exn_ok = "No exn";
+    try                   { thunk(); }
+    catch (e: RangeError) { exn_ok = "OK"; }
+    catch (e)             { exn_ok = "Wrong type"; }
+    AddTestCase(tag, "OK", exn_ok);
+}
+
+// Utility to test for EOFError
+function expectEOF(tag, thunk)
+{
+    var exn_ok = "No exn";
+    try                 { thunk(); }
+    catch (e: EOFError) { exn_ok = "OK"; }
+    catch (e)           { exn_ok = "Wrong type"; }
+    AddTestCase(tag, "OK", exn_ok);
+}
+
+// Utility to test for IOError
+function expectIOError(tag, thunk)
+{
+    var exn_ok = "No exn";
+    try                { thunk(); }
+    catch (e: IOError) { exn_ok = "OK"; }
+    catch (e)          { exn_ok = "Wrong type"; }
+    AddTestCase(tag, "OK", exn_ok);
+}
+
+
+function callCompress(byteArray:ByteArray):void
+{
+    var error_status:String='no error';
+    var len:int = byteArray.length;
+    try
+    {
+        byteArray.compress(CompressionAlgorithm.LZMA);
+        byteArray.uncompress(CompressionAlgorithm.LZMA);
+
+    }
+    catch(error:Error)
+    {
+        error_status = error.message;
+    }
+    byteArray.position = len;
+    AddTestCase("expecting no exception","no error",error_status);
+    AddTestCase("Expecting length no change ",len,byteArray.length);
+}
+
+function testEmptyByteArrayWithLzma()
+{
+    var bytearray:ByteArray = new ByteArray();
+    callCompress(bytearray);
+
+}
+
+testEmptyByteArrayWithLzma();
+
+function zeroByteArrayWithLzma()
+{
+    var bytearray:ByteArray = new ByteArray();
+    bytearray.writeByte(0);
+    callCompress(bytearray);
+}
+zeroByteArrayWithLzma();
+
+function nullByteArrayWithLzma()
+{
+    var byteArray:ByteArray = null;
+    var error_status:String='no error';
+    try
+    {
+        byteArray.compress(CompressionAlgorithm.LZMA);
+        byteArray.uncompress(CompressionAlgorithm.LZMA);
+    }
+    catch(error:Error)
+    {
+        error_status ='error';
+    }
+    AddTestCase("expecting thrown exception","error",error_status);
+
+}
+
+nullByteArrayWithLzma();
+
+
+function testBooleanWithLzma()
+{
+    var bytearray:ByteArray=makeByteArray();
+    bytearray.writeBoolean(true);
+    bytearray.writeBoolean(false);
+    AddTestCase("ByteArray position after writing Booleans",
+        2,
+        bytearray.position);
+    callCompress(bytearray);
+    bytearray.position=0;
+    AddTestCase(
+        "ByteArray move position to 0",
+        0,
+        bytearray.position);
+
+    AddTestCase(
+        "ByteArray write/read boolean true",
+        true,
+        bytearray.readBoolean());
+
+    AddTestCase(
+        "ByteArray write/read boolean false",
+        false,
+        bytearray.readBoolean());
+}
+
+testBooleanWithLzma();
+
+function testShortWithLzma()
+{
+    // One endianness or the other
+    function readShort_tests1(endian, offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = endian;
+        bytearray.position=offset;
+        bytearray.writeShort(100);
+        bytearray.writeShort(-200);
+        callCompress(bytearray);
+        bytearray.position=offset;
+        AddTestCase("ByteArray readShort_1 #1 " + endian,
+            100,
+            bytearray.readShort());
+        AddTestCase( "ByteArray readShort_1 #2 " + endian,
+            -200,
+            bytearray.readShort());
+        AddTestCase("ByteArray readShort_1 #3" + endian,
+            4+offset,
+            bytearray.position);
+    }
+
+    // Mixed endianness: write with one, read with the other
+    function readShort_tests2(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = "bigEndian";
+        bytearray.position=offset;
+        bytearray.writeShort(int(0x1234));
+        bytearray.writeShort(int(0xFEDC));
+        callCompress(bytearray);
+        bytearray.position=offset;
+        bytearray.endian = "littleEndian";
+        AddTestCase("ByteArray readShort_2 #1",
+            int(0x3412),
+            bytearray.readShort());
+        AddTestCase("ByteArray readShort_2 #2",
+            int(0xFFFFDCFE),   // Sign extended
+            bytearray.readShort());
+        AddTestCase("ByteArray readShort_2 #3",
+            4+offset,
+            bytearray.position);
+    }
+
+    // EOF at various offsets and alignments
+    function readShort_tests3(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);  // use offset to create the alignment
+        bytearray.writeShort(0x1234);
+        callCompress(bytearray);
+
+        for ( var i=0 ; i < 2 ; i++ ) {
+            var v;
+            expectEOF("ByteArray readShort_3 #1 " + offset + " " + (i+1),
+                (function () {
+                    bytearray.position = offset + i + 1;
+                    v = bytearray.readShort();
+                }));
+        }
+    }
+
+    for ( var offs=0 ; offs < 4 ; offs++ ) {
+        readShort_tests1("bigEndian", offs);
+        readShort_tests1("littleEndian", offs);
+        readShort_tests2(offs);
+        readShort_tests3(offs);
+    }
+}
+
+testShortWithLzma();
+
+function testUnsignedShortWithLzma()
+{
+    // One endianness or the other
+    function readUShort_tests1(endian, offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = endian;
+        bytearray.position=offset;
+        bytearray.writeShort(100);
+        bytearray.writeShort(uint(-200) & 65535);
+        callCompress(bytearray);
+        bytearray.position=offset;
+        AddTestCase("ByteArray readUShort_1 #1 " + endian,
+            uint(100),
+            bytearray.readUnsignedShort());
+        AddTestCase("ByteArray readUShort_1 #2 " + endian,
+            uint(-200) & 65535,
+            bytearray.readUnsignedShort());
+        AddTestCase("ByteArray readUShort_1 #3" + endian,
+            4+offset,
+            bytearray.position);
+    }
+
+    // Mixed endianness: write with one, read with the other
+    function readUShort_tests2(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = "bigEndian";
+        bytearray.position=offset;
+        bytearray.writeShort(uint(0x1234));
+        bytearray.writeShort(uint(0xFEDC) & 65535);
+        callCompress(bytearray);
+        bytearray.position=offset;
+        bytearray.endian = "littleEndian";
+        AddTestCase("ByteArray readUShort_2 #1",
+            uint(0x3412),
+            bytearray.readUnsignedShort());
+        AddTestCase("ByteArray readUShort_2 #2",
+            uint(0xDCFE),
+            bytearray.readUnsignedShort());
+        AddTestCase("ByteArray readUShort_2 #3",
+            4+offset,
+            bytearray.position);
+    }
+
+    // EOF at various offsets and alignments
+    function readUShort_tests3(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);  // use offset to create the alignment
+        bytearray.writeShort(0x1234);
+        callCompress(bytearray);
+        for ( var i=0 ; i < 2 ; i++ ) {
+            var v;
+            expectEOF("ByteArray readUShort_3 #1 " + offset + " " + (i+1),
+                (function () {
+                    bytearray.position = offset + i + 1;
+                    v = bytearray.readUnsignedShort();
+                }));
+        }
+    }
+
+    for ( var offs=0 ; offs < 4 ; offs++ ) {
+        readUShort_tests1("bigEndian", offs);
+        readUShort_tests1("littleEndian", offs);
+        readUShort_tests2(offs);
+        readUShort_tests3(offs);
+    }
+}
+
+testUnsignedShortWithLzma();
+
+function testIntWithLzma()
+{
+    // One endianness or the other
+    function readInt_tests1(endian, offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = endian;
+        bytearray.position=offset;
+        bytearray.writeInt(100);
+        bytearray.writeInt(-200);
+        callCompress(bytearray);
+        bytearray.position=offset;
+        AddTestCase("ByteArray readInt_1 #1 " + endian,
+            100,
+            bytearray.readInt());
+        AddTestCase( "ByteArray readInt_1 #2 " + endian,
+            -200,
+            bytearray.readInt());
+        AddTestCase("ByteArray readInt_1 #3" + endian,
+            8+offset,
+            bytearray.position);
+    }
+
+    // Mixed endianness: write with one, read with the other
+    function readInt_tests2(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = "bigEndian";
+        bytearray.position=offset;
+        bytearray.writeInt(int(0x12345678));
+        bytearray.writeInt(int(0xFEDCBA98));
+        callCompress(bytearray);
+        bytearray.position=offset;
+        bytearray.endian = "littleEndian";
+        AddTestCase("ByteArray readInt_2 #1",
+            int(0x78563412),
+            bytearray.readInt());
+        AddTestCase("ByteArray readInt_2 #2",
+            int(0x98BADCFE),
+            bytearray.readInt());
+        AddTestCase("ByteArray readInt_2 #3",
+            8+offset,
+            bytearray.position);
+    }
+
+
+    for ( var offs=0 ; offs < 4 ; offs++ ) {
+        readInt_tests1("bigEndian", offs);
+        readInt_tests1("littleEndian", offs);
+        readInt_tests2(offs);
+    }
+}
+
+testIntWithLzma();
+
+function testUnsignedIntWithLzma()
+{
+    // One endianness or the other
+    function readUInt_tests1(endian, offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = endian;
+        bytearray.position=offset;
+        bytearray.writeUnsignedInt(100);
+        bytearray.writeUnsignedInt(uint(-200));
+        callCompress(bytearray);
+        bytearray.position=offset;
+        AddTestCase("ByteArray readUnsignedInt_1 #1 " + endian,
+            100,
+            bytearray.readUnsignedInt());
+        AddTestCase("ByteArray readUnsignedInt_1 #2 " + endian,
+            uint(-200),
+            bytearray.readUnsignedInt());
+        AddTestCase("ByteArray readUnsignedInt_1 #3" + endian,
+            8+offset,
+            bytearray.position);
+    }
+
+    // Mixed endianness: write with one, read with the other
+    function readUInt_tests2(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = "bigEndian";
+        bytearray.position=offset;
+        bytearray.writeUnsignedInt(uint(0x12345678));
+        bytearray.writeUnsignedInt(uint(0xFEDCBA98));
+        callCompress(bytearray);
+        bytearray.position=offset;
+        bytearray.endian = "littleEndian";
+        AddTestCase("ByteArray readUnsignedInt_2 #1",
+            uint(0x78563412),
+            bytearray.readUnsignedInt());
+        AddTestCase("ByteArray readUnsignedInt_2 #2",
+            uint(0x98BADCFE),
+            bytearray.readUnsignedInt());
+        AddTestCase("ByteArray readUnsignedInt_2 #3",
+            8+offset,
+            bytearray.position);
+    }
+
+
+    for ( var offs=0 ; offs < 4 ; offs++ ) {
+        readUInt_tests1("bigEndian", offs);
+        readUInt_tests1("littleEndian", offs);
+        readUInt_tests2(offs);
+    }
+}
+
+testUnsignedIntWithLzma();
+
+function testFloatWithLzma()
+{
+    // One endianness or the other
+    function readFloat_tests1(endian, offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = endian;
+        bytearray.position=offset;
+        bytearray.writeFloat(1.25);
+        bytearray.writeFloat(12345.5);
+        callCompress(bytearray);
+        AddTestCase("ByteArray writeFloat_1 #1 " + endian,
+            8+offset,
+            bytearray.position);
+        bytearray.position=offset;
+        AddTestCase("ByteArray readFloat_1 #1 " + endian,
+            1.25,
+            bytearray.readFloat());
+        AddTestCase("ByteArray readFloat_1 #2 " + endian,
+            12345.5,
+            bytearray.readFloat());
+        AddTestCase("ByteArray readFloat_1 #3" + endian,
+            8+offset,
+            bytearray.position);
+    }
+
+    // Mixed endianness: write with one, read with the other.
+    function readFloat_tests2(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        var temp:ByteArray=new ByteArray();
+
+        bytearray.endian = "bigEndian";
+        bytearray.position=offset;
+
+        bytearray.writeFloat(1.25);    // write big
+        bytearray.writeFloat(12345.5); //   endian
+        callCompress(bytearray);
+        bytearray.endian = "littleEndian";
+        bytearray.position=offset;
+
+        temp.endian = "littleEndian";
+
+        temp.writeFloat(bytearray.readFloat());  // read little endian
+        temp.writeFloat(bytearray.readFloat());  //   and write little endian
+
+        temp.position = 0;
+        temp.endian = "bigEndian";
+        AddTestCase("ByteArray readFloat_2 #1",
+            1.25,
+            temp.readFloat());           // read big endian
+        AddTestCase("ByteArray readFloat_2 #2",
+            12345.5,
+            temp.readFloat());
+    }
+
+
+    for ( var offs=0 ; offs < 4 ; offs++ ) {
+        readFloat_tests1("bigEndian", offs);
+        readFloat_tests1("littleEndian", offs);
+        readFloat_tests2(offs);
+    }
+}
+
+testFloatWithLzma();
+
+function testDoubleWithLzma()
+{
+    // One endianness or the other
+    function readDouble_tests1(endian, offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        bytearray.endian = endian;
+        bytearray.position=offset;
+        bytearray.writeDouble(1.25);
+        bytearray.writeDouble(12345.5);
+        callCompress(bytearray);
+        AddTestCase("ByteArray writeDouble_1 #1 " + endian,
+            16+offset,
+            bytearray.position);
+        bytearray.position=offset;
+        AddTestCase("ByteArray readDouble_1 #1 " + endian,
+            1.25,
+            bytearray.readDouble());
+        AddTestCase("ByteArray readDouble_1 #2 " + endian,
+            12345.5,
+            bytearray.readDouble());
+        AddTestCase("ByteArray readDouble_1 #3" + endian,
+            16+offset,
+            bytearray.position);
+    }
+
+    // Mixed endianness: write with one, read with the other.
+    function readDouble_tests2(offset)
+    {
+        var bytearray:ByteArray=makeByteArray(offset);
+        var temp:ByteArray=new ByteArray;
+
+        bytearray.endian = "bigEndian";
+        bytearray.position=offset;
+
+        bytearray.writeDouble(1.25);    // write big
+        bytearray.writeDouble(12345.5); //   endian
+        callCompress(bytearray);
+        bytearray.endian = "littleEndian";
+        bytearray.position=offset;
+
+        temp.endian = "littleEndian";
+
+        temp.writeDouble(bytearray.readDouble());  // read little endian
+        temp.writeDouble(bytearray.readDouble());  //   and write little endian
+
+        temp.position = 0;
+        temp.endian = "bigEndian";
+        AddTestCase("ByteArray readDouble_2 #1",
+            1.25,
+            temp.readDouble());           // read big endian
+        AddTestCase("ByteArray readDouble_2 #2",
+            12345.5,
+            temp.readDouble());
+    }
+
+    for ( var offs=0 ; offs < 4 ; offs++ ) {
+        readDouble_tests1("bigEndian", offs);
+        readDouble_tests1("littleEndian", offs);
+        readDouble_tests2(offs);
+
+    }
+}
+
+testDoubleWithLzma();
+
+function testByteWithLzma()
+{
+    var bytearray:ByteArray = makeByteArray();
+    bytearray.position=0;
+    bytearray.writeByte(-257);
+    bytearray.writeByte(37);
+    callCompress(bytearray);
+    AddTestCase("testByte: ByteArray position",
+        2,
+        bytearray.position);
+    AddTestCase("testByte: ByteArray length",
+        2,
+        bytearray.length);
+    bytearray.position=0;
+    AddTestCase( "ByteArray readByte",
+        -1,
+        bytearray.readByte());
+    AddTestCase( "ByteArray readByte",
+        37,
+        bytearray.readByte());
+
+    var v;
+    expectEOF("ByteArray readByte EOF",
+        (function () {
+            bytearray.position = bytearray.length;
+            v = bytearray.readByte();
+        }));
+}
+
+testByteWithLzma();
+
+function testUnsignedByteWithLzma()
+{
+    var bytearray:ByteArray = makeByteArray();
+    bytearray.position=0;
+    bytearray.writeByte(-259);
+    bytearray.writeByte(37);
+    callCompress(bytearray);
+    AddTestCase("testUnsignedByte: ByteArray position",
+        2,
+        bytearray.position);
+    AddTestCase("testUnsignedByte: ByteArray length",
+        2,
+        bytearray.length);
+    bytearray.position=0;
+    AddTestCase( "ByteArray readUnsignedByte",
+        253,
+        bytearray.readUnsignedByte());
+    AddTestCase( "ByteArray readUnsignedByte",
+        37,
+        bytearray.readUnsignedByte());
+
+    var v;
+    expectEOF("ByteArray readUnsignedByte EOF",
+        (function () {
+            bytearray.position = bytearray.length;
+            v = bytearray.readUnsignedByte();
+        }));
+}
+
+testUnsignedByteWithLzma();
+
+function testUtfWithLzma()
+{
+    var bytearray:ByteArray = makeByteArray();
+    bytearray.position=0;
+    bytearray.writeUTF("string");
+    callCompress(bytearray);
+    AddTestCase(
+        "ByteArray position of utf string",
+        8,
+        bytearray.position);
+    bytearray.position=0;
+    AddTestCase(
+        "ByteArray length of utf string",
+        8,
+        bytearray.length);
+    AddTestCase(
+        "ByteArray readUTF",
+        "string",
+        bytearray.readUTF());
+
+    // Also see the readUTFBytes case below.
+    //
+    // This is arguably a bug but it's how it currently behaves (Bugzilla 687341).
+    // readUTF will return a string consisting of the characters up to and not including
+    // the NUL, but the position will be updated as if the entire string were consumed.
+    bytearray.length = 0;
+    bytearray.position = 0;
+    bytearray.endian = "bigEndian";
+    bytearray.writeByte(0);
+    bytearray.writeByte(4);
+    bytearray.writeByte(108);
+    bytearray.writeByte(97);
+    bytearray.writeByte(0);
+    bytearray.writeByte(115);
+    callCompress(bytearray);
+    bytearray.position = 0;
+    AddTestCase("ByteArray readUTF on contents containing NUL: contents",
+        "la",
+        bytearray.readUTF());
+    AddTestCase("ByteArray readUTF on contents containing NUL: position",
+        6,
+        bytearray.position);
+
+    // Test EOF in data area
+    expectEOF("ReadUTF EOF in content",
+        (function () {
+            bytearray.length = 0;
+            bytearray.endian = "bigEndian";
+            bytearray.writeUTF("super");
+            bytearray[1] = 6; // One too much
+            bytearray.position = 0;
+            bytearray.readUTF();
+        }));
+
+    // Test EOF in length area
+    expectEOF("ReadUTF EOF in length, #1",
+        (function () {
+            bytearray.length = 0;
+            bytearray.readUTF();
+        }));
+
+    expectEOF("ReadUTF EOF in length, #2",
+        (function () {
+            bytearray.length = 0;
+            bytearray.writeByte(0);
+            bytearray.position = 0;
+            bytearray.readUTF();
+        }));
+
+    // Doc sez: A RangeError will be thrown for writeUTF if the string length exceeds 65535.
+    expectRangeError("RangeError in writeUTF",
+        (function () {
+            var s = "86868686";
+            while (s.length <= 65535)
+                s = s + s;
+            bytearray.writeUTF(s);
+        }));
+
+    // Skip UTF-8 BOM.
+    // This seems fairly ill-defined and ad-hoc since the BOM is skipped but is accounted for in the byte count,
+    // but it's what we do, so test that we continue to do it...
+    bytearray.length = 0;
+    bytearray.position = 0;
+    bytearray.endian = "bigEndian";
+    bytearray.writeByte(0);
+    bytearray.writeByte(6);
+    bytearray.writeByte(0xEF);
+    bytearray.writeByte(0xBB);
+    bytearray.writeByte(0xBF);
+    bytearray.writeUTFBytes("string");
+    callCompress(bytearray);
+    bytearray.position = 0;
+    AddTestCase("ByteArray readUTF skips UTF8 BOM after length bytes but includes it in the length",
+        "str",
+        bytearray.readUTF());
+
+    // TODO: test invalid UTF - we should still get data, in a predictable way (invalid input turns into individual bytes)
+}
+
+testUtfWithLzma();
+
+function testUtfBytesWithLzma()
+{
+    var bytearray:ByteArray = makeByteArray();
+    bytearray.position=0;
+    bytearray.writeUTFBytes("string");
+    callCompress(bytearray);
+    bytearray.position=0;
+    AddTestCase(
+        "ByteArray length of utf bytes string",
+        6,
+        bytearray.length);
+    AddTestCase(
+        "ByteArray readUTFBytes",
+        "string",
+        bytearray.readUTFBytes(6));
+
+    // Also see the readUTF case above.
+    //
+    // This is arguably a bug but it's how it currently behaves (Bugzilla 687341).
+    // readUTF will return a string consisting of the characters up to and not including
+    // the NUL, but the position will be updated as if the entire string were consumed.
+    bytearray.length = 0;
+    bytearray.position = 0;
+    bytearray.endian = "bigEndian";
+    bytearray.writeByte(108);
+    bytearray.writeByte(97);
+    bytearray.writeByte(0);
+    bytearray.writeByte(115);
+    callCompress(bytearray);
+    bytearray.position = 0;
+    AddTestCase("ByteArray readUTFBytes on contents containing NUL: contents",
+        "la",
+        bytearray.readUTFBytes(4));
+    AddTestCase("ByteArray readUTFBytes on contents containing NUL: position",
+        4,
+        bytearray.position);
+
+    // Test EOF in data area
+    expectEOF("ReadUTFBytes EOF in content",
+        (function () {
+            bytearray.length = 0;
+            bytearray.endian = "bigEndian";
+            bytearray.writeUTF("super");
+            bytearray.position = 2;
+            bytearray.readUTFBytes(6); // one too much
+        }));
+
+    // Skip UTF-8 BOM.
+    // This seems fairly ill-defined and ad-hoc since the BOM is skipped but is accounted for in the byte count,
+    // but it's what we do, so test that we continue to do it...
+    bytearray.length = 0;
+    bytearray.position = 0;
+    bytearray.endian = "bigEndian";
+    bytearray.writeByte(0xEF);
+    bytearray.writeByte(0xBB);
+    bytearray.writeByte(0xBF);
+    bytearray.writeUTFBytes("string");
+    callCompress(bytearray);
+    bytearray.position = 0;
+    AddTestCase("ByteArray readUTFBytes skips UTF8 BOM but includes it in the length",
+        "str",
+        bytearray.readUTFBytes(6));
+
+    // TODO: test invalid UTF - we should still get data, in a predictable way (invalid input turns into individual bytes)
+}
+
+testUtfBytesWithLzma();
+
+
+function testBracketSyntaxWithLzma() {
+    var bytearray:ByteArray = makeByteArray();
+    bytearray.position=0;
+    bytearray.writeByte(10);
+    bytearray.writeByte(11);
+    bytearray.writeByte(12);
+    callCompress(bytearray);
+    bytearray.position = 0;
+
+    AddTestCase(
+        "ByteArray get [] syntax",
+        12,
+        bytearray[2]);
+
+    bytearray[2]=13;
+    AddTestCase(
+        "ByteArray set [] syntax",
+        13,
+        bytearray[2]);
+
+}
+
+testBracketSyntaxWithLzma();
+
+
+function testBOMWithLzma() {
+    // compress/uncompress with BOM
+    var bytearray_compress:ByteArray = new ByteArray();
+    bytearray_compress[0]=0xef;
+    bytearray_compress[1]=0xbb;
+    bytearray_compress[2]=0xbf;
+    bytearray_compress[3]=100;
+    bytearray_compress[4]=97;
+    bytearray_compress[5]=110;
+    bytearray_compress[6]=33;
+    // original length = 7
+    var origlength=bytearray_compress.length;
+    bytearray_compress.compress("lzma");
+    // test the compressed bytearray values are all different from the original
+    var compressstate=(bytearray_compress[0]==0xef ||
+        bytearray_compress[1]==0xbb ||
+        bytearray_compress[2]==0xbf ||
+        bytearray_compress[3]==100 ||
+        bytearray_compress[4]==97);
+    // check the compressed length = 15 (small strings compress larger in zlib)
+    var compresslength=bytearray_compress.length;
+    bytearray_compress.uncompress("lzma");
+    // check the uncompress/compress length should equal original length 7
+    var restoredlength=bytearray_compress.length;
+    var restorestate=(bytearray_compress[0]==0xef &&
+        bytearray_compress[1]==0xbb &&
+        bytearray_compress[2]==0xbf &&
+        bytearray_compress[3]==100 &&
+        bytearray_compress[4]==97 &&
+        bytearray_compress[5]==110 &&
+        bytearray_compress[6]==33
+    );
+    AddTestCase("ByteArray.compress bytearray length is different",
+        origlength==compresslength,false);
+    AddTestCase("ByteArray.compress bytearray contents differ",
+        compressstate,false);
+    AddTestCase("ByteArray.uncompress bytearray length matches before compress",
+        origlength,restoredlength);
+    AddTestCase("ByteArray.uncompress uncompressing compressed string matches original",
+        restorestate,true);
+}
+
+testBOMWithLzma();
+
+
+test();


showstats

showstats

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/c0d3m0nk3y/Konata.git/'


[FragmentStream] Add com.pivotshare.hls.loader.FragmentStream

error: pathspec 'src/com/pivotshare/hls/loader/FragmentStream.as' did not match any file(s) known to git

--- src/com/pivotshare/hls/loader/FragmentStream.as
+++ src/com/pivotshare/hls/loader/FragmentStream.as
@@ -0,0 +1,380 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package com.pivotshare.hls.loader {
+
+    import flash.display.DisplayObject;
+    import flash.events.*;
+    import flash.net.*;
+    import flash.utils.ByteArray;
+    import flash.utils.getTimer;
+    import flash.utils.Timer;
+    import org.mangui.hls.constant.HLSLoaderTypes;
+    import org.mangui.hls.event.HLSError;
+    import org.mangui.hls.event.HLSEvent;
+    import org.mangui.hls.event.HLSLoadMetrics;
+    import org.mangui.hls.HLS;
+    import org.mangui.hls.model.Fragment;
+    import org.mangui.hls.model.FragmentData;
+    import org.mangui.hls.utils.AES;
+
+    CONFIG::LOGGING {
+        import org.mangui.hls.utils.Log;
+        import org.mangui.hls.utils.Hex;
+    }
+
+    /**
+     * HLS Fragment Streamer, which also handles decryption.
+     * Tries to parallel URLStream design pattern, but is incomplete.
+     *
+     * See [Reading and writing a ByteArray](http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7d54.html)
+     *
+     * @class    FragmentStream
+     * @extends  EventDispatcher
+     * @author   HGPA
+     */
+    public class FragmentStream extends EventDispatcher {
+
+        /*
+         * DisplayObject needed by AES decrypter.
+         */
+        private var _displayObject : DisplayObject;
+
+        /*
+         * Fragment being loaded.
+         */
+        private var _fragment : Fragment;
+
+        /*
+         * URLStream used to download current Fragment.
+         */
+        private var _fragmentURLStream : URLStream;
+
+        /**
+         * Create a FragmentStream.
+         *
+         * This constructor takes a reference to main DisplayObject, e.g. stage,
+         * necessary for AES decryption control.
+         *
+         * TODO: It would be more appropriate to create a factory that itself
+         * takes the DisplayObject (or a more flexible version of AES).
+         *
+         * @constructor
+         * @param  {DisplayObject}  displayObject
+         */
+        public function FragmentStream(displayObject : DisplayObject) : void {
+            _displayObject = displayObject;
+        };
+
+        /*
+         * Return FragmentData of Fragment currently being downloaded.
+         * Of immediate interest is the `bytes` field.
+         *
+         * @method getFragment
+         * @return  {Fragment}
+         */
+        public function getFragment() : Fragment {
+            return _fragment;
+        }
+
+        /*
+         * Close the stream.
+         *
+         * @method  close
+         */
+        public function close() : void {
+            if (_fragmentURLStream && _fragmentURLStream.connected) {
+                _fragmentURLStream.close();
+            }
+
+            if (_fragment) {
+
+                if (_fragment.data.decryptAES) {
+                    _fragment.data.decryptAES.cancel();
+                    _fragment.data.decryptAES = null;
+                }
+
+                // Explicitly release memory
+                // http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/ByteArray.html#clear()
+                _fragment.data.bytes.clear();
+                _fragment.data.bytes = null;
+            }
+        }
+
+        /**
+         * Load a Fragment.
+         *
+         * This class/methods DOES NOT user reference of parameter. Instead it
+         * clones the Fragment and manipulates this internally.
+         *
+         * @method  load
+         * @param   {Fragment}   fragment  -  Fragment with details (cloned)
+         * @param   {ByteArray}  key       -  Encryption Key
+         * @return  {HLSLoadMetrics}
+         */
+        public function load(fragment : Fragment, key : ByteArray) : HLSLoadMetrics {
+
+            // Clone Fragment, with new initilizations of deep fields
+            // Passing around references is what is causing problems.
+            // FragmentData is initialized as part of construction
+            _fragment = new Fragment(
+                fragment.url,
+                fragment.duration,
+                fragment.level,
+                fragment.seqnum,
+                fragment.start_time,
+                fragment.continuity,
+                fragment.program_date,
+                fragment.decrypt_url,
+                fragment.decrypt_iv, // We need this reference
+                fragment.byterange_start_offset,
+                fragment.byterange_end_offset,
+                new Vector.<String>()
+            )
+
+            _fragmentURLStream = new URLStream();
+
+            // START (LOADING) METRICS
+            // Event listener callbacks enclose _metrics
+            var _metrics : HLSLoadMetrics = new HLSLoadMetrics(HLSLoaderTypes.FRAGMENT_MAIN);
+            _metrics.level = _fragment.level;
+            _metrics.id    = _fragment.seqnum;
+            _metrics.loading_request_time = getTimer();
+
+            // String used to identify fragment in debug messages
+            CONFIG::LOGGING {
+                var fragmentString : String = "Fragment[" + _fragment.level + "][" + _fragment.seqnum + "]";
+            }
+
+            //
+            // See `onLoadProgress` first.
+            //
+
+            /*
+             * Called when Fragment is processing which may inclue decryption.
+             *
+             * To access data, call `Fragment.getFragment`, which will include
+             * all bytes loaded to this point, with FragmentData's ByteArray
+             * having the expected position
+             *
+             * NOTE: This was `FragmentLoader._fragDecryptProgressHandler` before refactor.
+             *
+             * @method  onProcess
+             * @param   {ByteArray}  data  -  *Portion* of data that finished processing
+             */
+            var onProcess : Function = function onProcess(data : ByteArray) : void {
+
+                // Ensure byte array pointer starts at beginning
+                data.position = 0;
+
+                var bytes : ByteArray = _fragment.data.bytes;
+
+                // Byte Range Business
+                // TODO: Confirm this is still working
+                if (_fragment.byterange_start_offset != -1) {
+
+                    _fragment.data.bytes.position = _fragment.data.bytes.length;
+                    _fragment.data.bytes.writeBytes(data);
+
+                    // if we have retrieved all the data, disconnect loader and notify fragment complete
+                    if (_fragment.data.bytes.length >= _fragment.byterange_end_offset) {
+                        if (_fragmentURLStream.connected) {
+                            _fragmentURLStream.close();
+                            onProcessComplete(null);
+                        }
+                    }
+                } else {
+                    // Append data to Fragment, but then reset position to mimic
+                    // expected pattern of URLStream
+                    var fragmentPosition : int = _fragment.data.bytes.position;
+                    _fragment.data.bytes.position = _fragment.data.bytes.length;
+                    _fragment.data.bytes.writeBytes(data);
+                    _fragment.data.bytes.position = fragmentPosition;
+                }
+
+                var progressEvent : ProgressEvent = new ProgressEvent(
+                    ProgressEvent.PROGRESS,
+                    false,
+                    false,
+                    _fragment.data.bytes.length, // bytesLoaded
+                    _fragment.data.bytesTotal    // bytesTotal
+                    );
+
+                dispatchEvent(progressEvent);
+            }
+
+            /*
+             * Called when Fragment has completed processing.
+             * May or may not include decryption.
+             *
+             * NOTE: This was `FragmentLoader._fragDecryptCompleteHandler`
+             * before refactor.
+             *
+             * @method  onProcessComplete
+             * @param   {ByteArray}  data  -  Portion of data finished processing
+             */
+            var onProcessComplete : Function = function onProcessComplete() : void {
+
+                // END DECRYPTION METRICS
+                // garbage collect AES decrypter
+                if (_fragment.data.decryptAES) {
+                    _metrics.decryption_end_time = getTimer();
+                    var decrypt_duration : Number = _metrics.decryption_end_time - _metrics.decryption_begin_time;
+                    CONFIG::LOGGING {
+                        Log.debug("FragmentStream#onProcessComplete: Decrypted duration/length/speed:" +
+                            decrypt_duration + "/" + _fragment.data.bytesLoaded + "/" +
+                            Math.round((8000 * _fragment.data.bytesLoaded / decrypt_duration) / 1024) + " kb/s");
+                    }
+
+                    _fragment.data.decryptAES = null;
+                }
+
+                var completeEvent : Event = new ProgressEvent(Event.COMPLETE);
+                dispatchEvent(completeEvent);
+            }
+
+            /*
+             * Called when URLStream has download a portion of the file fragment.
+             * This event callback delegates to decrypter if necessary.
+             * Eventually onProcess is called when the downloaded portion has
+             * finished processing.
+             *
+             * NOTE: Was `_fragLoadCompleteHandler` before refactor
+             *
+             * @param  {ProgressEvent}  evt  -  Portion of data finished processing
+             */
+            var onLoadProgress : Function = function onProgress(evt : ProgressEvent) : void {
+
+                // First call of onProgress for this Fragment
+                // Initilize fields in Fragment and FragmentData
+                if (_fragment.data.bytes == null) {
+
+                    _fragment.data.bytes = new ByteArray();
+                    _fragment.data.bytesLoaded = 0;
+                    _fragment.data.bytesTotal = evt.bytesTotal;
+                    _fragment.data.flushTags();
+
+                    // NOTE: This may be wrong, as it is only called after data
+                    // has been loaded.
+                    _metrics.loading_begin_time = getTimer();
+
+                    CONFIG::LOGGING {
+                        Log.debug("FragmentStream#onLoadProgress: Downloaded " +
+                            fragmentString + "'s first " + evt.bytesLoaded +
+                            " bytes of " + evt.bytesTotal + " Total");
+                    }
+
+                    // decrypt data if needed
+                    if (_fragment.decrypt_url != null) {
+                        // START DECRYPTION METRICS
+                        _metrics.decryption_begin_time = getTimer();
+                        CONFIG::LOGGING {
+                            Log.debug("FragmentStream#onLoadProgress: " + fragmentString + " needs to be decrypted");
+                        }
+
+                        _fragment.data.decryptAES = new AES(
+                            _displayObject,
+                            key,
+                            _fragment.decrypt_iv,
+                            onProcess,
+                            onProcessComplete
+                            );
+                    } else {
+                        _fragment.data.decryptAES = null;
+                    }
+                }
+
+                if (evt.bytesLoaded > _fragment.data.bytesLoaded && _fragmentURLStream.bytesAvailable > 0) {  // prevent EOF error race condition
+
+                    // bytes from URLStream
+                    var data : ByteArray = new ByteArray();
+                    _fragmentURLStream.readBytes(data);
+
+                    // Mark that bytes have been loaded, but do not store these
+                    // bytes yet
+                    _fragment.data.bytesLoaded += data.length;
+
+                    if (_fragment.data.decryptAES != null) {
+                        _fragment.data.decryptAES.append(data);
+                    } else {
+                        onProcess(data);
+                    }
+                }
+            }
+
+            /*
+             * Called when URLStream had completed downloading.
+             *
+             * @param  {Event}  evt  -  Portion of data finished processing
+             */
+            var onLoadComplete : Function = function onLoadComplete(evt : Event) : void {
+                // load complete, reset retry counter
+                //_fragRetryCount = 0;
+                //_fragRetryTimeout = 1000;
+
+                if (_fragment.data.bytes == null) {
+                    CONFIG::LOGGING {
+                        Log.warn("FragmentStream#onLoadComplete: " + fragmentString +
+                            " size is null, invalidate it and load next one");
+                    }
+                    //_levels[_hls.loadLevel].updateFragment(_fragCurrent.seqnum, false);
+                    //_loadingState = LOADING_IDLE;
+
+                    // TODO: Dispatch an error
+
+                    return;
+                }
+
+                CONFIG::LOGGING {
+                    Log.debug("FragmentStream#onLoadComplete: " + fragmentString +
+                        " has finished downloading, but may still be decrypting");
+                }
+
+                // TODO: ???
+                //_fragSkipping = false;
+
+                // END LOADING METRICS
+                _metrics.loading_end_time = getTimer();
+                _metrics.size = _fragment.data.bytesLoaded;
+                var _loading_duration : uint = _metrics.loading_end_time - _metrics.loading_request_time;
+                CONFIG::LOGGING {
+                    Log.debug("FragmentStream#onLoadComplete: Loading duration/RTT/length/speed:" +
+                        _loading_duration + "/" +
+                        (_metrics.loading_begin_time - _metrics.loading_request_time) + "/" +
+                        _metrics.size + "/" +
+                        Math.round((8000 * _metrics.size / _loading_duration) / 1024) + " kb/s");
+                }
+
+                if (_fragment.data.decryptAES) {
+                    _fragment.data.decryptAES.notifycomplete(); // Calls onProcessComplete by proxy
+                } else {
+                    onProcessComplete();
+                }
+            }
+
+            /*
+             * Called when URLStream has Errored.
+             * @param  {ErrorEvent}  evt  -  Portion of data finished processing
+             */
+            var onLoadError : Function = function onLoadError(evt : ErrorEvent) : void {
+
+                CONFIG::LOGGING {
+                    Log.error("FragmentStream#onLoadError: " + evt.text);
+                }
+
+                // Forward error
+                dispatchEvent(evt);
+            }
+
+            _fragmentURLStream.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
+            _fragmentURLStream.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onLoadError);
+            _fragmentURLStream.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
+            _fragmentURLStream.addEventListener(Event.COMPLETE, onLoadComplete);
+
+            _fragmentURLStream.load(new URLRequest(fragment.url));
+
+            return _metrics;
+        }
+
+    }
+}


fixing touch method;

fixing touch method;


添加遗漏的 ZigZag.as

添加遗漏的 ZigZag.as

error: pathspec 'as3/com/netease/protobuf/ZigZag.as' did not match any file(s) known to git

--- as3/com/netease/protobuf/ZigZag.as
+++ as3/com/netease/protobuf/ZigZag.as
@@ -0,0 +1,31 @@
+// vim: tabstop=4 shiftwidth=4
+
+// Copyright (c) 2010 , 杨博 (Yang Bo) All rights reserved.
+//
+//         pop.atry@gmail.com
+//
+// Use, modification and distribution are subject to the "New BSD License"
+// as listed at <url: http://www.opensource.org/licenses/bsd-license.php >.
+
+package com.netease.protobuf {
+	public final class ZigZag {
+		public static function encode32(n:int):int {
+			return (n << 1) ^ (n >> 31)
+		}
+		public static function decode32(n:int):int {
+			return (n >>> 1) ^ -(n & 1)
+		}
+		public static function encode64low(low:uint, high:int):uint {
+			return (low << 1) ^ (high >> 31)
+		}
+		public static function encode64high(low:uint, high:int):int {
+			return (low >>> 31) ^ (high << 1) ^ (high >> 31)
+		}
+		public static function decode64low(low:uint, high:int):uint {
+			return (high << 31) ^ (low >>> 1) ^ -(low & 1)
+		}
+		public static function decode64high(low:uint, high:int):int {
+			return (high >>> 1) ^ -(low & 1)
+		}
+	}
+}


changing the accessor type of the filter to public


Tidied up the update function.

Tidied up the update function.

fatal: unable to access 'https://github.com/c0d3m0nk3y/Konata.git/': The requested URL returned error: 403


added documentation to build-flags

added documentation to build-flags

--- core/avmfeatures.as
+++ core/avmfeatures.as
@@ -52,7 +52,7 @@
    Grammar for feature definitions.

        features           ::= "<features>" feature* at-least-one* at-most-one* exactly-one* "</features>"
-       feature            ::= "<feature>" desc name defines+ precludes* requires* "</feature>"
+       feature            ::= "<feature>" desc name defines+ precludes* requires* build-flags* "</feature>"
                             | "<tweak>" desc name default defines+ precludes* requires* "</tweak>"
        desc               ::= "<desc>" TEXT "</desc>"
        name               ::= "<name>" TEXT "</name>"
@@ -60,6 +60,7 @@
        defines            ::= "<defines>" TEXT "</defines>"
        precludes          ::= "<precludes>" TEXT "</precludes>"
        requires           ::= "<requires>" TEXT | at-most-one | at-least-one | exactly-one "</requires>"
+       build-flags        ::= <build-flags type="boolean"|"onoff"> TEXT </build-flags>
        at-least-one       ::= "<at-least-one>" name+ "</at-least-one>"
        at-most-one        ::= "<at-most-one>" name+ "</at-most-one>"
        exactly-one        ::= "<exactly-one>" name+ "</exactly-one>"
@@ -108,6 +109,15 @@
        multiple macros; this allows discrimination internally in the
        module to be organized differently than feature definition
        externally.
+
+       A BUILD-FLAGS clause in a FEATURE names a flag that will be passed
+       to the script that compiles the builtins. There are two types of
+       flags that may be passed - "boolean" and "onoff":
+           - A "boolean" flag will always be passed to the compilation script,
+           in the form "TEXT=true" (if the feature is enabled) or "TEXT=false"
+           (if the feature is disabled)
+           - An "onoff" flag will only be passed to the compilation script if
+           the feature is enabled (nothing will be passed if it is disabled)

        An AT-LEAST-ONE clause adds a constraint that at least one of
        the features has been turned on.
@@ -478,7 +488,7 @@
     <build-flags type="boolean"> -config CONFIG::VMCFG_FLOAT </build-flags>
     <build-flags type="onoff"> -abcfuture </build-flags>
     <build-flags type="onoff"> Float.as </build-flags>
-    <precludes> AVMFEATURE_AOT </precludes> <!--  -->
+    <precludes> AVMFEATURE_AOT </precludes> <!-- AOT + float doesn't work yet, byt that will change eventually -->
   </feature>

   <feature>


StatsHandler : track emergency switch down in stats

--- src/org/mangui/hls/handler/StatsHandler.as
+++ src/org/mangui/hls/handler/StatsHandler.as
@@ -28,6 +28,7 @@
             _hls.addEventListener(HLSEvent.FRAGMENT_LOADED, _fragmentLoadedHandler);
             _hls.addEventListener(HLSEvent.FRAGMENT_PLAYING,_fragmentPlayingHandler);
             _hls.addEventListener(HLSEvent.FRAGMENT_SKIPPED,_fragmentSkippedHandler);
+            _hls.addEventListener(HLSEvent.FRAGMENT_LOAD_EMERGENCY_ABORTED,_fragmentLoadEmergencyAbortedHandler);
             _hls.addEventListener(HLSEvent.FPS_DROP, _fpsDropHandler);
             _hls.addEventListener(HLSEvent.FPS_DROP_LEVEL_CAPPING, _fpsDropLevelCappingHandler);
             _hls.addEventListener(HLSEvent.FPS_DROP_SMOOTH_LEVEL_SWITCH, _fpsDropSmoothLevelSwitchHandler);
@@ -38,6 +39,7 @@
             _hls.removeEventListener(HLSEvent.FRAGMENT_LOADED, _fragmentLoadedHandler);
             _hls.removeEventListener(HLSEvent.FRAGMENT_PLAYING, _fragmentPlayingHandler);
             _hls.removeEventListener(HLSEvent.FRAGMENT_SKIPPED,_fragmentSkippedHandler);
+            _hls.removeEventListener(HLSEvent.FRAGMENT_LOAD_EMERGENCY_ABORTED,_fragmentLoadEmergencyAbortedHandler);
             _hls.removeEventListener(HLSEvent.FPS_DROP, _fpsDropHandler);
             _hls.removeEventListener(HLSEvent.FPS_DROP_LEVEL_CAPPING, _fpsDropLevelCappingHandler);
             _hls.removeEventListener(HLSEvent.FPS_DROP_SMOOTH_LEVEL_SWITCH, _fpsDropSmoothLevelSwitchHandler);
@@ -138,6 +140,14 @@
         }
       }

+      private function _fragmentLoadEmergencyAbortedHandler(event : HLSEvent) : void {
+        if(_stats.fragLoadEmergencyAborted) {
+            _stats.fragLoadEmergencyAborted++;
+        } else {
+            _stats.fragLoadEmergencyAborted = 1;
+        }
+      }
+
       private function _fpsDropHandler(event : HLSEvent) : void {
         _stats.fpsDropEvent++;
         _stats.fpsTotalDroppedFrames = _hls.stream.info.droppedFrames;


Preparing to add Test for Disjunctive Syllogism. Also some cleanup.

error: pathspec 'unittests/TestDisjunctiveSyllogism.as' did not match any file(s) known to git

--- unittests/TestDisjunctiveSyllogism.as
+++ unittests/TestDisjunctiveSyllogism.as
@@ -0,0 +1,30 @@
+package unittests
+{
+	public class TestDisjunctiveSyllogism
+	{
+		import logic.DisjunctiveSyllogism;
+		import org.flexunit.Assert;
+
+		[Before]
+		public function setUp():void
+		{
+		}
+
+		[After]
+		public function tearDown():void
+		{
+		}
+
+		[BeforeClass]
+		public static function setUpBeforeClass():void
+		{
+		}
+
+		[AfterClass]
+		public static function tearDownAfterClass():void
+		{
+		}
+
+
+	}
+}


formatting

formatting


removing old DataSource class

removing old DataSource class


adding Processes class

adding Processes class

fatal: unable to access 'https://github.com/rafaelcordoba/cocktail-demo.git/': The requested URL returned error: 403


implement test cases for DelayMethodTest

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/MerlinDS/utils.git/'


Transferred from the Adobe Open Source Subversion Repository

Revision: 17882
Author:   egeorgie@adobe.com
Date:     2010-09-27T18:53:27.336327Z

Log Message:
-----------
Add requestedMaxRowCount, requresteMaxColumnCount properties to HGroup/HorizontalLayout, VGroup/VerticalLayout

QE notes: Ready for testing
Doc notes: None.
Bugs: SDK-25364, SDK-20588
Reviewer: None.
Tests run: mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1285371 13f79535-47bb-0310-9956-ffa450edef68

fatal: unable to access 'https://github.com/shyamalschandra/flex-sdk.git/': The requested URL returned error: 403


dispatch NetMonEvent.SUB_NET_DOWN when timeout

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pubnub/flash.git/'


Add class Impetus

Add class Impetus

error: pathspec 'src/Impetus.as' did not match any file(s) known to git

--- src/Impetus.as
+++ src/Impetus.as
@@ -0,0 +1,12 @@
+package io.github.jwhile.impetus
+{
+    import flash.display.Sprite;
+    import flash.external.ExternalInterface;
+
+    public class Impetus extends Sprite
+    {
+        public function Impetus():void
+        {
+        }
+    }
+}


Add an example app

Add an example app

fatal: unable to access 'https://github.com/susisu/Twitter-for-AS3.git/': The requested URL returned error: 403


Adds get super property test case

Adds get super property test case

fatal: unable to access 'https://github.com/mbebenita/shumway.git/': The requested URL returned error: 403


the new resistor file, meant to commit before

error: pathspec 'activities/module-2/series-measuring/ComponentResistor.as' did not match any file(s) known to git

--- activities/module-2/series-measuring/ComponentResistor.as
+++ activities/module-2/series-measuring/ComponentResistor.as
@@ -0,0 +1,574 @@
+package {
+
+    import flash.display.Loader;
+    import flash.display.MovieClip;
+	import flash.display.DisplayObject;
+    import flash.display.Sprite;
+    import flash.events.Event;
+    import flash.events.MouseEvent;
+    import flash.geom.ColorTransform;
+    import flash.net.URLRequest;
+    import flash.media.Sound;
+    import flash.media.SoundChannel;
+    import flash.media.SoundTransform;
+
+	import flash.text.TextField;
+    import flash.text.TextFormat;
+    import flash.text.TextFieldAutoSize;
+
+	import Lead;
+    import org.concord.sparks.JavaScript;
+    import Globe;
+
+    // Resistor 4 band
+    public class ComponentResistor extends ComponentObj {
+
+		private var lead1:Lead_mc;
+		private var lead2:Lead_mc;
+
+        private var m_bandCount:int;
+        private var m_resistanceValue:Number = NaN;
+        private var m_pngBandSuffix:String;
+
+        private var bandOneColor:String = "blue";
+        private var bandTwoColor:String = "blue";
+        private var bandThreeColor:String = "blue";
+        private var bandFourColor:String = "blue";
+        private var bandToleranceColor:String = "blue";
+
+		private var colors:Array = null;
+
+        private var componentName:String;
+
+        //////////public variables for breadboard probeQuery_handler
+        public var blackProbeOnRight:Boolean = false;
+        public var redProbeOnRight:Boolean = false;
+        public var blackProbeOnLeft:Boolean = false;
+        public var redProbeOnLeft:Boolean = false;
+
+        private var sndClickIt:clickit3;
+        private var sndClickItChannel:SoundChannel;
+        private var transform1:SoundTransform=new SoundTransform();
+
+        private var resistorTipLeftX:Number;
+        private var resistorTipLeftY:Number;
+        private var resistorTipRightX:Number;
+        private var resistorTipRightY:Number;
+
+        private var currentHoleOne:MovieClip = null;
+        private var currentHoleTwo:MovieClip = null;
+
+        private var resistorLeftLocation:String;
+        private var resistorRightLocation:String;
+
+        //variables to hold value of resistorLeft and RightLocations for probe functions
+        //private var resistorLeftCoordinates:String;
+        //private var resistorRightCoordinates:String;
+
+        private var localProbeBlackLeftLocation:String = null;
+        private var localProbeBlackRightLocation:String = null;
+        private var localProbeRedLeftLocation:String = null;
+        private var localProbeRedRightLocation:String = null;
+
+        //KPC variables to adjust color for probe engaged and rollovers
+        private var rolloverColor:ColorTransform = new ColorTransform();
+        private var engagedColor:ColorTransform = new ColorTransform();
+        private var originalColor:ColorTransform = new ColorTransform();
+
+        private var m_bandOneLoader:Loader = null;
+        private var m_bandTwoLoader:Loader = null;
+        private var m_bandThreeLoader:Loader = null;
+        private var m_bandFourLoader:Loader = null;
+        private var m_bandToleranceLoader:Loader = null;
+
+		private var bandZoom:Boolean = true;
+		private var printColor:TextField = new TextField();
+		private var printColor1:TextField = new TextField();
+        private var format:TextFormat = new TextFormat();
+		private var format1:TextFormat = new TextFormat();
+		private var bandX:Number;
+		private var bandY:Number;
+		private var band_ScaleX:Number;
+		private var band_ScaleY:Number;
+		private var band1_ScaleY:Number;
+		private var textX:Number;
+		private var textY:Number;
+		private const textTrim:Number = 8;
+
+
+        public function ComponentResistor(bandCount:int, pngBandSuffix:String) {
+
+			lead1 = new Lead_mc();
+			lead1.x = 0;
+			lead1.y = 0;
+			this.addChild(lead1);
+
+			lead2 = new Lead_mc();
+			lead2.x = 175;
+			lead2.y = 0;
+			lead2.scaleX = -1;
+			this.addChild(lead2);
+
+			lead1.setComponentObj(this);
+			lead1.setComponentName(this.name);
+
+			lead2.setComponentObj(this);
+			lead2.setComponentName(this.name);
+
+            m_bandCount = bandCount;
+            m_pngBandSuffix = pngBandSuffix;
+
+            //testResistorTips();
+
+            this.addEventListener(Event.ADDED_TO_STAGE, added_to_stage_handler);
+            this.addEventListener(Event.REMOVED_FROM_STAGE, removed_from_stage_handler);
+            this.addEventListener(Event.ENTER_FRAME, resistorLocationInitialValues)
+
+            if (stage != null) {
+                stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+                stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
+            }
+
+			setupBandZoom();
+
+			this.getChildByName('label_mc').visible=false;
+        }
+
+		public function setLabel(labelStr:String){
+			if(labelStr != ''){
+				trace('resistorLabel is: '+labelStr);
+				var label_mc:MovieClip = MovieClip(this.getChildByName('label_mc'));
+
+				var formatLabel:TextFormat = new TextFormat();
+				formatLabel.color = 0xFAEBEB;
+				formatLabel.size = 17;
+				formatLabel.bold = true;
+				formatLabel.font = "Arial";
+
+				label_mc.labelTextField = new TextField();
+				label_mc.labelTextField.defaultTextFormat = formatLabel;
+				label_mc.labelTextField.selectable = false;
+				label_mc.labelTextField.x = 7;
+				label_mc.labelTextField.y = 3;
+				label_mc.labelTextField.text = labelStr;
+				label_mc.labelTextField.width = label_mc.labelTextField.textWidth+5;
+				label_mc.labelTextField.height = label_mc.labelTextField.textHeight+2;
+				label_mc.addChild(label_mc.labelTextField);
+
+				this.addEventListener(MouseEvent.MOUSE_OVER, labelOn);
+				this.addEventListener(MouseEvent.MOUSE_OUT, labelOff);
+			}
+		}
+
+		private function labelOn(event:MouseEvent):void {
+			this.getChildByName('label_mc').visible=true;
+		}
+		private function labelOff(event:MouseEvent):void {
+			this.getChildByName('label_mc').visible=false;
+		}
+
+		public function resistorLeadChange(info:String):void {
+			trace('RESISTOR LEAD CHANGE '+info);
+		}
+
+		public function disconnect(lead:Lead):void {
+			var resistorLocation = lead1.getLocation() + "," + lead2.getLocation();
+			trace('disconnect location '+resistorLocation);
+            JavaScript.instance().sendEvent('disconnect', 'component', this.name, lead.getLocation());
+            trace('lead.getLocation'+lead.getLocation());
+        }
+		public function connect(lead:Lead):void {
+			var resistorLocation = lead1.getLocation() + "," + lead2.getLocation();
+			trace('connect location '+resistorLocation);
+			JavaScript.instance().sendEvent('connect', 'component', this.name, lead.getLocation());
+		}
+
+
+		public function getBandZoom():Boolean {
+			return bandZoom;
+		}
+
+		public function setBandZoom(bandZoom:Boolean):void {
+			this.bandZoom = bandZoom;
+		}
+
+        public function getEnds():Array {
+            return [lead1, lead2];
+        }
+
+        private function mouseUpHandler(mevt:MouseEvent):void
+        {
+            onResistorMove_handler(mevt);
+        }
+
+        private function mouseMoveHandler(mevt:MouseEvent):void {
+        }
+
+        private function added_to_stage_handler(evt:Event):void
+        {
+            stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+            stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
+        }
+
+        private function removed_from_stage_handler(evt:Event):void
+        {
+            stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
+            stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
+        }
+
+        private function resistorLocationInitialValues(event:Event):void
+        {
+			//trace('ENTER ComponentResistor#ResistorLocationInitailValues');
+            resistorTipLeftX = this.x + (lead1.getLeadMovieClip().parent.x);
+            resistorTipLeftY = this.y + lead1.getLeadMovieClip().parent.y;
+            resistorTipRightX = this.x + (lead2.getLeadMovieClip().parent.x);
+            resistorTipRightY = this.y + lead2.getLeadMovieClip().parent.y;
+
+            resistorOnBoard();
+            //  replace 'color string' with the actual values of the resistors in ohms.
+            //componentName = ExternalInterface.call('breadModel', 'insert', 'resistor', resistorLeftLocation + ',' + resistorRightLocation, bandOneColor + ',' + bandTwoColor + ',' + bandThreeColor + ',' + bandFourColor);
+            removeEventListener(Event.ENTER_FRAME, resistorLocationInitialValues);
+        }
+
+		private function setupBandZoom():void {
+			this.getChildByName("band1").addEventListener(MouseEvent.MOUSE_OVER, zoomBand1);
+            this.getChildByName("band1").addEventListener(MouseEvent.MOUSE_OUT, unzoomBand1);
+            this.getChildByName("band2").addEventListener(MouseEvent.MOUSE_OVER, zoomBand2);
+ 	 		this.getChildByName("band2").addEventListener(MouseEvent.MOUSE_OUT, unzoomBand2);
+            this.getChildByName("band3").addEventListener(MouseEvent.MOUSE_OVER, zoomBand3);
+ 	 		this.getChildByName("band3").addEventListener(MouseEvent.MOUSE_OUT, unzoomBand3);
+            this.getChildByName("band4").addEventListener(MouseEvent.MOUSE_OVER, zoomBand4);
+ 	 		this.getChildByName("band4").addEventListener(MouseEvent.MOUSE_OUT, unzoomBand4);
+			if(this.m_bandCount == 5) {
+				this.getChildByName("band5").addEventListener(MouseEvent.MOUSE_OVER, zoomBand5);
+ 	 			this.getChildByName("band5").addEventListener(MouseEvent.MOUSE_OUT, unzoomBand5);
+			}
+
+ 	 		format.font = "Verdana";
+        	format.color = 0x2F3309;
+        	format.size = 18;
+        	format.bold = true;
+			//format1 = format;
+			format1.font = "Verdana";
+        	format1.color = 0x2F3309;
+        	format1.bold = true;
+			format1.size = 6;
+
+        	printColor.defaultTextFormat = format;
+ 			printColor.height = 40;
+			printColor.background = true;
+			printColor.backgroundColor = 0xE5DBC6;
+			printColor.selectable = false;
+			printColor1.defaultTextFormat = format1;
+ 			printColor1.height = 40;
+			printColor1.background = true;
+			printColor1.backgroundColor = 0xE5DBC6;
+			printColor1.selectable = false;
+
+			textX = -15; //-5
+			textY = -35; //-25
+
+			bandX = -3;
+			bandY = -30;
+			band_ScaleX = 1.75;
+			band1_ScaleY = 3; //2.5
+			band_ScaleY = 3;
+		}
+
+		private function zoomBand1 (event:MouseEvent):void
+		{
+			trace('zoomBand1');
+			//sendEvent('ENTER zoomBand1');
+			var band = this.getChildByName("band1");
+			band.scaleX = band_ScaleX;
+			band.scaleY = band1_ScaleY;
+			band.x +=bandX;
+			band.y +=bandY;
+
+			printColor1.x = 0;
+			printColor1.y = (-13);
+ 			printColor1.text = colors[0];
+			trace('color[0] '+colors[0]);
+			printColor1.width = printColor1.textWidth*2.2+2;
+			printColor1.height = printColor1.textHeight*1.4;
+			//printColor.height=40;
+
+			band.addChild(printColor1);
+		}
+
+		private function unzoomBand1 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band1");
+			band.scaleX = 1;
+			band.scaleY = 1;
+			band.x -=bandX;
+			band.y -=bandY;
+			band.removeChild(printColor1);
+		}
+
+		private function zoomBand2 (event:MouseEvent):void
+		{
+			trace('zoomBand2');
+			var band = this.getChildByName("band2");
+			band.scaleX = band_ScaleX;
+			band.scaleY = band_ScaleY;
+			band.x +=bandX;
+			band.y +=bandY;
+
+			printColor.x = (band.x + textX);
+			printColor.y = (band.y + textY);
+			printColor.text = colors[1];
+			printColor.width = printColor.textWidth + textTrim;
+			printColor.height = printColor.textHeight + textTrim;
+
+			this.addChild(printColor);
+
+		}
+
+		private function unzoomBand2 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band2");
+			band.scaleX = 1;
+			band.scaleY = 1;
+			band.x -=bandX;
+			band.y -=bandY;
+			this.removeChild(printColor);
+		}
+
+   		private function zoomBand3 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band3");
+			band.scaleX = band_ScaleX;
+			band.scaleY = band_ScaleY;
+			band.x +=bandX;
+			band.y +=bandY;
+
+			printColor.x = (band.x + textX);
+			printColor.y = (band.y + textY);
+			printColor.text = colors[2];
+			printColor.width = printColor.textWidth + textTrim;
+			printColor.height = printColor.textHeight + textTrim;
+
+			this.addChild(printColor);
+		}
+
+		private function unzoomBand3 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band3");
+			band.scaleX = 1;
+			band.scaleY = 1;
+			band.x -=bandX;
+			band.y -=bandY;
+			this.removeChild(printColor);
+		}
+
+		private function zoomBand4 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band4");
+			band.scaleX = band_ScaleX;
+			band.scaleY = band_ScaleY;
+			band.x +=bandX;
+			band.y +=bandY;
+
+			printColor.x = (band.x + textX);
+			printColor.y = (band.y + textY);
+			printColor.text = colors[3];
+			printColor.width = printColor.textWidth + textTrim;
+			printColor.height = printColor.textHeight + textTrim;
+
+			this.addChild(printColor);
+		}
+
+		private function unzoomBand4 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band4");
+			band.scaleX = 1;
+			band.scaleY = 1;
+			band.x -=bandX;
+			band.y -=bandY;
+			this.removeChild(printColor);
+		}
+
+		private function zoomBand5 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band5");
+			band.scaleX = band_ScaleX;
+			band.scaleY = band_ScaleY;
+			band.x +=bandX;
+			band.y +=bandY;
+
+			printColor.x = (band.x + textX);
+			printColor.y = (band.y + textY);
+			printColor.text = colors[4];
+			printColor.width = printColor.textWidth + textTrim;
+			printColor.height = printColor.textHeight + textTrim;
+
+			this.addChild(printColor);
+		}
+
+		private function unzoomBand5 (event:MouseEvent):void
+		{
+			var band = this.getChildByName("band5");
+			band.scaleX = 1;
+			band.scaleY = 1;
+			band.x -=bandX;
+			band.y -=bandY;
+			this.removeChild(printColor);
+		}
+
+
+
+
+        public function resistorOnBoard():void {
+            trace('ENTER ComponentResistor#resistorOnBoard');
+
+            if (currentHoleOne !== null) {
+                currentHoleOne.gotoAndStop(1);
+                currentHoleOne = null;
+            }
+
+            if (currentHoleTwo !== null ) {
+                currentHoleTwo.gotoAndStop(1);
+                currentHoleTwo = null;
+            }
+
+            //for every row ...
+            if (parent.parent != null && MovieClip(parent.parent).rows != null) {
+            	//trace('for every row');
+                var boardRow:String;
+                var h:MovieClip;
+
+                for (var rowNum:int = 1; rowNum <= 10; rowNum++) {
+                	//trace('rows '+rowNum);
+                    //start at left of grid
+                    //accessing the list of row by index
+                    var row:Array = MovieClip(parent.parent).rows[rowNum];
+
+                    //for every hole in the row...
+                    for (var holeNum:int = 1; holeNum <= 30; holeNum++) {
+                    	//trace('holes '+holeNum);
+                        h = row[holeNum];
+                        //trace("h.x = " + h.x + " " + "h.y = " + h.y);
+                        boardRow = String.fromCharCode("a".charCodeAt(0) + rowNum - 1);
+
+                        if (resistorTipLeftX > h.x &&  resistorTipLeftX < h.x + 12  &&  resistorTipLeftY > h.y &&  resistorTipLeftY < h.y + 12) {
+                            currentHoleOne = h;
+                            h.gotoAndStop(2);
+                            resistorLeftLocation = boardRow + holeNum;
+                            trace (this.name + " " + resistorLeftLocation + " Left On" );
+							lead1.setLocation(resistorLeftLocation); //jonah
+                            //trace("resistorTipLeftY = " + resistorTipLeftY + " h.y = " + h.y);
+                            //trace(this.name + " Row = " + boardRow + " Column = " + holeNum + " Left Side On");
+                        }
+                        else if (  (resistorTipRightX > h.x) &&  (resistorTipRightX < h.x + 12)  &&  (resistorTipRightY > h.y) &&  (resistorTipRightY < h.y + 12) ) {
+                            currentHoleTwo = h;
+                            h.gotoAndStop(2);
+                            resistorRightLocation = boardRow+holeNum;
+                            trace (this.name + " " + resistorRightLocation + " Right On" );
+							lead2.setLocation(resistorRightLocation); //jonah
+                            //trace(this.name + " Row = " + boardRow + " Column = " + holeNum + " Left Side On");
+                        }
+
+                        if (resistorLeftLocation != "empty") {
+                            //resistorLeftCoordinates = resistorLeftLocation;
+                        }
+
+                        if (resistorRightLocation != "empty") {
+                            //resistorRightCoordinates = resistorRightLocation;
+                        }
+                    }
+                }
+            }
+        }
+
+        private function onResistorMove_handler(event:MouseEvent):void
+        {
+            var newResistorTipLeftX:Number = this.x + (lead1.getLeadMovieClip().x);
+            var newResistorTipLeftY:Number = this.y + lead1.getLeadMovieClip().y;
+            var newResistorTipRightX:Number = this.x + (lead2.getLeadMovieClip().x);
+            var newResistorTipRightY:Number = this.y +lead2.getLeadMovieClip().y;
+
+            if ((newResistorTipLeftX != resistorTipLeftX) || (newResistorTipLeftY != resistorTipLeftY) )
+            {
+                resistorTipLeftX = newResistorTipLeftX;
+                resistorTipLeftY = newResistorTipLeftY;
+                resistorTipRightX = newResistorTipRightX;
+                resistorTipRightY = newResistorTipRightY;
+                this.resistorOnBoard();
+            }
+
+            else if ((newResistorTipRightX != resistorTipRightX) || (newResistorTipRightY != resistorTipRightY) )
+            {
+                resistorTipLeftX = newResistorTipLeftX;
+                resistorTipLeftY = newResistorTipLeftY;
+                resistorTipRightX = newResistorTipRightX;
+                resistorTipRightY = newResistorTipRightY;
+                this.resistorOnBoard();
+            }
+        }
+
+        public function setColorBands(colors:Array) {
+
+            const toleranceBandName:String = (m_bandCount > 4) ? "band5" : "band4";
+
+			this.colors = colors;
+
+            if (m_bandOneLoader != null)
+                Sprite(this.getChildByName("band1")).removeChild(m_bandOneLoader);
+            if (m_bandTwoLoader != null)
+                Sprite(this.getChildByName("band2")).removeChild(m_bandOneLoader);
+            if (m_bandThreeLoader != null)
+                Sprite(this.getChildByName("band3")).removeChild(m_bandOneLoader);
+            if (m_bandFourLoader != null)
+                Sprite(this.getChildByName("band4")).removeChild(m_bandOneLoader);
+            if (m_bandToleranceLoader != null)
+                Sprite(this.getChildByName(toleranceBandName)).removeChild(m_bandToleranceLoader);
+
+            //load image into Band1
+            m_bandOneLoader = new Loader();
+            Sprite(this.getChildByName("band1")).addChild(m_bandOneLoader);
+            var bandOneBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/t_" + colors[0] + ".png");
+            m_bandOneLoader.load(bandOneBitmap);
+
+            //load image into Band2
+            m_bandTwoLoader = new Loader();
+            Sprite(this.getChildByName("band2")).addChild(m_bandTwoLoader);
+            var bandTwoBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[1] + ".png");
+            m_bandTwoLoader.load(bandTwoBitmap);
+
+            //load image into Band3
+            m_bandThreeLoader = new Loader();
+            Sprite(this.getChildByName("band3")).addChild(m_bandThreeLoader);
+            var bandThreeBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[2] + ".png");
+            m_bandThreeLoader.load(bandThreeBitmap);
+
+            //load image into Band4
+            m_bandFourLoader = new Loader();
+            Sprite(this.getChildByName("band4")).addChild(m_bandFourLoader);
+            var bandFourBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[3] + ".png");
+            m_bandFourLoader.load(bandFourBitmap);
+
+            //load image into Band5
+            if (colors.length > 4) {
+              m_bandToleranceLoader = new Loader();
+              Sprite(this.getChildByName(toleranceBandName)).addChild(m_bandToleranceLoader);
+              var bandToleranceBitmap:URLRequest = new URLRequest(m_pngBandSuffix + "/s_" + colors[4] + ".png");
+              m_bandToleranceLoader.load(bandToleranceBitmap);
+            }
+        }
+
+    //NOTES
+    //enter values because resistor is smaller on screen yet program looks at true values
+    //var hotspotWidth:Number = 12;
+    //var hotspotHeight:Number = 3.4;
+    //var resistorBodyWidth:Number = 43;
+    //resistor rollover left x = .8
+    //resistor rollover left y = 7.3
+    //resistor rollover right x =
+    //hard code rollover and resistorTip values based on resistor width of 67
+    //use resistor_sm.fla for guidance - set size to desired size of resistor
+    //use testResistorTips to tweak resistorTip x and y values
+
+
+    }
+}


escapeRegExp() escape RegExp special characters in a string

error: pathspec 'src/asx/string/escapeRegExp.as' did not match any file(s) known to git

--- src/asx/string/escapeRegExp.as
+++ src/asx/string/escapeRegExp.as
@@ -0,0 +1,17 @@
+package asx.string
+{
+	/**
+	 * Escape RegExp special characters.
+	 */
+	public function escapeRegExp(value:String):String
+	{
+		return value.replace(REGEXP_SPECIAL_CHARACTERS_PATTERN, '\\$1');
+	}
+}
+
+import asx.string.substitute;
+
+internal const REGEXP_SPECIAL_CHARACTERS:Array = ('/.*+?|)_[]{}\\').split('');
+internal const REGEXP_SPECIAL_CHARACTERS_PATTERN:RegExp = new RegExp(
+	substitute('(\\\\{0})', REGEXP_SPECIAL_CHARACTERS.join('|\\\\')),
+	'g');


Let the rest of the world use the FlexWrapper - this is pulled from LayeredContainer.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@404 ed5b42cb-e716-0410-a449-f6a68f950b19

error: pathspec 'src/as/com/threerings/flex/FlexWrapper.as' did not match any file(s) known to git

--- src/as/com/threerings/flex/FlexWrapper.as
+++ src/as/com/threerings/flex/FlexWrapper.as
@@ -0,0 +1,40 @@
+//
+// $Id$
+//
+// Nenya library - tools for developing networked games
+// Copyright (C) 2002-2007 Three Rings Design, Inc., All Rights Reserved
+// http://www.threerings.net/code/nenya/
+//
+// This library is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation; either version 2.1 of the License, or
+// (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+package com.threerings.flex {
+
+import flash.display.DisplayObject;
+
+import mx.core.UIComponent;
+
+/**
+ * Wraps a non-Flex component for use in Flex.
+ */
+public class FlexWrapper extends UIComponent
+{
+    public function FlexWrapper (object :DisplayObject)
+    {
+        // don't capture mouse events in this wrapper
+        mouseEnabled = false;
+        addChild(object);
+    }
+}
+}


adding json datasource in embedder tail

adding json datasource in embedder tail

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


#6 Fixed

#6 Fixed

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/charliesolomon/playback-machine.git/'


updating totalWin prop

updating totalWin prop

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jkanchelov/VideoPoker.git/'


Refactoring:  Index::is_defined   -now scope is optional, and the default value is: "this"


Add empty utility class CopyUtil.

Add empty utility class CopyUtil.

error: pathspec 'dolly-framework/src/main/actionscript/dolly/utils/CopyUtil.as' did not match any file(s) known to git

--- dolly-framework/src/main/actionscript/dolly/utils/CopyUtil.as
+++ dolly-framework/src/main/actionscript/dolly/utils/CopyUtil.as
@@ -0,0 +1,5 @@
+package dolly.utils {
+public class CopyUtil {
+
+}
+}


Bug 733384: regression tests solely for non-index atoms (r=dschaffe).

{{mercurial 2c0bb6058ddc1cdf0397264f5febfd960a5bed36}}

CL@1061518

error: pathspec 'test/acceptance/as3/Array/regress_733384.as' did not match any file(s) known to git

--- test/acceptance/as3/Array/regress_733384.as
+++ test/acceptance/as3/Array/regress_733384.as
@@ -0,0 +1,106 @@
+/* ***** BEGIN LICENSE BLOCK *****
+* Version: MPL 1.1/GPL 2.0/LGPL 2.1
+*
+* The contents of this file are subject to the Mozilla Public License Version
+* 1.1 (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.mozilla.org/MPL/
+*
+* Software distributed under the License is distributed on an "AS IS" basis,
+* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+* for the specific language governing rights and limitations under the
+* License.
+*
+* The Original Code is [Open Source Virtual Machine.].
+*
+* The Initial Developer of the Original Code is
+* Adobe System Incorporated.
+* Portions created by the Initial Developer are Copyright (C) 2012
+* the Initial Developer. All Rights Reserved.
+*
+* Contributor(s):
+*   Adobe AS3 Team
+*
+* Alternatively, the contents of this file may be used under the terms of
+* either the GNU General Public License Version 2 or later (the "GPL"), or
+* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+* in which case the provisions of the GPL or the LGPL are applicable instead
+* of those above. If you wish to allow use of your version of this file only
+* under the terms of either the GPL or the LGPL, and not to allow others to
+* use your version of this file under the terms of the MPL, indicate your
+* decision by deleting the provisions above and replace them with the notice
+* and other provisions required by the GPL or the LGPL. If you do not delete
+* the provisions above, a recipient may use your version of this file under
+* the terms of any one of the MPL, the GPL or the LGPL.
+*
+* ***** END LICENSE BLOCK ***** */
+
+var SECTION = "regress_723461";
+var VERSION = "AS3";
+var TITLE   = "associative Array defined with [] does not show non-index elements as propertyIsEnumerable";
+var bug = "723461";
+
+startTest();
+writeHeaderToLog(SECTION + " " + TITLE);
+
+var emptyA = [];
+var denseZ = [];
+var denseO = [];
+var indexK = [];
+var sparse = [];
+var object = {};
+
+var all = [emptyA, denseZ, denseO, indexK, sparse, object];
+
+denseZ[0]    = "dense starting at zero";
+
+denseO[1]    = "dense starting at one";
+
+indexK[1000] = "array starting at thousand";
+
+sparse[1]    = "array starting at one";
+sparse[1000] = "assuredly sparse due to element at thousand";
+
+object[1000] = "object with value at thousand";
+
+for each (x in all) {
+    x["nonindex"] = "a non index in every tested object";
+}
+
+function AddCleanCase(name, object, key, expect) {
+    AddTestCase(name, expect, object.propertyIsEnumerable(key));
+}
+
+AddCleanCase("emptyA pIE on present nonindex",   emptyA, "nonindex", true);
+AddCleanCase("emptyA pIE on absent nonindex",    emptyA, "absent",  false);
+AddCleanCase("denseZ pIE on present nonindex",   denseZ, "nonindex", true);
+AddCleanCase("denseZ pIE on absent nonindex",    denseZ, "absent",  false);
+AddCleanCase("denseO pIE on present nonindex",   denseO, "nonindex", true);
+AddCleanCase("denseO pIE on absent nonindex",    denseO, "absent",  false);
+AddCleanCase("indexK pIE on present nonindex",   indexK, "nonindex", true);
+AddCleanCase("indexK pIE on absent nonindex",    indexK, "absent",  false);
+AddCleanCase("sparse pIE on present nonindex",   sparse, "nonindex", true);
+AddCleanCase("sparse pIE on absent nonindex",    sparse, "absent",  false);
+AddCleanCase("object pIE on present nonindex",   object, "nonindex", true);
+AddCleanCase("object pIE on absent nonindex",    object, "absent",  false);
+
+function AddToggleCase(name, object, key, expect) {
+    object.setPropertyIsEnumerable(key, false);
+    AddTestCase(name, expect, object.propertyIsEnumerable(key));
+}
+
+AddToggleCase("emptyA tog pIE present nonindex", emptyA, "nonindex", false);
+AddToggleCase("emptyA tog pIE absent nonindex",  emptyA, "absent",   false);
+AddToggleCase("denseZ tog pIE present nonindex", denseZ, "nonindex", false);
+AddToggleCase("denseZ tog pIE absent nonindex",  denseZ, "absent",   false);
+AddToggleCase("denseO tog pIE present nonindex", denseO, "nonindex", false);
+AddToggleCase("denseO tog pIE absent nonindex",  denseO, "absent",   false);
+AddToggleCase("indexK tog pIE present nonindex", indexK, "nonindex", false);
+
+AddToggleCase("indexK tog pIE absent nonindex",  indexK, "absent",   false);
+AddToggleCase("sparse tog pIE present nonindex", sparse, "nonindex", false);
+AddToggleCase("sparse tog pIE absent nonindex",  sparse, "absent",   false);
+AddToggleCase("object tog pIE present nonindex", object, "nonindex", false);
+AddToggleCase("object tog pIE absent nonindex",  object, "absent",   false);
+
+test();