LayoutTests:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Jun 2006 17:54:35 +0000 (17:54 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Jun 2006 17:54:35 +0000 (17:54 +0000)
        Reviewed by ggaren.

        - test and results for http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
          DumpRenderTree should be able to keep URL history during runs

        * fast/history/clicked-link-is-visited-expected.checksum: Added.
        * fast/history/clicked-link-is-visited-expected.png: Added.
        * fast/history/clicked-link-is-visited-expected.txt: Added.
        * fast/history/clicked-link-is-visited.html: Added.
        * fast/history/resources/clicked-link-is-visited-2.html: Added.

WebCore:

        Reviewed by ggaren.

        - Update a manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
          DumpRenderTree should be able to keep URL history during runs

        * manual-tests/redraw-page-cache-visited-links.html: Added note about window.history hack.
        Fixed coordinates for mouse events.  Added call to keepWebHistory().
        * manual-tests/resources/redraw-page-cache-visited-links-2.html: Added note about
        window.history hack.

WebKitTools:

        Reviewed by ggaren.

        - http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
          DumpRenderTree should be able to keep URL history during runs

        Test: LayoutTests/fast/history/clicked-link-is-visited.html

        * DumpRenderTree/DumpRenderTree.m: Add keepWebHistory function to layoutTestController
        (+[LayoutTestController isSelectorExcludedFromWebScript:]): Updated for keepWebHistory.
        (-[LayoutTestController keepWebHistory]): Added.  We only set optional shared history if
        it is currently nil since keepWebHistory() might be called more than once incidentally
        for the same test.
        (dumpRenderTree): Set optional shared history in WebHistory to nil by default.
        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Xcode 2.3 clean up.

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

12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/history/clicked-link-is-visited-expected.checksum [new file with mode: 0644]
LayoutTests/fast/history/clicked-link-is-visited-expected.png [new file with mode: 0644]
LayoutTests/fast/history/clicked-link-is-visited-expected.txt [new file with mode: 0644]
LayoutTests/fast/history/clicked-link-is-visited.html [new file with mode: 0644]
LayoutTests/fast/history/resources/clicked-link-is-visited-2.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/manual-tests/redraw-page-cache-visited-links.html
WebCore/manual-tests/resources/redraw-page-cache-visited-links-2.html
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m
WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

index 56bc6b0cc2077546d6de3999142e8590803c5adf..a8aa8c82a04ba0517523072a6be9d8a6ed594a86 100644 (file)
@@ -1,3 +1,16 @@
+2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
+
+        Reviewed by ggaren.
+
+        - test and results for http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
+          DumpRenderTree should be able to keep URL history during runs
+
+        * fast/history/clicked-link-is-visited-expected.checksum: Added.
+        * fast/history/clicked-link-is-visited-expected.png: Added.
+        * fast/history/clicked-link-is-visited-expected.txt: Added.
+        * fast/history/clicked-link-is-visited.html: Added.
+        * fast/history/resources/clicked-link-is-visited-2.html: Added.
+
 2006-06-17  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by ggaren.
diff --git a/LayoutTests/fast/history/clicked-link-is-visited-expected.checksum b/LayoutTests/fast/history/clicked-link-is-visited-expected.checksum
new file mode 100644 (file)
index 0000000..eef288e
--- /dev/null
@@ -0,0 +1,2 @@
+c2ae2a80cd374fe47b2e25533cdb4730
+\ No newline at end of file
diff --git a/LayoutTests/fast/history/clicked-link-is-visited-expected.png b/LayoutTests/fast/history/clicked-link-is-visited-expected.png
new file mode 100644 (file)
index 0000000..cd94d54
Binary files /dev/null and b/LayoutTests/fast/history/clicked-link-is-visited-expected.png differ
diff --git a/LayoutTests/fast/history/clicked-link-is-visited-expected.txt b/LayoutTests/fast/history/clicked-link-is-visited-expected.txt
new file mode 100644 (file)
index 0000000..b0a3cfe
--- /dev/null
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x18
+        RenderInline {A} at (0,0) size 487x18 [color=#0000EE]
+          RenderText {#text} at (0,0) size 487x18
+            text run at (0,0) width 487: "Bug 9150 DumpRenderTree should be able to keep URL history during runs"
+      RenderBlock {DIV} at (0,18) size 784x18
+        RenderText {#text} at (0,0) size 117x18
+          text run at (0,0) width 117: "The tests passes if "
+        RenderInline {A} at (0,0) size 50x18 [color=#551A8B]
+          RenderText {#text} at (117,0) size 50x18
+            text run at (117,0) width 50: "this link"
+        RenderText {#text} at (167,0) size 185x18
+          text run at (167,0) width 185: " is rendered in a visited color."
diff --git a/LayoutTests/fast/history/clicked-link-is-visited.html b/LayoutTests/fast/history/clicked-link-is-visited.html
new file mode 100644 (file)
index 0000000..d359b14
--- /dev/null
@@ -0,0 +1,21 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.waitUntilDone();
+    layoutTestController.keepWebHistory();
+}
+function runTest() {
+    if (window.eventSender) {
+        eventSender.mouseMoveTo(110, 35);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+</script>
+</head>
+<body onload="runTest();">
+<div><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9150">Bug 9150 DumpRenderTree should be able to keep URL history during runs</a></div>
+<div>To run the test <a href="./resources/clicked-link-is-visited-2.html">click this link</a>.</div>
+</body>
+</html>
diff --git a/LayoutTests/fast/history/resources/clicked-link-is-visited-2.html b/LayoutTests/fast/history/resources/clicked-link-is-visited-2.html
new file mode 100644 (file)
index 0000000..cc3666b
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script>
+function runTest() {
+    if (window.layoutTestController) {
+        layoutTestController.notifyDone();
+    }
+}
+</script>
+</head>
+<body onload="runTest();">
+<div><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9150">Bug 9150 DumpRenderTree should be able to keep URL history during runs</a></div>
+<div>The tests passes if <a href="./clicked-link-is-visited-2.html">this link</a> is rendered in a visited color.</div>
+</body>
+</html>
index 3c24613e68c91137e6ad4af8d3211ab2166b1152..458f30b26eaa4c0ee4ba1d0959e31e39c72e822d 100644 (file)
@@ -1,3 +1,15 @@
+2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
+
+        Reviewed by ggaren.
+
+        - Update a manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
+          DumpRenderTree should be able to keep URL history during runs
+
+        * manual-tests/redraw-page-cache-visited-links.html: Added note about window.history hack.
+        Fixed coordinates for mouse events.  Added call to keepWebHistory().
+        * manual-tests/resources/redraw-page-cache-visited-links-2.html: Added note about
+        window.history hack.
+
 2006-06-17  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Geoff.
index 41ccbade63c3c4f705aa0b6abf2c56172784c473..26bc64e2f2208c2538880b8a961d308a508d395a 100644 (file)
@@ -4,12 +4,14 @@
 // Uncomment to make this an automated test
 //if (window.layoutTestController) {
 //    layoutTestController.waitUntilDone();
+//    layoutTestController.keepWebHistory();
 //}
 function runTest() {
 // Uncomment to make this an automated test
+//    // Uses window.history hack; see http://bugzilla.opendarwin.org/show_bug.cgi?id=7135
 //    if (!window.history[99999]) {
 //        if (window.eventSender) {
-//            eventSender.mouseMoveTo(55, 120);
+//            eventSender.mouseMoveTo(115, 70);
 //            eventSender.mouseDown();
 //            eventSender.mouseUp();
 //        }
index 7e6664b0cb418b59d326ff7b8135e64750192984..61d25c2e087d46e7dbba0e0ddfa99621d188ddbe 100644 (file)
@@ -3,6 +3,7 @@
 <script>
 function runTest() {
 // Uncomment to make this an automated test
+//    // Uses window.history hack; see http://bugzilla.opendarwin.org/show_bug.cgi?id=7135
 //    window.history[99999] = 1;
 //    window.history.back();
 }
index ab5287b2ce0d4e56cf9a5181f5ae8e811c84dae1..abb87a545babb471041b26425684dde877ce732c 100644 (file)
@@ -1,3 +1,20 @@
+2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
+
+        Reviewed by ggaren.
+
+        - http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
+          DumpRenderTree should be able to keep URL history during runs
+
+        Test: LayoutTests/fast/history/clicked-link-is-visited.html
+
+        * DumpRenderTree/DumpRenderTree.m: Add keepWebHistory function to layoutTestController
+        (+[LayoutTestController isSelectorExcludedFromWebScript:]): Updated for keepWebHistory.
+        (-[LayoutTestController keepWebHistory]): Added.  We only set optional shared history if
+        it is currently nil since keepWebHistory() might be called more than once incidentally
+        for the same test.
+        (dumpRenderTree): Set optional shared history in WebHistory to nil by default.
+        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Xcode 2.3 clean up.
+
 2006-06-11  David Kilzer  <ddkilzer@kilzer.net>
 
         Reviewed by darin.
index 1c6ca074d95b27f8d3160f2663e0d7e80f67090c..dd7ce717ca7bd45674ec4592e8cbb9380799f476 100644 (file)
@@ -35,6 +35,7 @@
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebEditingDelegate.h>
 #import <WebKit/WebFrameView.h>
+#import <WebKit/WebHistory.h>
 #import <WebKit/WebPreferences.h>
 #import <WebKit/WebView.h>
 #import <WebKit/WebHTMLViewPrivate.h>
@@ -598,7 +599,8 @@ static void dump(void)
             || aSelector == @selector(display)
             || aSelector == @selector(testRepaint)
             || aSelector == @selector(repaintSweepHorizontally)
-            || aSelector == @selector(clearBackForwardList))
+            || aSelector == @selector(clearBackForwardList)
+            || aSelector == @selector(keepWebHistory))
         return NO;
     return YES;
 }
@@ -627,6 +629,12 @@ static void dump(void)
     [item release];
 }
 
+- (void)keepWebHistory
+{
+    if (![WebHistory optionalSharedHistory])
+        [WebHistory setOptionalSharedHistory:[[WebHistory alloc] init]];
+}
+
 - (void)waitUntilDone 
 {
     waitToDump = YES;
@@ -730,6 +738,9 @@ static void dumpRenderTree(const char *pathOrURL)
     readFromWindow = NO;
     testRepaint = testRepaintDefault;
     repaintSweepHorizontally = repaintSweepHorizontallyDefault;
+    if ([WebHistory optionalSharedHistory])
+        [WebHistory setOptionalSharedHistory:nil];
+
     if (currentTest != nil)
         CFRelease(currentTest);
     currentTest = (NSString *)pathOrURLString;
index 44a37356c5fd00e7eaeb8ed3cf6099bcc7e8e3d2..cce13b69e99ca3ee063250b07b80a706151d29fe 100644 (file)
                22181BD009DC8C4B008342E8 /* ObjCPluginFunction.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ObjCPluginFunction.m; sourceTree = "<group>"; };
                32A70AAB03705E1F00C91783 /* DumpRenderTreePrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DumpRenderTreePrefix.h; sourceTree = "<group>"; };
                9335435F03D75502008635CE /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-               9340995408540CAF007F3BC8 /* DumpRenderTree */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DumpRenderTree; sourceTree = BUILT_PRODUCTS_DIR; };
+               9340995408540CAF007F3BC8 /* DumpRenderTree */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = DumpRenderTree; sourceTree = BUILT_PRODUCTS_DIR; };
                93442CF408F8BA4900BFE8CA /* TextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInputController.h; sourceTree = "<group>"; };
                93442CF508F8BA4900BFE8CA /* TextInputController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextInputController.m; sourceTree = "<group>"; };
                A803FCB709CAAAB0009B2A37 /* EventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EventSendingController.h; sourceTree = "<group>"; };