Reviewed by Sam.
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Sep 2007 03:24:31 +0000 (03:24 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Sep 2007 03:24:31 +0000 (03:24 +0000)
        Re-adding a few mac specific directories that accidentally got clobbered
        during my recent layout test rearranging

        * platform/mac/editing/input: Added.
        * platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress-expected.txt: Added.
        * platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress.html: Added.
        * platform/mac/editing/input/hangul.js: Added.
        * platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline-expected.txt: Added.
        * platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline.html: Added.
        * platform/mac/editing/input/kotoeri.js: Added.
        * platform/mac/editing/input/logger.js: Added.
        * platform/mac/fast/AppleScript: Added.
        * platform/mac/fast/AppleScript/001-expected.txt: Added.
        * platform/mac/fast/AppleScript/001.html: Added.
        * platform/mac/fast/AppleScript/array-expected.txt: Added.
        * platform/mac/fast/AppleScript/array.html: Added.
        * platform/mac/fast/AppleScript/date-expected.txt: Added.
        * platform/mac/fast/AppleScript/date.html: Added.
        * platform/mac/fast/objc: Added.
        * platform/mac/fast/objc/longlongTest-expected.txt: Added.
        * platform/mac/fast/objc/longlongTest.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25436 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/hangul.js [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/kotoeri.js [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/logger.js [new file with mode: 0644]
LayoutTests/platform/mac/fast/AppleScript/001-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/AppleScript/001.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/AppleScript/array-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/AppleScript/array.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/AppleScript/date-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/AppleScript/date.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/objc/longlongTest-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/objc/longlongTest.html [new file with mode: 0644]

index 8c0e5f7598f604b598b21ad6fd50e2ffe3d97c8b..5040ae67db5de8151e3063646a3e34ef7cb3876b 100644 (file)
@@ -1,3 +1,29 @@
+2007-09-07  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Sam.
+
+        Re-adding a few mac specific directories that accidentally got clobbered
+        during my recent layout test rearranging
+
+        * platform/mac/editing/input: Added.
+        * platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress-expected.txt: Added.
+        * platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress.html: Added.
+        * platform/mac/editing/input/hangul.js: Added.
+        * platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline-expected.txt: Added.
+        * platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline.html: Added.
+        * platform/mac/editing/input/kotoeri.js: Added.
+        * platform/mac/editing/input/logger.js: Added.
+        * platform/mac/fast/AppleScript: Added.
+        * platform/mac/fast/AppleScript/001-expected.txt: Added.
+        * platform/mac/fast/AppleScript/001.html: Added.
+        * platform/mac/fast/AppleScript/array-expected.txt: Added.
+        * platform/mac/fast/AppleScript/array.html: Added.
+        * platform/mac/fast/AppleScript/date-expected.txt: Added.
+        * platform/mac/fast/AppleScript/date.html: Added.
+        * platform/mac/fast/objc: Added.
+        * platform/mac/fast/objc/longlongTest-expected.txt: Added.
+        * platform/mac/fast/objc/longlongTest.html: Added.
+
 2007-09-07  Justin Garcia  <justin.garcia@apple.com>
 
         Disabling the layout tests checked in with r25421 while I investigate
diff --git a/LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress-expected.txt b/LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress-expected.txt
new file mode 100644 (file)
index 0000000..6b2a623
--- /dev/null
@@ -0,0 +1,7 @@
+This tests that the hangul IM behaviour in which enter both confirms a composition but still sends a keypress for the <enter>.
+To test manually, switch to the 2-Set Korean IM and type at least two characters and press <enter>, if the behaviour is correct a single keypress event should be fired as the last event.
+
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keypress event
diff --git a/LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress.html b/LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress.html
new file mode 100644 (file)
index 0000000..329802f
--- /dev/null
@@ -0,0 +1,48 @@
+<div>
+    This tests that the hangul IM behaviour in which enter both confirms a composition but still sends a keypress for the &lt;enter&gt;.<br />
+    To test manually, switch to the 2-Set Korean IM and type at least two characters and press &lt;enter&gt;, if the behaviour is correct a single keypress event should be fired as the last event.
+</div>
+<input id="targetInput" onkeydown="keyDown()" onkeypress="keyPress()"></input>
+<ul id="console"></console>
+
+<script src="logger.js"></script>
+<script src="hangul.js"></script>
+<script>
+    var shouldBeCompositionEvent = false;
+    function keyDown() {
+        if (!window.layoutTestController) {
+            log("keydown : keyCode == " + event.keyCode);
+            return;
+        }
+        if (shouldBeCompositionEvent && event.keyCode != 229)
+            log("FAILURE: received keyCode " + event.keyCode + " in a keydown when VK_PROCESSKEY is expected");
+        else if (!shouldBeCompositionEvent && event.keyCode == 229)
+            log("FAILURE: received a keyDown with VK_PROCESSKEY as the keyCode, when an actual key code was expected.");
+        else
+            log("Received valid keydown event");
+    }
+    
+    function keyPress() {
+        if (!window.layoutTestController) {
+            log("keypress : keyCode == " + event.keyCode);
+            return;
+        }
+        if (shouldBeCompositionEvent)
+            log("FAILURE: received keypress event during composition");
+        else
+            log("Received valid keypress event");
+    }
+
+
+    var targetInput = document.getElementById('targetInput');
+    targetInput.focus();
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        textInputController.setInputMethodHandler(hangul);
+        shouldBeCompositionEvent = true;
+        eventSender.keyDown('t');
+        eventSender.keyDown('o');
+        shouldBeCompositionEvent = false;
+        eventSender.keyDown('\n');
+    }
+</script> 
diff --git a/LayoutTests/platform/mac/editing/input/hangul.js b/LayoutTests/platform/mac/editing/input/hangul.js
new file mode 100644 (file)
index 0000000..b3d584d
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Pseudo hangul-IM, only one character is marked at a time, 
+ * enter confirms the composition, but is passed on to the app to handle as a keypress
+ */
+var hangulState = { "compositionString": null };
+function hangul(event){
+    if (event.characters[0] == '\n') {
+        if (hangulState.compositionString != null) 
+            textInputController.insertText(hangulState.compositionString);
+        hangulState.compositionString  = null;
+        textInputController.doCommand("insertNewline:");
+        return true;
+    }        
+        
+    if (hangulState.compositionString != null)
+        textInputController.insertText(hangulState.compositionString);
+        
+    hangulState.compositionString = event.characters;
+    var markedText = textInputController.makeAttributedString(hangulState.compositionString);
+    markedText.addAttribute("NSUnderline", 1);
+    textInputController.setMarkedText(markedText, markedText.length, 0);
+    return true;
+}
diff --git a/LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline-expected.txt b/LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline-expected.txt
new file mode 100644 (file)
index 0000000..714595c
--- /dev/null
@@ -0,0 +1,17 @@
+This tests a subset of pseudo-kotoeri behaviour:
+All keydown events never result in keypress during composition
+During composition all keydown events should have keyCode 229, this is necessary to match the behaviour of windows browsers, including WebKit/Win
+To test this manually switch to the Kotoeri/Hiragana input method, and type 'toukyou'<enter><enter>.
+You should see only a single keypress event, as the very last reported event.
+
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keydown event
+Received valid keypress event
+PASSED: Successfully typed 'toukyou'
diff --git a/LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline.html b/LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline.html
new file mode 100644 (file)
index 0000000..4303086
--- /dev/null
@@ -0,0 +1,62 @@
+<div>
+    This tests a subset of pseudo-kotoeri behaviour:
+    <ul>
+        <li>All keydown events never result in keypress during composition</li>
+        <li>During composition all keydown events should have keyCode 229, this is necessary to match the behaviour of windows browsers, including WebKit/Win</li>
+    </ul>
+    To test this manually switch to the Kotoeri/Hiragana input method, and type 'toukyou'&lt;enter&gt;&lt;enter&gt;.<br />
+    You should see only a single keypress event, as the very last reported event.
+</div>
+<input id="targetInput" onkeydown="keyDown()" onkeypress="keyPress()">
+<ul id="console"></console>
+
+<script src="logger.js"></script>
+<script src="kotoeri.js"></script>
+<script>
+    var shouldBeCompositionEvent = false;
+    function keyDown() {
+        if (!window.layoutTestController) {
+            log("keydown : keyCode == " + event.keyCode);
+            return;
+        }
+        if (shouldBeCompositionEvent && event.keyCode != 229)
+            log("FAILURE: received keyCode " + event.keyCode + " in a keydown when VK_PROCESSKEY is expected");
+        else if (!shouldBeCompositionEvent && event.keyCode == 229)
+            log("FAILURE: received a keyDown with VK_PROCESSKEY as the keyCode, when an actual key code was expected.");
+        else
+            log("Received valid keydown event");
+    }
+    
+    function keyPress() {
+        if (!window.layoutTestController) {
+            log("keypress : keyCode == " + event.keyCode);
+            return;
+        }
+        if (shouldBeCompositionEvent)
+            log("FAILURE: received keypress event during composition");
+        else
+            log("Received valid keypress event");
+    }
+    
+    var targetInput = document.getElementById('targetInput');
+    targetInput.focus();
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        textInputController.setInputMethodHandler(kotoeri);
+        shouldBeCompositionEvent = true;
+        eventSender.keyDown('t');
+        eventSender.keyDown('o');
+        eventSender.keyDown('u');
+        eventSender.keyDown('k');
+        eventSender.keyDown('y');
+        eventSender.keyDown('o');
+        eventSender.keyDown('u');
+        eventSender.keyDown('\n');
+        shouldBeCompositionEvent = false;
+        eventSender.keyDown('\n');
+        if (targetInput.value != "toukyou")
+            log("FAILED: Input field should countain the text 'toukyou'");
+        else
+            log("PASSED: Successfully typed 'toukyou'");
+    }
+</script> 
diff --git a/LayoutTests/platform/mac/editing/input/kotoeri.js b/LayoutTests/platform/mac/editing/input/kotoeri.js
new file mode 100644 (file)
index 0000000..19d4971
--- /dev/null
@@ -0,0 +1,20 @@
+var kotoeriState = { "compositionString": null };
+function kotoeri(event){
+    if (event.characters[0] == '\n') {
+        if (kotoeriState.compositionString == null) {
+            textInputController.doCommand("insertNewline:");
+            return true;
+        }
+        textInputController.insertText(kotoeriState.compositionString);
+        kotoeriState.compositionString = null;
+        return true;
+    }        
+        
+    if (kotoeriState.compositionString == null) 
+         kotoeriState.compositionString = "";
+    kotoeriState.compositionString += event.characters;
+    var markedText = textInputController.makeAttributedString(kotoeriState.compositionString);
+    markedText.addAttribute("NSUnderline", 2);
+    textInputController.setMarkedText(markedText, markedText.length, 0);
+    return true;
+}
diff --git a/LayoutTests/platform/mac/editing/input/logger.js b/LayoutTests/platform/mac/editing/input/logger.js
new file mode 100644 (file)
index 0000000..6101625
--- /dev/null
@@ -0,0 +1,6 @@
+function log(msg) {
+   var console = document.getElementById("console");
+   var li = document.createElement("li");
+   li.appendChild(document.createTextNode(msg));
+   console.appendChild(li);
+}
diff --git a/LayoutTests/platform/mac/fast/AppleScript/001-expected.txt b/LayoutTests/platform/mac/fast/AppleScript/001-expected.txt
new file mode 100644 (file)
index 0000000..1a94f1f
--- /dev/null
@@ -0,0 +1,19 @@
+CONSOLE MESSAGE: line 1: TypeError: Value undefined (result of expression document.lalala) is not object.
+An automated test for basic AppleScript "do JavaScript" support.
+4 ('long')
+4 ('long')
+0.6666666666666666 ('doub')
+0.6666666666666666 ('doub')
+INF ('doub')
+-INF ('doub')
+false ('bool')
+false ('bool')
+"a string" ('utxt')
+"a string" ('utxt')
+"An automated test for basic AppleScript "do JavaScript" support." ('utxt')
+"An automated test for basic AppleScript "do JavaScript" support." ('utxt')
+"[object HTMLDocument]" ('utxt')
+"do JavaScript - converting to AppleScript types" ('utxt')
+'msng' ('type')
+(null)
+"[object Object]" ('utxt')
diff --git a/LayoutTests/platform/mac/fast/AppleScript/001.html b/LayoutTests/platform/mac/fast/AppleScript/001.html
new file mode 100644 (file)
index 0000000..2c1917f
--- /dev/null
@@ -0,0 +1,55 @@
+<html>
+<head>
+<title>do JavaScript - converting to AppleScript types</title>
+</head>
+<body>
+An automated test for basic AppleScript "do JavaScript" support.
+<script type="text/javascript">
+
+    var console_messages = document.createElement("ol");
+    
+    function log(message)
+    {
+        var item = document.createElement("li");
+        item.appendChild(document.createTextNode(message));
+        console_messages.appendChild(item);
+    }
+    if (window.layoutTestController) {
+        
+        try {
+        
+            layoutTestController.dumpAsText();
+            document.execCommand("SelectAll");
+            
+            log(appleScriptController.doJavaScript("2*2;"));
+            log(appleScriptController.doJavaScript("new Number(2*2);"));
+            log(appleScriptController.doJavaScript("2/3;"));
+            log(appleScriptController.doJavaScript("new Number(2/3);"));
+            log(appleScriptController.doJavaScript("2/0;"));
+            log(appleScriptController.doJavaScript("new Number(-2/0);"));
+            log(appleScriptController.doJavaScript("1!=1"));
+            log(appleScriptController.doJavaScript("new Boolean"));
+            log(appleScriptController.doJavaScript("'a string'"));
+            log(appleScriptController.doJavaScript("new String('a string')"));
+            log(appleScriptController.doJavaScript("window.getSelection()"));
+            log(appleScriptController.doJavaScript("window.getSelection() + \"\""));
+            log(appleScriptController.doJavaScript("document"));
+            log(appleScriptController.doJavaScript("document.title"));
+            log(appleScriptController.doJavaScript("document.lalala"));
+            log(appleScriptController.doJavaScript("document.lalala()")); // ideally, should pass the error to AppleScript
+            log(appleScriptController.doJavaScript("function Polygon() {this.edges = 8;} new Polygon;"));
+            
+        } catch (ex) {
+            log("Exception: " + ex.description);
+        }
+
+        var console = document.createElement("p");
+        console.appendChild(console_messages);
+        document.body.appendChild(console);
+        
+    } else {
+        document.write("(cannot run interactively)");
+    }
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/AppleScript/array-expected.txt b/LayoutTests/platform/mac/fast/AppleScript/array-expected.txt
new file mode 100644 (file)
index 0000000..f615e0b
--- /dev/null
@@ -0,0 +1,3 @@
+(1, 2, "three") ('list')
+('msng', 'msng', 2) ('list')
+(0, "0,") ('list')
diff --git a/LayoutTests/platform/mac/fast/AppleScript/array.html b/LayoutTests/platform/mac/fast/AppleScript/array.html
new file mode 100644 (file)
index 0000000..db9f70f
--- /dev/null
@@ -0,0 +1,42 @@
+<html>
+<head>
+<title>do JavaScript - converting JavaScript arrays to AppleScript</title>
+</head>
+<body>
+<script type="text/javascript">
+
+    var console_messages = document.createElement("ol");
+    
+    function log(message)
+    {
+        var item = document.createElement("li");
+        item.appendChild(document.createTextNode(message));
+        console_messages.appendChild(item);
+    }
+    if (window.layoutTestController) {
+        
+        try {
+        
+            layoutTestController.dumpAsText();
+            
+            log(appleScriptController.doJavaScript("new Array(1, 2, 'three');"));
+            log(appleScriptController.doJavaScript("arr = new Array; arr['a'] = 'a'; arr[2] = 2; arr;"));
+            log(appleScriptController.doJavaScript("arr = new Array; arr[0] = 0; arr[1] = arr; arr;"));
+
+// This takes ~10 seconds on my G4/1.25
+//            log(appleScriptController.doJavaScript("arr = new Array; arr[1] = 1; arr[10001] = 10001; arr;"));
+            
+        } catch (ex) {
+            log("Exception: " + ex.description);
+        }
+
+        var console = document.createElement("p");
+        console.appendChild(console_messages);
+        document.body.appendChild(console);
+        
+    } else {
+        document.write("(cannot run interactively)");
+    }
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/AppleScript/date-expected.txt b/LayoutTests/platform/mac/fast/AppleScript/date-expected.txt
new file mode 100644 (file)
index 0000000..9bdf5bd
--- /dev/null
@@ -0,0 +1,8 @@
+00000000C00D6BE5 ('ldt ')
+000000007C4E8F00 ('ldt ')
+000000007C25DAB0 ('ldt ')
+00000001383EC400 ('ldt ')
+0000000056871300 ('ldt ')
+0000000000000000 ('ldt ')
+FFFFFFFF3C637000 ('ldt ')
+"Invalid Date" ('utxt')
diff --git a/LayoutTests/platform/mac/fast/AppleScript/date.html b/LayoutTests/platform/mac/fast/AppleScript/date.html
new file mode 100644 (file)
index 0000000..42b381e
--- /dev/null
@@ -0,0 +1,59 @@
+<html>
+<head>
+<title>do JavaScript - converting to AppleScript date type</title>
+</head>
+<body>
+<script type="text/javascript">
+
+    var console_messages = document.createElement("ol");
+    
+    function log(message)
+    {
+        var item = document.createElement("li");
+        item.appendChild(document.createTextNode(message));
+        console_messages.appendChild(item);
+    }
+    if (window.layoutTestController) {
+        
+        try {
+        
+            layoutTestController.dumpAsText();
+
+            // 0xc00d6be5 == Mon Feb 06 2006 21:11:01
+            log(appleScriptController.doJavaScript("new Date(2006,1,6,21,11,1)"));
+
+            // 0x7c4e8f00 == Sun Feb 01 1970 00:00:00
+            log(appleScriptController.doJavaScript("new Date(1970,1,1)"));
+             
+            // 0x7c25dab0 == Thu Jan 01 1970 03:00:00
+            log(appleScriptController.doJavaScript("new Date(1970,0,1,3)"));
+
+            // 0x1383ec400 == Wed Jan 01 2070 00:00:00
+            log(appleScriptController.doJavaScript("new Date(2070,0,1)"));
+            
+            // 0x56871300 == Sun Jan 01 1950 00:00:00
+            log(appleScriptController.doJavaScript("new Date(1950,0,1)"));
+            
+            // 0x00000000 == Fri Jan 01 1904 00:00:00
+            log(appleScriptController.doJavaScript("new Date(1904,0,1)"));
+            
+            // 0xffffffff3c637000 == Wed Jan 01 1800 00:00:00
+            log(appleScriptController.doJavaScript("new Date(1800,0,1)"));
+
+            // invalid date 
+            log(appleScriptController.doJavaScript("new Date(1e40)"));
+
+        } catch (ex) {
+            log("Exception: " + ex.description);
+        }
+
+        var console = document.createElement("p");
+        console.appendChild(console_messages);
+        document.body.appendChild(console);
+        
+    } else {
+        document.write("(cannot run interactively)");
+    }
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/objc/longlongTest-expected.txt b/LayoutTests/platform/mac/fast/objc/longlongTest-expected.txt
new file mode 100644 (file)
index 0000000..07ead58
--- /dev/null
@@ -0,0 +1,11 @@
+PASS Test LongLong: result is 0 as expected!
+PASS Test LongLong: result is 1 as expected!
+PASS Test LongLong: result is -1 as expected!
+PASS Test LongLong: result is -9223372036854776000 as expected!
+PASS Test LongLong: result is -9223372036854776000 as expected!
+PASS Test UnsignedLongLong: result is 0 as expected!
+PASS Test UnsignedLongLong: result is 1 as expected!
+PASS Test UnsignedLongLong: result is 18446744073709552000 as expected!
+PASS Test UnsignedLongLong: result is 9223372036854776000 as expected!
+PASS Test UnsignedLongLong: result is 9223372036854776000 as expected!
+
diff --git a/LayoutTests/platform/mac/fast/objc/longlongTest.html b/LayoutTests/platform/mac/fast/objc/longlongTest.html
new file mode 100644 (file)
index 0000000..876dac6
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <script type="text/javascript" charset="utf-8">
+            function log(msg)
+            {
+                document.getElementById('console').innerHTML += msg + "\n"
+            }
+
+            function testLongLong(num, expected)
+            {
+                var result = layoutTestController.objCLongLongRoundTrip(num);
+                if (result == expected)
+                    log("PASS Test LongLong: result is " + result + " as expected!");
+                else
+                    log("FAIL Test LongLong: result is " + result + ", should be " + expected);
+            }
+
+            function testUnsignedLongLong(num, expected)
+            {
+                var result = layoutTestController.objCUnsignedLongLongRoundTrip(num);
+                if (result == expected)
+                    log("PASS Test UnsignedLongLong: result is " + result + " as expected!");
+                else
+                    log("FAIL Test UnsignedLongLong: result is " + result + ", should be " + expected);
+            }
+
+            function test()
+            {
+                if (!window.layoutTestController) {
+                    log("This test can only be run under DumpRenderTree.");
+                    return;
+                }
+
+                layoutTestController.dumpAsText();
+    
+                testLongLong(0, 0);
+                testLongLong(1, 1);
+                testLongLong(-1, -1);
+                testLongLong(9223372036854776001, -9223372036854776000);
+                testLongLong(-9223372036854776001, -9223372036854776000);
+
+                testUnsignedLongLong(0, 0);
+                testUnsignedLongLong(1, 1);
+                testUnsignedLongLong(-1, 18446744073709552000);
+                testUnsignedLongLong(9223372036854776001, 9223372036854776000);
+                testUnsignedLongLong(-9223372036854776001, 9223372036854776000);
+
+            }
+        </script>
+    </head>
+    <body onload="test();">
+        <pre id="console"></pre>
+    </body>
+</html>