From 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 23 Feb 2023 19:34:56 +0100 Subject: Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated) --- .../node_modules/node-forge/tests/flash/Test.as | 96 ++++++++++++++++++++++ .../node-forge/tests/flash/build-flash.xml | 7 ++ .../node_modules/node-forge/tests/flash/index.html | 27 ++++++ 3 files changed, 130 insertions(+) create mode 100644 includes/external/school/node_modules/node-forge/tests/flash/Test.as create mode 100644 includes/external/school/node_modules/node-forge/tests/flash/build-flash.xml create mode 100644 includes/external/school/node_modules/node-forge/tests/flash/index.html (limited to 'includes/external/school/node_modules/node-forge/tests/flash') diff --git a/includes/external/school/node_modules/node-forge/tests/flash/Test.as b/includes/external/school/node_modules/node-forge/tests/flash/Test.as new file mode 100644 index 0000000..7c03727 --- /dev/null +++ b/includes/external/school/node_modules/node-forge/tests/flash/Test.as @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2010 Digital Bazaar, Inc. All rights reserved. + * + * @author Dave Longley + */ +package +{ + import flash.display.Sprite; + + public class Test extends Sprite + { + import flash.events.*; + import flash.net.*; + + import flash.external.ExternalInterface; + import flash.system.Security; + + public function Test() + { + try + { + // FIXME: replace 'localhost' with cross-domain host to hit + var xhost:String = "localhost"; + Security.loadPolicyFile("xmlsocket://" + xhost + ":80"); + + var loader:URLLoader = new URLLoader(); + loader.addEventListener( + Event.COMPLETE, completeHandler); + loader.addEventListener( + Event.OPEN, openHandler); + loader.addEventListener( + ProgressEvent.PROGRESS, progressHandler); + loader.addEventListener( + SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); + loader.addEventListener( + HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); + loader.addEventListener( + IOErrorEvent.IO_ERROR, ioErrorHandler); + + var request:URLRequest = new URLRequest( + "http://" + xhost + "/index.html"); + loader.load(request); + } + catch(e:Error) + { + log("error=" + e.errorID + "," + e.name + "," + e.message); + throw e; + } + } + + private function log(obj:Object):void + { + if(obj is String) + { + var str:String = obj as String; + ExternalInterface.call("console.log", "Test", str); + } + else if(obj is Error) + { + var e:Error = obj as Error; + log("error=" + e.errorID + "," + e.name + "," + e.message); + } + } + + private function completeHandler(event:Event):void + { + var loader:URLLoader = URLLoader(event.target); + log("complete: " + loader.data); + } + + private function openHandler(event:Event):void + { + log("open: " + event); + } + + private function progressHandler(event:ProgressEvent):void + { + log("progress:" + event.bytesLoaded + " total: " + event.bytesTotal); + } + + private function securityErrorHandler(event:SecurityErrorEvent):void + { + log("securityError: " + event); + } + + private function httpStatusHandler(event:HTTPStatusEvent):void + { + log("httpStatus: " + event); + } + + private function ioErrorHandler(event:IOErrorEvent):void + { + log("ioError: " + event); + } + } +} diff --git a/includes/external/school/node_modules/node-forge/tests/flash/build-flash.xml b/includes/external/school/node_modules/node-forge/tests/flash/build-flash.xml new file mode 100644 index 0000000..f037c58 --- /dev/null +++ b/includes/external/school/node_modules/node-forge/tests/flash/build-flash.xml @@ -0,0 +1,7 @@ + + + + . + + + diff --git a/includes/external/school/node_modules/node-forge/tests/flash/index.html b/includes/external/school/node_modules/node-forge/tests/flash/index.html new file mode 100644 index 0000000..26a10b8 --- /dev/null +++ b/includes/external/school/node_modules/node-forge/tests/flash/index.html @@ -0,0 +1,27 @@ + + + + + + + + +
+

Flash Cross-Domain URLLoader Test

+
+ +
+ +
+

Could not load the flash test.

+
+ +
+ + -- cgit